Files
Pf2eDataScrapper/Pf2eWeb/Pages/EntityType.cshtml
T

105 lines
3.2 KiB
Plaintext

@page
@using Pf2eModel.Model.Common.I18n
@model EntityTypeModel
@{
ViewData["Title"] = "Entities — " + Model.CurrentType;
}
<h1>@ViewData["Title"]</h1>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.Entity[0].Id)
</th>
<th>
@Html.DisplayNameFor(model => model.Entity[0].Name)
</th>
<th>
@Html.DisplayNameFor(model => model.Entity[0].Type)
</th>
<th>
@Html.DisplayNameFor(model => model.Entity[0].Slug)
</th>
<th>
@Html.DisplayNameFor(model => model.Entity[0].Rarity)
</th>
<th>
@Html.DisplayNameFor(model => model.Entity[0].IsTranslated)
</th>
<th>
@Html.DisplayNameFor(model => model.Entity[0].IsChecked)
</th>
<th>
@Html.DisplayNameFor(model => model.Entity[0].IsLegacy)
</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model.Entity)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.Id)
</td>
<td>
<a asp-page="./Details" asp-route-id="@item.Id">
@Html.DisplayFor(modelItem => item.Name[LocaleType.English])
</a>
</td>
<td>
@Html.DisplayFor(modelItem => item.Type)
</td>
<td>
@Html.DisplayFor(modelItem => item.Slug)
</td>
<td>
@Html.DisplayFor(modelItem => item.Rarity)
</td>
<td>
@Html.DisplayFor(modelItem => item.IsTranslated)
</td>
<td>
@Html.DisplayFor(modelItem => item.IsChecked)
</td>
<td>
@Html.DisplayFor(modelItem => item.IsLegacy)
</td>
</tr>
}
</tbody>
</table>
<nav aria-label="Page navigation example">
<ul class="pagination">
<li class="page-item @(Model.CurrentPage == 1 ? "disabled" : "")">
<a class="page-link" asp-page="./EntityType" asp-route-type="@Model.CurrentType" asp-route-pageNum="@(Model.CurrentPage - 1)">Previous</a>
</li>
@foreach (var num in Model.Pagination)
{
@if (num == Model.CurrentPage)
{
<li class="page-item active">
<a class="page-link" asp-page="./EntityType" asp-route-type="@Model.CurrentType" asp-route-pageNum="@(num)">@num</a>
</li>
}
else if (num == -1)
{
<li class="page-item disabled">
<a class="page-link" href="#">...</a>
</li>
}
else
{
<li class="page-item">
<a class="page-link" asp-page="./EntityType" asp-route-type="@Model.CurrentType" asp-route-pageNum="@(num)">@num</a>
</li>
}
}
<li class="page-item @(Model.CurrentPage == Model.LastPage ? "disabled" : "")">
<a class="page-link" asp-page="./EntityType" asp-route-type="@Model.CurrentType" asp-route-pageNum="@(Model.CurrentPage + 1)">Next</a>
</li>
</ul>
</nav>