@model IEnumerable @{ var grid = new WebGrid(Model, rowsPerPage: 45); } @grid.Table(columns: grid.Columns( grid.Column("LeafInputIdentifier", "Identifier"), grid.Column("LeafInputSiteId", "Site Id"), grid.Column("LeafInputName", "Submitted By"), grid.Column("CurrentStatus", "Status", item => Html.Partial("DisplayTemplates/_LeafInputStatus", (string)item.CurrentStatus)), grid.Column("Total Results: " + Model.Count(), format: item => Btns(item))), htmlAttributes: new { @class = "table table-striped table-bordered table-hover table-condensed" } ) @grid.BootstrapPager() @helper Btns(dynamic item) {
} @helper DetailsLink(dynamic item) { @Html.Partial("DisplayTemplates/_DetailsLink", (int)item.LeafInputId) } @helper ChartLink(dynamic item) { @Html.Partial("DisplayTemplates/_ChartLink", (int)item.LeafInputId) } @helper SetPriorityHigh(dynamic item, string label) { @label } @helper SetPriorityLow(dynamic item, string label) { @label } @helper DownloadInput(dynamic item) { Input } @helper DownloadOutputToUser(dynamic item) { ToUser } @helper DeleteLink(dynamic item) { @Html.Partial("DisplayTemplates/_DeleteForm", (Tuple)Tuple.Create(item.LeafInputId, item.IsDeletable)) } @helper DisableItem(bool disabled) { if (disabled) {class="disabled"} }