Update button rendering, move css classes to viewdata

This commit is contained in:
2020-06-26 21:40:20 -04:00
parent 7e88de5041
commit 55f59ddd7a
11 changed files with 208 additions and 112 deletions
+7 -2
View File
@@ -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)