VirtualTask/Views/Chiamate/Index.cshtml
2023-10-17 14:43:41 +02:00

86 lines
2.5 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"] = "Index";
}
<h1>Chiamate</h1>
<p>
<a asp-action="Create">Nuova chiamata</a>
</p>
@using (Html.BeginForm())
{
<p>
Find by Impianto: @Html.TextBox("SearchString")
<input type="submit" value="Search" />
</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></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.ActionLink("Edit", "Edit", new { id=item.chserial }) |
@Html.ActionLink("Details", "Details", new { id=item.chserial }) |
@Html.ActionLink("Delete", "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 = "Next",
LinkToPreviousPageFormat = "Previous",
MaximumPageNumbersToDisplay = 5,
DisplayLinkToPreviousPage = PagedListDisplayMode.Always,
DisplayLinkToNextPage = PagedListDisplayMode.Always
})
</nav>