Leaf Input Details
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
@model LeafWeb.WebCms.Models.LeafInputCreate
|
||||
@model LeafWeb.WebCms.Models.LeafInputDetails
|
||||
|
||||
@Html.DisplayForModel()
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
grid.Column("LeafInputIdentifier", "Identifier"),
|
||||
grid.Column("LeafInputSiteId", "Site Id"),
|
||||
grid.Column("LeafInputName", "Submitted By"),
|
||||
grid.Column("CurrentStatus", "Status", item => StatusFormat(item)),
|
||||
grid.Column("CurrentStatus", "Status", item => Html.Partial("DisplayTemplates/_LeafInputStatus", (string)item.CurrentStatus)),
|
||||
grid.Column("Total Results: " + Model.Count(), format: item => Btns(item))),
|
||||
htmlAttributes: new { @class = "table table-striped table-bordered table-hover table-condensed" }
|
||||
)
|
||||
@@ -24,9 +24,15 @@
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>@DetailsLink(item)</li>
|
||||
<li @if(!item.HasLeafChart) { <text>class="disabled"</text> }>@ChartLink(item)</li>
|
||||
<li><a href="@Url.Action("DownloadOutputToUser", "Queue", new {id = item.LeafInputId})"><span class="glyphicon glyphicon-download"></span> Download ToUser</a></li>
|
||||
<li><a href="@Url.Action("DownloadInput", "Queue", new {id = item.LeafInputId})"><span class="glyphicon glyphicon-download"></span> Download Input</a></li>
|
||||
<li @if (!item.HasLeafChart)
|
||||
{
|
||||
<text>class="disabled"</text>
|
||||
}>@ChartLink(item)</li>
|
||||
<li role="separator" class="divider"></li>
|
||||
<li class="dropdown-header">Download</li>
|
||||
<li><a href="@Url.Action("DownloadOutputToUser", "Queue", new {id = item.LeafInputId})"><span class="glyphicon glyphicon-download"></span> ToUser</a></li>
|
||||
<li><a href="@Url.Action("DownloadInput", "Queue", new {id = item.LeafInputId})"><span class="glyphicon glyphicon-download"></span> Input</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
<li><a href="@Url.Action("Delete", "Queue", new {id = item.LeafInputId})"><span class="glyphicon glyphicon-remove"></span> Delete</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -35,15 +41,13 @@
|
||||
|
||||
@helper DetailsLink(dynamic item)
|
||||
{
|
||||
<a href="@UmbracoContext.Current.UrlProvider.GetUrl(1111)?id=@item.LeafInputId"><span class="glyphicon glyphicon-edit"></span> Details</a>
|
||||
@Html.Partial("DisplayTemplates/_DetailsLink", (int)item.LeafInputId)
|
||||
}
|
||||
|
||||
@helper ChartLink(dynamic item)
|
||||
{
|
||||
<a href="@UmbracoContext.Current.UrlProvider.GetUrl(1100)?leafInputId=@item.LeafInputId"><span class="glyphicon glyphicon-stats"></span> Chart</a>
|
||||
}
|
||||
|
||||
@helper StatusFormat(dynamic item)
|
||||
if (item.HasLeafChart)
|
||||
{
|
||||
<span class="status status-@item.CurrentStatus.ToLower()">@item.CurrentStatus</span>
|
||||
@Html.Partial("DisplayTemplates/_ChartLink", (int)item.LeafInputId)
|
||||
}
|
||||
}
|
||||
@@ -9,24 +9,16 @@
|
||||
grid.Column("LeafInputIdentifier", "Identifier"),
|
||||
grid.Column("LeafInputSiteId", "Site Id"),
|
||||
grid.Column("LeafInputName", "Submitted By"),
|
||||
grid.Column("CurrentStatus", "Status", item => statusFormat(item)),
|
||||
grid.Column("Chart", "Chart", item => chartLink(item))
|
||||
grid.Column("CurrentStatus", "Status", item => Html.Partial("DisplayTemplates/_LeafInputStatus", (string)item.CurrentStatus)),
|
||||
grid.Column("Chart", "Chart", item => ChartLink(item))
|
||||
),
|
||||
htmlAttributes: new { @class = "table table-striped table-bordered table-hover table-condensed" }
|
||||
)
|
||||
|
||||
@helper chartLink(dynamic item)
|
||||
@helper ChartLink(dynamic item)
|
||||
{
|
||||
if (item.HasLeafChart)
|
||||
{
|
||||
<a href="@UmbracoContext.Current.UrlProvider.GetUrl(1100)?leafInputId=@item.LeafInputId" class="btn btn-default btn-xs" role="button">
|
||||
<span class="glyphicon glyphicon-stats"></span>
|
||||
Chart
|
||||
</a>
|
||||
@Html.Partial("DisplayTemplates/_ChartLink", (int)item.LeafInputId)
|
||||
}
|
||||
}
|
||||
|
||||
@helper statusFormat(dynamic item)
|
||||
{
|
||||
<span class="status status-@item.CurrentStatus.ToLower()">@item.CurrentStatus</span>
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
||||
}
|
||||
@Html.Encode(Model)
|
||||
@@ -0,0 +1,10 @@
|
||||
@using System.Globalization
|
||||
@model DateTime
|
||||
@{
|
||||
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
||||
var val =
|
||||
ViewData.ModelMetadata.DisplayFormatString != null
|
||||
?string.Format(ViewData.ModelMetadata.DisplayFormatString, Model)
|
||||
: Model.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
@Html.Encode(val)
|
||||
@@ -0,0 +1,14 @@
|
||||
@using System.Globalization
|
||||
@model DateTime?
|
||||
@{
|
||||
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
||||
var val =
|
||||
Model.HasValue
|
||||
?
|
||||
ViewData.ModelMetadata.DisplayFormatString != null
|
||||
? string.Format(ViewData.ModelMetadata.DisplayFormatString, Model)
|
||||
: Model.Value.ToString(CultureInfo.InvariantCulture)
|
||||
: string.Empty;
|
||||
}
|
||||
|
||||
@(Model == null ? Html.Encode(ViewData.ModelMetadata.NullDisplayText) : Html.Encode(val))
|
||||
@@ -0,0 +1,4 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
||||
}
|
||||
@Html.Encode(Model)
|
||||
@@ -0,0 +1,4 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
||||
}
|
||||
<a href="mailto:@Model">@Html.Encode(Model)</a>
|
||||
@@ -0,0 +1,4 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
||||
}
|
||||
@Html.Encode(Model)
|
||||
@@ -0,0 +1,17 @@
|
||||
@model IEnumerable<LeafWeb.WebCms.Models.LeafInputStatusViewModel>
|
||||
@{
|
||||
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
||||
var grid = new WebGrid(Model, rowsPerPage: 45);
|
||||
grid.SortColumn = "DateTime";
|
||||
grid.SortDirection = SortDirection.Descending;
|
||||
}
|
||||
|
||||
@grid.GetHtml(columns:
|
||||
grid.Columns(
|
||||
grid.Column("DateTime", "Time"),
|
||||
grid.Column("Status"),
|
||||
grid.Column("Description"),
|
||||
grid.Column("Details")
|
||||
),
|
||||
htmlAttributes: new { @class = "table table-striped table-bordered table-hover table-condensed" }
|
||||
)
|
||||
@@ -0,0 +1,11 @@
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
@foreach (var prop in ViewData.ModelMetadata.Properties.Where(
|
||||
pm => pm.ShowForDisplay
|
||||
&& !pm.HideSurroundingHtml
|
||||
//&& !pm.ModelType.IsCollection()
|
||||
))
|
||||
{
|
||||
@Html.Display(prop.PropertyName)
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
@model LeafWeb.WebCms.Models.SelectListViewModel
|
||||
@{
|
||||
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
||||
}
|
||||
|
||||
@(!string.IsNullOrEmpty(Model.Selected) ? Model.ListItems.FirstOrDefault(i => i.Value == Model.Selected.ToString()).Text : string.Empty)
|
||||
@@ -0,0 +1,12 @@
|
||||
@model string
|
||||
@{
|
||||
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
||||
}
|
||||
@if (Model == null)
|
||||
{
|
||||
@Html.Encode(ViewData.ModelMetadata.NullDisplayText)
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="status status-@Model.ToFirstLower()">@Html.Encode(Model)</span>
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
||||
}
|
||||
@if (Model == null)
|
||||
{
|
||||
@Html.Encode(ViewData.ModelMetadata.NullDisplayText)
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.Encode(Model)
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
@model int
|
||||
<a href="@UmbracoContext.Current.UrlProvider.GetUrl(1100)?leafInputId=@Model" class="btn btn-default btn-xs" role="button">
|
||||
<span class="glyphicon glyphicon-stats"></span>
|
||||
Chart
|
||||
</a>
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
@model int
|
||||
<a href="@UmbracoContext.Current.UrlProvider.GetUrl(1111)?id=@Model">
|
||||
<span class="glyphicon glyphicon-edit"></span> Details
|
||||
</a>
|
||||
@@ -0,0 +1,19 @@
|
||||
@using LeafWeb.Core.Utility
|
||||
@{
|
||||
Layout = null;
|
||||
var lowerPropertyName = ViewData.ModelMetadata.PropertyName.ToFirstLower();
|
||||
var displayName =
|
||||
string.IsNullOrEmpty(ViewData.ModelMetadata.DisplayName)
|
||||
? ViewData.ModelMetadata.PropertyName.SplitCamelCase()
|
||||
: ViewData.ModelMetadata.DisplayName;
|
||||
// string units = (string)ViewData.ModelMetadata.AdditionalValues.ContainsKey("Units") ? ["Units"];
|
||||
}
|
||||
|
||||
<dl class="dl-horizontal @lowerPropertyName">
|
||||
<dt>
|
||||
@displayName
|
||||
</dt>
|
||||
<dd>
|
||||
@RenderBody()
|
||||
</dd>
|
||||
</dl>
|
||||
@@ -0,0 +1,2 @@
|
||||
@model string
|
||||
<span class="status status-@Model.ToLower()">@Model</span>
|
||||
Reference in New Issue
Block a user