BuildFeed/Views/front/index.cshtml

30 lines
1.4 KiB
Plaintext
Raw Normal View History

2015-05-04 23:43:20 +08:00
@model IEnumerable<BuildFeed.Models.ViewModel.Front.FrontBuildGroup>
2015-03-28 10:09:26 +08:00
@using Humanizer;
2015-03-12 07:30:11 +08:00
@{
ViewBag.Title = "BuildFeed";
}
<div class="row">
2015-05-04 23:43:20 +08:00
@foreach (BuildFeed.Models.ViewModel.Front.FrontBuildGroup group in Model)
2015-03-12 07:30:11 +08:00
{
<div class="col-sm-2">
2015-03-31 05:32:35 +08:00
<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>
2015-03-12 07:30:11 +08:00
<p>
2015-05-04 23:43:20 +08:00
@if (group.LastBuild.HasValue)
2015-03-12 07:30:11 +08:00
{
2015-05-04 23:43:20 +08:00
var maxDate = group.LastBuild.Value;
2015-03-28 10:09:26 +08:00
if (maxDate.AddDays(28) > DateTime.Now)
{
2015-03-31 05:32:35 +08:00
<span title="@maxDate.ToString("d MMMM yyyy")"><i class="fa fa-calendar fa-fw"></i> @maxDate.Humanize()</span><br />
2015-03-28 10:09:26 +08:00
}
else
{
2015-03-31 05:32:35 +08:00
<span title="@maxDate.Humanize()"><i class="fa fa-calendar fa-fw"></i> @maxDate.ToString("d MMMM yyyy")</span><br />
2015-03-28 10:09:26 +08:00
}
2015-03-12 07:30:11 +08:00
}
2015-05-04 23:43:20 +08:00
<i class="fa fa-server fa-fw"></i> @group.BuildCount builds
2015-03-12 07:30:11 +08:00
</p>
</div>
}
</div>
@PaginationHelpers.PaginationBlock((int)ViewBag.PageNumber, (int)ViewBag.PageCount, "index", ViewContext.RouteData.Values)