Update button rendering, move css classes to viewdata
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
@using LeafWeb.Core.Entities
|
||||
@using LeafWeb.WebCms.Utility
|
||||
@model IQueryable<LeafInput>
|
||||
|
||||
@{
|
||||
var grid = new WebGrid(Model, rowsPerPage: 45);
|
||||
}
|
||||
@@ -21,7 +21,12 @@
|
||||
|
||||
@helper ChartLink(LeafInput leafInput)
|
||||
{
|
||||
@Html.Partial("DisplayTemplates/_ChartButton", leafInput.Id, new ViewDataDictionary { { "Disabled", !leafInput.HasLeafChart }, {"xs", true} })
|
||||
var cssClass = CssClassUtil.CreateCssClassDataDictionary("btn", " btn-outline-secondary", "btn-sm");
|
||||
if (!leafInput.HasLeafChart)
|
||||
{
|
||||
cssClass.SetButtonDisabled();
|
||||
}
|
||||
@Html.Partial("DisplayTemplates/_ChartButton", leafInput.Id, cssClass)
|
||||
}
|
||||
|
||||
@helper Status(LeafInput leafInput)
|
||||
|
||||
Reference in New Issue
Block a user