44 lines
1.8 KiB
Plaintext
44 lines
1.8 KiB
Plaintext
@model ICollection<LeafInputDataViewModel>
|
|
@{
|
|
//Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
|
}
|
|
<div class="row pb-lg-2 pb-sm-1">
|
|
<div class="col text-truncate border-right border-bottom font-weight-bold">
|
|
Leaf Input Data
|
|
</div>
|
|
</div>
|
|
@RendDistinctValues("Site Id", Model.Select(m => m.SiteName))
|
|
@RendDistinctValues("Latitude [°]", Model.Select(m => m.Site.Latitude?.ToString()))
|
|
@RendDistinctValues("Longitude [°]", Model.Select(m => m.Site.Longitude?.ToString()))
|
|
@RendDistinctValues("Elevation [m]", Model.Select(m => m.Site.Elevation?.ToString()))
|
|
|
|
|
|
@RendValueRange("CO2 response curves (CO2S) range [umol/mol]", curveData => curveData.CO2S)
|
|
@RendValueRange("Light response curves (PARi) range [umol/m2/s]", curveData => curveData.PARi)
|
|
@RendValueRange("Temperature response curves (Tleaf) range [oC]", curveData => curveData.Tleaf)
|
|
@RendValueRange("Fluorometry measurements (PhiPS2) range", curveData => curveData.PhiPS2)
|
|
|
|
@helper RendValueRange(string label, Func<LeafInputDataCurveViewModel, double?> getVar)
|
|
{
|
|
@RendDistinctValues(label, Model.Select(m =>
|
|
m.FilenameOriginal + ": " +
|
|
(m.Data?.Max(getVar) - m.Data?.Min(getVar))), "<br />")
|
|
}
|
|
|
|
@helper RendValue(string label, string value)
|
|
{
|
|
<div class="row pb-lg-2 pb-sm-1 @if (ViewData.Model == null || string.IsNullOrEmpty(value)){<text>d-none</text> }">
|
|
<div class="col-sm-5 border-right border-bottom pl-4 pl-sm-5">
|
|
@Html.Raw(label)
|
|
</div>
|
|
<div class="col-sm-7 border-bottom pl-5 pl-sm-2">
|
|
@Html.Raw(value)
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
@helper RendDistinctValues(string label, IEnumerable<string> values, string seperator = ", ")
|
|
{
|
|
var value = string.Join(seperator, values.Distinct());
|
|
@RendValue(label, value)
|
|
} |