72 lines
2.2 KiB
Plaintext
72 lines
2.2 KiB
Plaintext
@model IPagedList<VirtualTask.Models.Impianto>
|
|
@using X.PagedList;
|
|
@using X.PagedList.Mvc.Core;
|
|
@using X.PagedList.Web.Common;
|
|
<link href="~/Content/PagedList.css" rel="stylesheet" type="text/css" />
|
|
@{
|
|
ViewData["Title"] = "Impianti";
|
|
}
|
|
|
|
<h1>Impianti</h1>
|
|
|
|
<p>
|
|
<a asp-action="Create">Crea nuovo impianto</a>
|
|
</p>
|
|
@using (Html.BeginForm())
|
|
{
|
|
<p>
|
|
Cerca per indirizzo: @Html.TextBox("SearchString")
|
|
<input type="submit" value="Cerca" />
|
|
</p>
|
|
}
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Cod. Impianto</th>
|
|
<th hidden>Azienda</th>
|
|
<th>Descrizione</th>
|
|
<th>Indirizzo</th>
|
|
<th>Cod. Cliente</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var item in Model) {
|
|
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
<td>@Html.DisplayFor(modelItem => item.imcodimp)</td>
|
|
<td hidden>@Html.DisplayFor(modelItem => item.imcodazi)</td>
|
|
@Html.HiddenFor(modelItem => item.imcodazi)
|
|
<td>@Html.DisplayFor(modelItem => item.imdescri)</td>
|
|
<td>@Html.DisplayFor(modelItem => item.indirizzo)</td>
|
|
<td>@Html.DisplayFor(modelItem => item.imultcli) - @Html.DisplayFor(modelItem => item.descCliente)</td>
|
|
<td>
|
|
@Html.ActionLink("Modifica", "Edit", new { id=item.imcodimp }) |
|
|
@Html.ActionLink("Dettaglio", "Details", new { id=item.imcodimp }) |
|
|
@Html.ActionLink("Elimina", "Delete", new { id=item.imcodimp })
|
|
</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>
|