VirtualTask/Views/Progressivi/Index.cshtml
2024-10-08 10:48:57 +02:00

186 lines
7.6 KiB
Plaintext

@model IPagedList<VirtualTask.Models.Progressivo>
@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"] = "Progressivi";
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 class="card">
<h5 class="card-header">Ricerca</h5>
<div class="table-responsive text-nowrap">
<table class="table">
<tbody class="table-border-bottom-0">
<tr>
<td>
<span class="fw-medium">@Html.TextBox("SearchString", null, new { placeholder = "Cerca per tipo", @class = "agy-form-field require" })</span>
</td>
<td>
<i class="bx bxl-angular bx-sm text-black me-3">&nbsp;</i>
<span class="fw-medium"><input type="submit" value="Cerca" class="agy-btn submitForm" /></span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
@* <div>
<div style="float:left;width:40%;padding:0 20px;">@Html.TextBox("SearchString", null, new { placeholder = "Cerca per tipo", @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> *@
}
<div style="width:100%;height:30px;">
&nbsp;
</div>
<div class="card">
<h5 class="card-header">Progressivi</h5>
<div class="table-responsive text-nowrap">
<table class="table table-striped">
<thead>
<tr>
<th>Azienda</th>
<th>Tipo progressivo</th>
<th>Valore progressivo</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.azienda)
</td>
<td>
@Html.DisplayFor(modelItem => item.tipo_prog)
</td>
<td>
@Html.DisplayFor(modelItem => item.val_prog)
</td>
<td>
<a href="@Url.Action("Edit", "Progressivi", new { id=item.tipo_prog })" 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", "Progressivi", new { id=item.tipo_prog })" 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", "Progressivi", new { id=item.tipo_prog })" 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>
</div>
</div>
<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>
</div>
</div>
</div>
@* <h1>Progressivi</h1>
<p> *@
@*<a asp-action="Create">Create New</a>*@
@* </p>
@using (Html.BeginForm())
{
<p>
Cerca per tipo: @Html.TextBox("SearchString")
<input type="submit" value="Cerca" />
</p>
}
<table class="table">
<thead>
<tr>
<th> *@
@*@Html.DisplayNameFor(model => model.azienda)*@
@* Azienda
</th>
<th> *@
@*@Html.DisplayNameFor(model => model.tipo_prog)*@
@* Tipo progressivo
</th>
<th> *@
@*@Html.DisplayNameFor(model => model.val_prog)*@
@* Valore progressivo
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.azienda)
</td>
<td>
@Html.DisplayFor(modelItem => item.tipo_prog)
</td>
<td>
@Html.DisplayFor(modelItem => item.val_prog)
</td>
<td>
@Html.ActionLink("Modifica", "Edit", new { id=item.tipo_prog }) *@ @*|*@
@*@Html.ActionLink("Dettaglio", "Details", new { /* id=item.PrimaryKey */ }) |*@
@*@Html.ActionLink("Elimina", "Delete", new { /* id=item.PrimaryKey */ })*@
@* </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> *@