@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.PageCount > 1) { }