private static HtmlBuilder DisplayControl(this HtmlBuilder hb, string id, string icon) { return(hb.Div( attributes: new HtmlAttributes() .Id(id) .Class("display-control") .OnClick("$p.send($(this));") .DataMethod("post"), action: () => hb .Span(css: "ui-icon " + icon) .Text(text: Displays.Aggregations() + ":"))); }
private static HtmlBuilder DisplayControl( this HtmlBuilder hb, Context context, View view, string id, string icon) { if (view?.AggregationsDisplayType == View.DisplayTypes.AlwaysDisplayed) { return(hb); } return(hb.Div( attributes: new HtmlAttributes() .Id(id) .Class("display-control") .OnClick("$p.send($(this));") .DataMethod("post"), action: () => hb .Span(css: "ui-icon " + icon) .Text(text: Displays.Aggregations(context: context) + ":"))); }