demo20230512/Areas/admin/Views/PCR/Index.cshtml

54 lines
2.2 KiB
Plaintext
Raw Normal View History

2023-05-12 10:20:28 +08:00
@using Resources
@using PagedList.Mvc
@using PagedList
@model IEnumerable<Weee.Models.PCR>
@{
ViewBag.Title = Resource.StaticLabelPCRList;
Layout = "~/Areas/Admin/Views/Shared/_AdminLayout.cshtml";
}
<div class="col-md-12">
<h2>@Resource.StaticLabelPCRList</h2>
<hr />
<div class="col-md-12">
<div class="docs-row text-right">
@Html.ActionLink(Resource.StaticLabelGlobal_New, "Edit", new { id = 0 }, new { @class = "btn btn-default" })
</div>
<div>
<table class="table table-bordered text-center">
<tr>
<th>@Resource.PcrName</th>
<th>@Html.DisplayNameFor(model => model.Percentage)</th>
<th>@Html.DisplayNameFor(model => model.version)</th>
<th>@Resource.ProductLcaCount</th>
<th></th>
</tr>
@foreach (var item in Model)
{
<tr>
<td>@Html.DisplayFor(modelItem => item.DisplayName)</td>
<td>@Html.DisplayFor(modelItem => item.Percentage)</td>
<td>@Html.DisplayFor(modelItem => item.version)</td>
<td>@item.ProductLCAs.Count()</td>
<td class="docs-button-td-lg">
@Html.ActionLink(Resource.StaticLabelGlobal_Edit, "Edit", new { id = item.ID }, new { @class = "btn btn-xs btn-default" })
@if (item.ProductLCAs.Count() == 0)
{
@Html.ActionLink(Resource.StaticLabelGlobal_Delete, "Delete", new { id = item.ID }, new { @class = "btn btn-xs btn-default" })@:
}
@Html.ActionLink(Resource.StaticLabelGlobal_New, "Edit", new { id = 0, copyfrom = item.ID }, new { @class = "btn btn-xs btn-default" })
</td>
</tr>
}
</table>
</div>
<div class="text-center">
@Html.PagedListPager((IPagedList)Model, page => Url.Action("index", new { page }))
</div>
</div>
</div>
<div class="col-md-2"></div>