BuildFeed/Views/front/viewGroup.cshtml
Thomas Hounsell 2650353aba Refresh Pt 5c
2015-05-04 12:16:36 +01:00

39 lines
1.5 KiB
Plaintext

@model IGrouping<BuildFeed.Models.BuildGroup, BuildFeed.Models.Build>
@using Humanizer;
@{
ViewBag.Title = string.Format("{0} | BuildFeed", Model.Key.ToString());
}
<h1>@Model.Key.ToString()</h1>
<div class="row">
@foreach (var build in Model.OrderBy(b => b.BuildTime))
{
<div class="col-sm-3">
<h3 class="build-group-title">@build.Lab</h3>
<p>
@if (build.BuildTime.HasValue)
{
<span title="@build.BuildTime.Value.Humanize()"><i class="fa fa-calendar fa-fw"></i> @build.BuildTime.Value.ToString("d MMMM yyyy")</span><br />
<span title="@build.BuildTime.Value.Humanize()"><i class="fa fa-clock-o fa-fw"></i> @build.BuildTime.Value.ToString("h:mm tt")</span><br />
}
</p>
<p>
@if (build.IsLeaked)
{
<span class="label label-success label-build-status">Leaked</span>
}
else
{
<span class="label label-danger label-build-status">Unleaked</span>
}
</p>
<p>
<a href="@Url.Action("viewBuild", new { id = build.Id })" class="btn btn-info btn-xs">Info</a>
<a href="@Url.Action("editBuild", new { id = build.Id })" class="btn btn-primary btn-xs">Edit</a>
<a href="@Url.Action("deleteBuild", new { id = build.Id })" class="btn btn-danger btn-xs">Delete</a>
</p>
</div>
}
</div>