Replace WebGridBootstrapPager
Improve Leaf details page
This commit is contained in:
@@ -1,17 +1,23 @@
|
||||
@model IEnumerable<LeafInputDataSiteViewModel>
|
||||
@using System.Collections.ObjectModel
|
||||
@model IEnumerable<LeafInputDataSiteViewModel>
|
||||
@{
|
||||
//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()));
|
||||
}
|
||||
|
||||
@helper Rend(string label, string value)
|
||||
@Rend("Site Id", Model.Select(m => m.SiteId))
|
||||
@Rend("Latitude [°]", Model.Select(m => m.Latitude?.ToString()))
|
||||
@Rend("Longitude [°]", Model.Select(m => m.Longitude?.ToString()))
|
||||
@Rend("Elevation [m]", Model.Select(m => m.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">
|
||||
@label
|
||||
<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">
|
||||
<div class="col-sm-9 border-bottom pl-5 pl-sm-2">
|
||||
@value
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
new { @class = "confirm clearfix", confirm_msg = "Cancelling cannot be undone! Confirm cancelling '" + identifier + "'." }))
|
||||
{
|
||||
<input type="hidden" name="id" value="@leafInputId"/>
|
||||
<button type="submit" @Html.Partial("DisplayTemplates/_ViewDataCssClass") @if(ViewData.IsButtonDisabled()) {<text>disabled</text>}>
|
||||
<button type="submit" @Html.Partial("DisplayTemplates/_ViewDataCssClass") @if(ViewData.IsCssDisabled()) {<text>disabled</text>}>
|
||||
<span class="fa fa-ban"></span> Cancel
|
||||
</button>
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
new { @class = "confirm clearfix", confirm_msg = "Deletion cannot be undone! Confirm deleting '" + identifier + "'." }))
|
||||
{
|
||||
<input type="hidden" name="id" value="@leafInputId"/>
|
||||
<button type="submit" @Html.Partial("DisplayTemplates/_ViewDataCssClass") @if(ViewData.IsButtonDisabled()) {<text>disabled</text>}>
|
||||
<button type="submit" @Html.Partial("DisplayTemplates/_ViewDataCssClass") @if(ViewData.IsCssDisabled()) {<text>disabled</text>}>
|
||||
<span class="fa fa-remove"></span> Delete
|
||||
</button>
|
||||
}
|
||||
Reference in New Issue
Block a user