Consolidate status markup.
Improved charting error reporting.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
@model IQueryable<LeafWeb.Core.Entities.LeafInput>
|
||||
@using LeafWeb.Core.Entities
|
||||
@model IQueryable<LeafInput>
|
||||
|
||||
@{
|
||||
var grid = new WebGrid(Model, rowsPerPage: 45);
|
||||
@@ -9,14 +10,19 @@
|
||||
grid.Column("Identifier", "Identifier"),
|
||||
grid.Column("SiteId", "Site Id"),
|
||||
//grid.Column("Name", "Submitted By"),
|
||||
grid.Column("CurrentStatus", "Status", item => Html.Partial("DisplayTemplates/_LeafInputStatus", (string)item.CurrentStatus.ToString())),
|
||||
grid.Column("", "", item => ChartLink(item))
|
||||
grid.Column("CurrentStatus", "Status", item => Status(item.Value)),
|
||||
grid.Column("", "", item => ChartLink(item.Value))
|
||||
),
|
||||
htmlAttributes: new { @class = "table table-striped table-bordered table-hover table-condensed" }
|
||||
)
|
||||
@grid.BootstrapPager()
|
||||
|
||||
@helper ChartLink(dynamic item)
|
||||
@helper ChartLink(LeafInput leafInput)
|
||||
{
|
||||
@Html.Partial("DisplayTemplates/_ChartButton", (int)item.Id, new ViewDataDictionary { { "Disabled", !item.HasLeafChart }, {"xs", true} })
|
||||
}
|
||||
@Html.Partial("DisplayTemplates/_ChartButton", leafInput.Id, new ViewDataDictionary { { "Disabled", !leafInput.HasLeafChart }, {"xs", true} })
|
||||
}
|
||||
|
||||
@helper Status(LeafInput leafInput)
|
||||
{
|
||||
@Html.Partial("DisplayTemplates/_LeafInputStatus", leafInput)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user