mirror of
https://gitlab.com/buildfeed/BuildFeed.git
synced 2024-03-22 21:10:34 +08:00
140 lines
6.2 KiB
Plaintext
140 lines
6.2 KiB
Plaintext
|
@model IEnumerable<BuildFeed.Models.Build>
|
||
|
|
||
|
@{
|
||
|
ViewBag.Title = "BuildFeed";
|
||
|
|
||
|
|
||
|
if (ViewBag.PageNumber > 1)
|
||
|
{
|
||
|
ViewBag.Title = string.Format("Page {1} | {0}", ViewBag.Title, ViewBag.PageNumber);
|
||
|
}
|
||
|
|
||
|
ViewBag.ItemId = ViewContext.Controller.ValueProvider.GetValue("lab").RawValue;
|
||
|
ViewBag.Title = string.Format("Builds from {1} | {0}", ViewBag.Title, ViewBag.ItemId);
|
||
|
}
|
||
|
|
||
|
@section head
|
||
|
{
|
||
|
<meta name="description" content="Check out all the known builds to come out of the Windows development lab @ViewBag.ItemId through BuildFeed, a collaborative Windows build list" />
|
||
|
<meta property="og:description" content="Check out all the known builds to come out of the Windows development lab @ViewBag.ItemId through BuildFeed, a collaborative Windows build list" />
|
||
|
}
|
||
|
|
||
|
<div class="row">
|
||
|
<div class="col-sm-9">
|
||
|
<ul class="list-unstyled">
|
||
|
@foreach (var item in Model)
|
||
|
{
|
||
|
<li>
|
||
|
<div class="build-head">
|
||
|
@Html.ActionLink("Info", "info", new { id = item.Id }, new { @class = "btn btn-info btn-xs" })
|
||
|
@if (User.Identity.IsAuthenticated)
|
||
|
{
|
||
|
@Html.ActionLink("Edit", "edit", new { id = item.Id }, new { @class = "btn btn-default btn-xs" })
|
||
|
}
|
||
|
@if (Roles.IsUserInRole("Administrators"))
|
||
|
{
|
||
|
@Html.ActionLink("Delete", "delete", new { id = item.Id }, new { @class = "btn btn-danger btn-xs" })
|
||
|
}
|
||
|
<h3>@Html.DisplayFor(modelItem => item.FullBuildString)</h3>
|
||
|
</div>
|
||
|
<div class="build-foot">
|
||
|
<span class="badge">@Html.DisplayFor(TypeOfSource => item.SourceType, "Enumeration")</span>
|
||
|
@if (item.FlightLevel != BuildFeed.Models.LevelOfFlight.None)
|
||
|
{
|
||
|
<span class="badge">Flight Level: @Html.DisplayFor(TypeOfSource => item.FlightLevel, "Enumeration")</span>
|
||
|
}
|
||
|
@if (item.BetaWikiUri != null)
|
||
|
{
|
||
|
<a href="@item.BetaWikiServerUri" target="_blank" class="badge"><i class="fa fa-sm fa-link"></i> BetaWiki (Client)</a>
|
||
|
}
|
||
|
@if (item.BetaWikiServerUri != null)
|
||
|
{
|
||
|
<a href="@item.BetaWikiServerUri" target="_blank" class="badge"><i class="fa fa-sm fa-link"></i> BetaWiki (Server)</a>
|
||
|
}
|
||
|
@if (item.WinWorldPCUri != null)
|
||
|
{
|
||
|
<a href="@item.WinWorldPCUri" target="_blank" class="badge"><i class="fa fa-sm fa-link"></i> WinWorldPC</a>
|
||
|
}
|
||
|
@if (item.BetaArchiveUri != null)
|
||
|
{
|
||
|
<a href="@item.BetaArchiveUri" target="_blank" class="badge"><i class="fa fa-sm fa-link"></i> BetaArchive Wiki</a>
|
||
|
}
|
||
|
@if (item.LonghornMsUri != null)
|
||
|
{
|
||
|
<a href="@item.LonghornMsUri" target="_blank" class="badge"><i class="fa fa-sm fa-link"></i> Longhorn.ms</a>
|
||
|
}
|
||
|
</div>
|
||
|
</li>
|
||
|
}
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="col-sm-3">
|
||
|
<div class="panel panel-default panel-search">
|
||
|
<div class="panel-body">
|
||
|
@Html.TextBox("search-input", "", new { @class = "form-control" })
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="list-group">
|
||
|
@Html.ActionLink("Return to full listing", "index", new { controller = "build", area = "", page = 1 }, new { @class = "list-group-item" })
|
||
|
</div>
|
||
|
<div class="list-group">
|
||
|
@if (User.Identity.IsAuthenticated)
|
||
|
{
|
||
|
if (Roles.IsUserInRole("Administrators"))
|
||
|
{
|
||
|
@Html.ActionLink("Administration", "index", new { controller = "base", area = "admin" }, new { @class = "list-group-item" })
|
||
|
}
|
||
|
@Html.ActionLink("Add a build", "create", new { controller = "build" }, new { @class = "list-group-item" })
|
||
|
@Html.ActionLink("Change your password", "password", new { controller = "support" }, new { @class = "list-group-item" })
|
||
|
@Html.ActionLink("Log out", "logout", new { controller = "support" }, new { @class = "list-group-item" })
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
@Html.ActionLink("Log in", "login", new { controller = "support" }, new { @class = "list-group-item" })
|
||
|
@Html.ActionLink("Register", "register", new { controller = "support" }, new { @class = "list-group-item" })
|
||
|
}
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
@if (ViewBag.PageCount > 1)
|
||
|
{
|
||
|
<ul class="pagination">
|
||
|
@if (ViewBag.PageNumber > 1)
|
||
|
{
|
||
|
<li>@Html.ActionLink(HttpUtility.HtmlDecode("«"), ViewContext.Controller.ValueProvider.GetValue("action").RawValue.ToString(), new { page = ViewBag.PageNumber - 1 })</li>
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
<li class="disabled"><span>«</span></li>
|
||
|
}
|
||
|
|
||
|
|
||
|
@for (int i = 1; i <= ViewBag.PageCount; i++)
|
||
|
{
|
||
|
<li @((i == ViewBag.PageNumber) ? "class=active" : "")>@Html.ActionLink(i.ToString(), ViewBag.Action as string, new { page = i })</li>
|
||
|
}
|
||
|
|
||
|
|
||
|
@if (ViewBag.PageNumber < ViewBag.PageCount)
|
||
|
{
|
||
|
<li>@Html.ActionLink(HttpUtility.HtmlDecode("»"), ViewBag.Action as string, new { page = ViewBag.PageNumber + 1 })</li>
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
<li class="disabled"><span>»</span></li>
|
||
|
}
|
||
|
</ul>
|
||
|
}
|
||
|
|
||
|
@section scripts
|
||
|
{
|
||
|
@Scripts.Render("~/bundles/jsrender")
|
||
|
<script type="text/javascript" src="~/Scripts/bfs.js"></script>
|
||
|
<script id="result-template" type="text/x-jsrender">
|
||
|
<a href="{{:Url}}" class="list-group-item" title="{{:Title}}">
|
||
|
<h4 class="list-group-item-heading">{{:Label}}</h4>
|
||
|
<p class="list-group-item-text">{{:Group}}</p>
|
||
|
</a>
|
||
|
</script>
|
||
|
}
|