VirtualTask/Views/Chiamate/Index.cshtml
2023-12-13 09:24:04 +01:00

227 lines
8.9 KiB
Plaintext

@model IPagedList<VirtualTask.Models.Chiamate>
@using X.PagedList.Mvc.Core;
@using X.PagedList.Web.Common;
@using X.PagedList;
<link href="~/Content/PagedList.css" rel="stylesheet" type="text/css" />
@{
ViewData["Title"] = "Chiamate";
Layout = "~/Views/Shared/_LayoutAreaRiservata.cshtml";
}
<div class="agy-project-wrapper agy-project-page-wrapper">
<div class="container">
<div class="row">
<p>
<a asp-action="Create" class="info-data"><img src="~/assets/images/icons8-nuovo-50.png" alt="Crea un nuovo elemento" /></a>
</p>
@using (Html.BeginForm())
{
<div>
<div style="float:left;width:40%;padding:0 20px;">@Html.TextBox("SearchString", null, new { placeholder = "Cerca per impianto", @class = "agy-form-field require" })</div>
<div style="float:left;width:2%;">&nbsp;</div>
<div style="float:left;width:57%;"><input type="submit" value="Cerca" class="agy-btn submitForm" /></div>
</div>
}
<table class="table">
<thead>
<tr>
@* <th>Seriale</th> *@
@* <th>Esercizio</th> *@
<th>Numero</th>
<th>Data</th>
<th>Impianto</th>
<th>Tecnico</th>
<th>Stato</th>
<th>R</th>
<th>IC</th>
<th>Buono</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
@Html.HiddenFor(modelItem => item.chserial)
@Html.HiddenFor(modelItem => item.chcodese)
@* <td>
@Html.DisplayFor(modelItem => item.chserial)
@Html.HiddenFor(modelItem => item.chserial)
</td>
<td>
@Html.DisplayFor(modelItem => item.chcodese)
</td>
*@
<td>
@Html.DisplayFor(modelItem => item.numIntero)
</td>
<td>
@Html.DisplayFor(modelItem => item.chdata)
</td>
<td>
@Html.DisplayFor(modelItem => item.chcodimp) - @Html.DisplayFor(modelItem => item.indirizzoBreve)
</td>
<td>
@Html.DisplayFor(modelItem => item.chtchiam) - @Html.DisplayFor(modelItem => item.tcdescri)
</td>
<td>@Html.DisplayFor(modelItem => item.chstato) - @Html.DisplayFor(modelItem => item.descStato)</td>
<td>@Html.DisplayFor(modelItem => item.rif)</td>
<td>@Html.DisplayFor(modelItem => item.ic)</td>
@{
string link = string.Empty;
if (!string.IsNullOrEmpty(item.ser_buono_chiu))
{
link = "http://testapi.poloinformatico.it:9001/VIRTU/";
link = link + item.ser_buono_chiu + ".jpg";
<td><a href="@link" target="_blank">@item.ser_buono_chiu</a></td>
}
else
{
<td></td>
}
}
<td>
<a href="@Url.Action("Edit", "Chiamate", new { id=item.chserial })" title="Modifica" class="links">
<img alt="Modifica" src="@Url.Content("~/assets/images/icons8-modificare-64.png")" style="width:30px;height:30px;">
</a>
|
<a href="@Url.Action("Details", "Chiamate", new { id=item.chserial })" title="Dettaglio" class="links">
<img alt="Dettaglio" src="@Url.Content("~/assets/images/icons8-visualizza-file-64.png")" style="width:30px;height:30px;">
</a>
|
<a href="@Url.Action("Delete", "Chiamate", new { id=item.chserial })" title="Elimina" class="links">
<img alt="Elimina" src="@Url.Content("~/assets/images/icons8-elimina-50.png")" style="width:30px;height:30px;">
</a>
</td>
</tr>
}
</tbody>
</table>
<nav>
@Html.PagedListPager(Model, page => Url.Action("index", new { page = page, searchString=@ViewData["CurrentFilter"] }), new PagedListRenderOptions()
{
ActiveLiElementClass = "active",
PageClasses = new[]{ "page-link"},
LiElementClasses=new[] { "page-item" },
UlElementClasses = new[] { "pagination","justify-content-center", "mt-3" },
LinkToNextPageFormat = "Successiva",
LinkToPreviousPageFormat = "Precedente",
MaximumPageNumbersToDisplay = 5,
DisplayLinkToPreviousPage = PagedListDisplayMode.Always,
DisplayLinkToNextPage = PagedListDisplayMode.Always
})
</nav>
</div>
</div>
</div>
@* <h1>Chiamate</h1>
<p>
<a asp-action="Create">Nuova chiamata</a>
</p>
@using (Html.BeginForm())
{
<p>
Cerca per Impianto: @Html.TextBox("SearchString")
<input type="submit" value="Cerca" />
</p>
}
<table class="table">
<thead>
<tr>
<th>Seriale</th>
<th>Esercizio</th>
<th>Numero</th>
<th>Data</th>
<th>Impianto</th>
<th>Tecnico</th>
<th>Stato</th>
<th>R</th>
<th>IC</th>
<th>Buono</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.chserial)
</td>
<td>
@Html.DisplayFor(modelItem => item.chcodese)
</td>
<td>
@Html.DisplayFor(modelItem => item.numIntero)
</td>
<td>
@Html.DisplayFor(modelItem => item.chdata)
</td>
<td>
@Html.DisplayFor(modelItem => item.chcodimp) - @Html.DisplayFor(modelItem => item.indirizzoBreve)
</td>
<td>
@Html.DisplayFor(modelItem => item.chtchiam) - @Html.DisplayFor(modelItem => item.tcdescri)
</td>
<td>@Html.DisplayFor(modelItem => item.chstato) - @Html.DisplayFor(modelItem => item.descStato)</td>
<td>@Html.DisplayFor(modelItem => item.rif)</td>
<td>@Html.DisplayFor(modelItem => item.ic)</td>
@{
string link = string.Empty;
if (!string.IsNullOrEmpty(item.ser_buono_chiu))
{
link = "http://testapi.poloinformatico.it:9001/VIRTU/";
link = link + item.ser_buono_chiu + ".jpg";
<td><a href="@link" target="_blank">@item.ser_buono_chiu</a></td>
}
else
{
<td></td>
}
}
<td>
@Html.ActionLink("Modifica", "Edit", new { id=item.chserial }) |
@Html.ActionLink("Dettaglio", "Details", new { id=item.chserial }) |
@Html.ActionLink("Elimina", "Delete", new { id=item.chserial })
</td>
</tr>
}
</tbody>
</table>
<br />
<nav>
@Html.PagedListPager(Model, page => Url.Action("index", new { page = page, searchString=@ViewData["CurrentFilter"] }), new PagedListRenderOptions()
{
ActiveLiElementClass = "active",
PageClasses = new[]{ "page-link"},
LiElementClasses=new[] { "page-item" },
UlElementClasses = new[] { "pagination","justify-content-center", "mt-3" },
LinkToNextPageFormat = "Successiva",
LinkToPreviousPageFormat = "Precedente",
MaximumPageNumbersToDisplay = 5,
DisplayLinkToPreviousPage = PagedListDisplayMode.Always,
DisplayLinkToNextPage = PagedListDisplayMode.Always
})
</nav> *@