spiffy page list

This commit is contained in:
Michael 2017-04-20 11:29:33 -04:00
parent 66e3da8b2e
commit 6162da1825

View file

@ -77,10 +77,13 @@
Html.RenderPartial("~/Views/Shared/_ModeratorBar.cshtml", Model); Html.RenderPartial("~/Views/Shared/_ModeratorBar.cshtml", Model);
} }
<p>Pages:
<ul class="pagination"> <ul class="pagination">
<li>@Html.ActionLink("First", "ViewTopic", "Forum", null, new { id = Model.Discriminator, page = 1 })</li>
@for(int i = 1; i <= ViewBag.PageCount; i++) @for(int i = 1; i <= ViewBag.PageCount; i++)
{ {
if (i == ViewBag.Page - 1) if (i == ViewBag.Page + 1)
{ {
<li class="active">@Html.ActionLink(i.ToString(), "ViewTopic", "Forum", null, new { id = Model.Discriminator, page = i })</li> <li class="active">@Html.ActionLink(i.ToString(), "ViewTopic", "Forum", null, new { id = Model.Discriminator, page = i })</li>
} }
@ -89,4 +92,6 @@
<li>@Html.ActionLink(i.ToString(), "ViewTopic", "Forum", null, new { id = Model.Discriminator, page = i })</li> <li>@Html.ActionLink(i.ToString(), "ViewTopic", "Forum", null, new { id = Model.Discriminator, page = i })</li>
} }
} }
</ul> <li>@Html.ActionLink("Last", "ViewTopic", "Forum", null, new { id = Model.Discriminator, page = ViewBag.PageCount })</li>
</ul>
</p>