44 lines
1.2 KiB
Plaintext
44 lines
1.2 KiB
Plaintext
@using LeafWeb.Core.Entities
|
|
@using LeafWeb.WebCms.Controllers
|
|
@using LeafWeb.WebCms.Utility
|
|
@model IQueryable<LeafInput>
|
|
@{
|
|
var grid = new WebGrid(Model, rowsPerPage: 45);
|
|
}
|
|
|
|
@if (Model.Any())
|
|
{
|
|
<div class="table-responsive">
|
|
@grid.Table(columns:
|
|
grid.Columns(
|
|
grid.Column("Identifier", "Identifier"),
|
|
grid.Column("SiteId", "Site Id"),
|
|
//grid.Column("Name", "Submitted By"),
|
|
grid.Column("CurrentStatus", "Status", item => Status(item.Value)),
|
|
grid.Column("", "", item => ChartLink(item.Value))
|
|
),
|
|
htmlAttributes: new { @class = "table table-sm table-striped table-bordered table-hover" }
|
|
)
|
|
@grid.PagerList()
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
@Html.Partial("NoResults")
|
|
}
|
|
|
|
@helper ChartLink(LeafInput leafInput)
|
|
{
|
|
var cssClass = CssClassUtil.CreateCssClassDataDictionary("btn", " btn-outline-secondary", "btn-sm");
|
|
if (!leafInput.HasLeafChart)
|
|
{
|
|
cssClass.SetCssDisabled();
|
|
}
|
|
@Html.Partial("DisplayTemplates/_ChartButton", leafInput.Id, cssClass)
|
|
}
|
|
|
|
@helper Status(LeafInput leafInput)
|
|
{
|
|
@Html.Partial("DisplayTemplates/_LeafInputStatus", leafInput)
|
|
}
|