Leaf Input Details

This commit is contained in:
2016-12-16 09:17:42 -05:00
parent 0d9bd7260c
commit 8dc1e0422c
33 changed files with 488 additions and 40 deletions
+4 -12
View File
@@ -9,24 +9,16 @@
grid.Column("LeafInputIdentifier", "Identifier"),
grid.Column("LeafInputSiteId", "Site Id"),
grid.Column("LeafInputName", "Submitted By"),
grid.Column("CurrentStatus", "Status", item => statusFormat(item)),
grid.Column("Chart", "Chart", item => chartLink(item))
grid.Column("CurrentStatus", "Status", item => Html.Partial("DisplayTemplates/_LeafInputStatus", (string)item.CurrentStatus)),
grid.Column("Chart", "Chart", item => ChartLink(item))
),
htmlAttributes: new { @class = "table table-striped table-bordered table-hover table-condensed" }
)
@helper chartLink(dynamic item)
@helper ChartLink(dynamic item)
{
if (item.HasLeafChart)
{
<a href="@UmbracoContext.Current.UrlProvider.GetUrl(1100)?leafInputId=@item.LeafInputId" class="btn btn-default btn-xs" role="button">
<span class="glyphicon glyphicon-stats"></span>
Chart
</a>
@Html.Partial("DisplayTemplates/_ChartLink", (int)item.LeafInputId)
}
}
@helper statusFormat(dynamic item)
{
<span class="status status-@item.CurrentStatus.ToLower()">@item.CurrentStatus</span>
}