mirror of
https://gitlab.com/buildfeed/BuildFeed.git
synced 2024-03-22 21:10:34 +08:00
1b625408d9
the build controller is finally gone!
68 lines
2.6 KiB
Plaintext
68 lines
2.6 KiB
Plaintext
@model IEnumerable<BuildFeed.Models.Build>
|
|
@using Humanizer;
|
|
@{
|
|
ViewBag.Title = string.Format("Windows NT {0} | BuildFeed", ViewBag.ItemId);
|
|
}
|
|
|
|
@section head
|
|
{
|
|
@if (ViewBag.MetaItem != null)
|
|
{
|
|
<meta name="description" content="@ViewBag.MetaItem.MetaDescription" />
|
|
<meta property="og:description" content="@ViewBag.MetaItem.MetaDescription" />
|
|
}
|
|
}
|
|
|
|
<h2>@string.Format("Windows NT {0}", ViewBag.ItemId)</h2>
|
|
@if (ViewBag.MetaItem != null && !string.IsNullOrWhiteSpace(ViewBag.MetaItem.PageContent))
|
|
{
|
|
<h3>About</h3>
|
|
@Html.Raw(ViewBag.MetaItem.PageContent)
|
|
}
|
|
<h3>Share</h3>
|
|
<div class="addthis_sharing_toolbox"></div>
|
|
<h3>Listing</h3>
|
|
<div class="row">
|
|
@foreach (var build in Model)
|
|
{
|
|
<div class="col-sm-3">
|
|
<h3 class="build-group-title">@string.Format("{0}.{1}.{2}.{3}", build.MajorVersion, build.MinorVersion, build.Number, build.Revision)</h3>
|
|
<p>
|
|
<a href="@Url.Action("viewBuild", new { id = build.Id })" class="btn btn-info btn-xs">Info</a>
|
|
@if (User.Identity.IsAuthenticated)
|
|
{
|
|
<a href="@Url.Action("editBuild", new { id = build.Id })" class="btn btn-primary btn-xs">Edit</a>
|
|
if (Roles.IsUserInRole("Administrators"))
|
|
{
|
|
<a href="@Url.Action("deleteBuild", new { id = build.Id })" class="btn btn-danger btn-xs">Delete</a>
|
|
}
|
|
}
|
|
</p>
|
|
<p>
|
|
@if (!string.IsNullOrEmpty(build.Lab))
|
|
{
|
|
<span><i class="fa fa-code-fork fa-fw"></i> @build.Lab</span><br />
|
|
}
|
|
@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>
|
|
</div>
|
|
}
|
|
</div>
|
|
@section scripts
|
|
{
|
|
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5431719a661cbfd0" async="async"></script>
|
|
} |