Files
LeafWeb/WebCms/Views/Shared/DisplayTemplates/LeafInputDataViewModels.cshtml
T

34 lines
1.1 KiB
Plaintext

@model ICollection<LeafInputDataViewModel>
@{
//Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
}
@Rend("Site Id", Model.Select(m => m.SiteName))
@Rend("Latitude [&deg;]", Model.Select(m => m.Site.Latitude?.ToString()))
@Rend("Longitude [&deg;]", Model.Select(m => m.Site.Longitude?.ToString()))
@Rend("Elevation [m]", Model.Select(m => m.Site.Elevation?.ToString()))
@helper Rend(string label, IEnumerable<string> values)
{
var value = string.Join(", ", values.Distinct());
<div class="row pb-lg-2 pb-sm-1 @if (ViewData.Model == null){<text>d-none</text> }">
<div class="col-sm-3 text-truncate border-right border-bottom pl-4 pl-sm-5">
@Html.Raw(label)
</div>
<div class="col-sm-9 border-bottom pl-5 pl-sm-2">
@value
</div>
</div>
}
@*@grid.GetHtml(columns:
grid.Columns(
grid.Column("SiteId"),
grid.Column("Latitude"),
grid.Column("Longitude"),
grid.Column("Elevation")
),
htmlAttributes: new { @class = "table table-sm table-striped table-bordered table-hover" }
)*@