Update button rendering, move css classes to viewdata
This commit is contained in:
@@ -1,14 +1,11 @@
|
||||
@using LeafWeb.WebCms.Controllers
|
||||
@using LeafWeb.WebCms.Utility
|
||||
@model int
|
||||
@{
|
||||
var url = UmbracoContext.Current.UrlProvider.GetUrl(LeafWebPageIds.Chart);
|
||||
var disabled = ViewData.ContainsKey("Disabled") && (bool) ViewData["Disabled"];
|
||||
var xs = ViewData.ContainsKey("xs") && (bool) ViewData["xs"];
|
||||
}
|
||||
<a href="@url?leafInputId=@Model"
|
||||
class="btn btn-outline-secondary @{if (xs) {<text>btn-sm</text>}} @{if (disabled) {<text>disabled</text>}}"
|
||||
role="button"
|
||||
@{if (disabled) {<text>title="No chart has been generated"</text>}} >
|
||||
<a href="@url?leafInputId=@Model" @Html.Partial("DisplayTemplates/_ViewDataCssClass") role="button"
|
||||
@if (ViewData.IsCssDisabled()) {<text>title="No chart has been generated"</text>} >
|
||||
<span class="fa fa-line-chart" title="Charts"></span>
|
||||
<span class="d-none d-sm-inline">Charts</span>
|
||||
</a>
|
||||
Reference in New Issue
Block a user