@model IEnumerable @{ ViewBag.Action = ViewContext.Controller.ValueProvider.GetValue("action").RawValue.ToString().ToLower(); ViewBag.Title = "BuildFeed"; if (ViewBag.PageNumber > 1) { ViewBag.Title = string.Format("Page {1} | {0}", ViewBag.Title, ViewBag.PageNumber); } switch (ViewBag.Action as string) { case "index": ViewBag.Title = "BuildFeed | The collaborative build list"; break; case "lab": ViewBag.ItemId = ViewContext.Controller.ValueProvider.GetValue("lab").RawValue; ViewBag.Title = string.Format("Builds from {1} | {0}", ViewBag.Title, ViewBag.ItemId); break; case "year": ViewBag.ItemId = ViewContext.Controller.ValueProvider.GetValue("year").RawValue; ViewBag.Title = string.Format("Builds from {1} | {0}", ViewBag.Title, ViewBag.ItemId); break; case "version": ViewBag.ItemId = string.Format("{0}.{1}", ViewContext.Controller.ValueProvider.GetValue("major").RawValue, ViewContext.Controller.ValueProvider.GetValue("minor").RawValue); ViewBag.Title = string.Format("Windows NT {1} | {0}", ViewBag.Title, ViewBag.ItemId); break; case "source": ViewBag.ItemId = DisplayHelpers.GetDisplayTextForEnum(Enum.Parse(typeof(BuildFeed.Models.TypeOfSource), ViewContext.Controller.ValueProvider.GetValue("source").RawValue.ToString())); ViewBag.Title = string.Format("{1} | {0}", ViewBag.Title, ViewBag.ItemId); break; } } @section head { @switch (ViewBag.Action as string) { case "index": break; case "lab": break; case "year": break; } }
    @foreach (var item in Model) {
  • @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 (User.Identity.Name == "hounsell") { @Html.ActionLink("Delete", "delete", new { id = item.Id }, new { @class = "btn btn-danger btn-xs" }) }

    @Html.DisplayFor(modelItem => item.FullBuildString)

    @Html.DisplayFor(TypeOfSource => item.SourceType, "Enumeration") @if (item.FlightLevel != BuildFeed.Models.LevelOfFlight.None) { Flight Level: @Html.DisplayFor(TypeOfSource => item.FlightLevel, "Enumeration") } @if (item.BetaWikiUri != null) { BetaWiki (Client) } @if (item.BetaWikiServerUri != null) { BetaWiki (Server) } @if (item.WinWorldPCUri != null) { WinWorldPC } @if (item.BetaArchiveUri != null) { BetaArchive Wiki } @if (item.LonghornMsUri != null) { Longhorn.ms }
  • }
@if (ViewBag.Action != "index") {
@Html.ActionLink("Return to full listing", "index", new { controller = "build", area = "", page = 1 }, new { @class = "list-group-item" })
}
@if (User.Identity.IsAuthenticated) { if (User.Identity.Name == "hounsell") { @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" }) }
@if (ViewBag.PageCount > 1) { } @section scripts { @Scripts.Render("~/bundles/jsrender") }