BuildFeed/Views/front/index.cshtml
Thomas Hounsell e04ab6fdbd Pagination fun
Mostly some #5, some tweaks to #4
2015-05-28 21:18:21 +01:00

30 lines
1.4 KiB
Plaintext

@model IEnumerable<BuildFeed.Models.ViewModel.Front.FrontBuildGroup>
@using Humanizer;
@{
ViewBag.Title = "BuildFeed";
}
<div class="row">
@foreach (BuildFeed.Models.ViewModel.Front.FrontBuildGroup group in Model)
{
<div class="col-sm-2">
<h3 class="build-group-title"><a href="@Url.Action("viewGroup", new { major = group.Key.Major, minor = group.Key.Minor, number = group.Key.Build, revision = group.Key.Revision })"><span class="icon"><i class="fa fa-plus-square"></i></span> @group.Key.ToString()</a></h3>
<p>
@if (group.LastBuild.HasValue)
{
var maxDate = group.LastBuild.Value;
if (maxDate.AddDays(28) > DateTime.Now)
{
<span title="@maxDate.ToString("d MMMM yyyy")"><i class="fa fa-calendar fa-fw"></i> @maxDate.Humanize()</span><br />
}
else
{
<span title="@maxDate.Humanize()"><i class="fa fa-calendar fa-fw"></i> @maxDate.ToString("d MMMM yyyy")</span><br />
}
}
<i class="fa fa-server fa-fw"></i> @group.BuildCount builds
</p>
</div>
}
</div>
@PaginationHelpers.PaginationBlock((int)ViewBag.PageNumber, (int)ViewBag.PageCount, "index", ViewContext.RouteData.Values)