-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Computed.cshtml
31 lines (28 loc) · 1.12 KB
/
Computed.cshtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
@page
@model ComputedModel
<div class="text-center">
@if (Model.Users.Any())
{
<div class="users">
@foreach (var user in Model.Users)
{
<div class="user">
@user.Name (@(user.NullableDate?.ToLongDateString() ?? "-"))
</div>
}
</div>
<div class="mt-3" style="text-align: center">
(@Model.Count items) (@Model.Elapsed | total with prev/next: @Model.ElapsedTotal)
</div>
<div class="pagination mt-3">
<a asp-page="/Computed" asp-route-first="@true" disabled="@(!Model.HasPrevious ? "disabled" : null)">First</a>
<a asp-page="/Computed" asp-route-before="@Model.Users.First().Id" disabled="@(!Model.HasPrevious ? "disabled" : null)">Previous</a>
<a asp-page="/Computed" asp-route-after="@Model.Users.Last().Id" disabled="@(!Model.HasNext ? "disabled" : null)">Next</a>
<a asp-page="/Computed" asp-route-last="@true" disabled="@(!Model.HasNext ? "disabled" : null)">Last</a>
</div>
}
else
{
<div>Nothing</div>
}
</div>