2016-07-15 21:39:30 +08:00
|
|
|
@using BuildFeed.Code
|
|
|
|
@using BuildFeed.Models
|
|
|
|
@using Humanizer
|
|
|
|
@model Tuple<BuildFeed.Models.BuildGroup, List<BuildFeed.Models.BuildModel>>
|
2015-03-22 03:29:21 +08:00
|
|
|
@{
|
2016-07-15 21:39:30 +08:00
|
|
|
ViewBag.Title = $"{Model.Item1} | {InvariantTerms.SiteName}";
|
2015-03-22 03:29:21 +08:00
|
|
|
}
|
|
|
|
|
2015-09-10 06:48:29 +08:00
|
|
|
<h1>@Model.Item1.ToString()</h1>
|
2015-03-31 05:32:35 +08:00
|
|
|
|
2016-07-15 21:39:30 +08:00
|
|
|
<h3>@VariantTerms.Front_Listing</h3>
|
2016-07-11 01:53:23 +08:00
|
|
|
<div class="build-group-listing">
|
2016-07-15 21:39:30 +08:00
|
|
|
@foreach (BuildModel build in Model.Item2)
|
2016-07-11 01:53:23 +08:00
|
|
|
{
|
|
|
|
<div class="build-group">
|
2016-07-15 21:39:30 +08:00
|
|
|
<h3 class="build-group-title no-wrapping" title="@build.Lab">
|
|
|
|
<a href="@Url.Action("ViewBuild", new
|
|
|
|
{
|
|
|
|
id = build.Id
|
|
|
|
})">
|
|
|
|
@(string.IsNullOrEmpty(build.Lab)
|
|
|
|
? "{Unknown}"
|
|
|
|
: build.Lab)
|
|
|
|
</a>
|
|
|
|
</h3>
|
2016-07-11 01:53:23 +08:00
|
|
|
@if (User.Identity.IsAuthenticated)
|
2016-07-15 21:39:30 +08:00
|
|
|
{
|
2016-07-11 01:53:23 +08:00
|
|
|
<p>
|
2016-07-15 21:39:30 +08:00
|
|
|
<a href="@Url.Action("EditBuild", new
|
|
|
|
{
|
|
|
|
id = build.Id
|
|
|
|
})" class="btn btn-primary btn-xs">
|
|
|
|
@VariantTerms.Front_Edit</a>
|
2016-07-11 01:53:23 +08:00
|
|
|
@if (Roles.IsUserInRole("Administrators"))
|
|
|
|
{
|
2016-07-15 21:39:30 +08:00
|
|
|
<a href="@Url.Action("DeleteBuild", new
|
|
|
|
{
|
|
|
|
id = build.Id
|
|
|
|
})" class="btn btn-danger btn-xs">
|
|
|
|
@VariantTerms.Front_Delete</a>
|
2016-07-11 01:53:23 +08:00
|
|
|
}
|
|
|
|
</p>
|
|
|
|
}
|
|
|
|
@if (build.BuildTime.HasValue)
|
|
|
|
{
|
2015-07-09 20:41:15 +08:00
|
|
|
<p class="build-group-p">
|
2016-07-11 01:53:23 +08:00
|
|
|
<span title="@build.BuildTime.Value.Humanize()"><i class="fa fa-calendar fa-fw"></i> @build.BuildTime.Value.ToLongDateWithoutDay()</span>
|
2015-05-04 19:16:36 +08:00
|
|
|
</p>
|
2016-07-11 01:53:23 +08:00
|
|
|
<p class="build-group-p">
|
|
|
|
<span title="@build.BuildTime.Value.Humanize()"><i class="fa fa-clock-o fa-fw"></i> @build.BuildTime.Value.ToShortTimeString()</span>
|
|
|
|
</p>
|
|
|
|
}
|
|
|
|
@if (build.IsLeaked)
|
|
|
|
{
|
|
|
|
<p class="build-group-p">
|
2016-07-15 21:39:30 +08:00
|
|
|
<span class="label label-success label-build-status">@VariantTerms.Front_Public</span>
|
2016-07-11 01:53:23 +08:00
|
|
|
</p>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
<p class="build-group-p">
|
2016-07-15 21:39:30 +08:00
|
|
|
<span class="label label-danger label-build-status">@VariantTerms.Front_Private</span>
|
2015-04-12 00:39:45 +08:00
|
|
|
</p>
|
2016-07-11 01:53:23 +08:00
|
|
|
}
|
|
|
|
</div>
|
|
|
|
}
|
2016-07-15 21:39:30 +08:00
|
|
|
</div>
|