Update button rendering, move css classes to viewdata
This commit is contained in:
@@ -1,12 +1,24 @@
|
||||
@model IEnumerable<LeafInputDataSiteViewModel>
|
||||
@{
|
||||
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
||||
var grid = new WebGrid(Model, rowsPerPage: 45)
|
||||
{
|
||||
};
|
||||
//Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
||||
Rend("Site Id", string.Join(", ", Model.Select(m => m.SiteId).Distinct()));
|
||||
Rend("Latitude", string.Join(", ", Model.Select(m => m.Latitude).Distinct()));
|
||||
}
|
||||
|
||||
@grid.GetHtml(columns:
|
||||
@helper Rend(string label, string value)
|
||||
{
|
||||
<div class="row pb-lg-2 pb-sm-1 @if (ViewData.Model == null){<text>d-none</text> }">
|
||||
<div class="col-sm-3 text-truncate">
|
||||
@label
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@value
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
@*@grid.GetHtml(columns:
|
||||
grid.Columns(
|
||||
grid.Column("SiteId"),
|
||||
grid.Column("Latitude"),
|
||||
@@ -14,4 +26,4 @@
|
||||
grid.Column("Elevation")
|
||||
),
|
||||
htmlAttributes: new { @class = "table table-sm table-striped table-bordered table-hover" }
|
||||
)
|
||||
)*@
|
||||
|
||||
Reference in New Issue
Block a user