- @Html.Partial("DisplayTemplates/_ChartButton", Model.LeafInputId, new ViewDataDictionary {{"Disabled", !Model.HasLeafChart}})
+
+ @ChartLink(Model)
-
-
-
-
-
-
+
+
+
+
- @if (Model.IsCancellable)
- {
-
- @CancelLink(Model)
-
- }
-
+ @if (Model.IsCancellable)
+ {
- @DeleteLink(Model)
+ @CancelLink(Model)
+ }
+
+
+ @DeleteLink(Model)
+
+@helper ChartLink(dynamic item)
+{
+ var cssClass
+ = CssClassUtil.CreateCssClassDataDictionary("btn", "btn-outline-secondary");
+
+ if (!item.HasLeafChart)
+ {
+ cssClass.SetButtonDisabled();
+ }
+ @Html.Partial("DisplayTemplates/_ChartLink", (int)item.LeafInputId, cssClass)
+}
+
@helper DeleteLink(LeafInputDetails item)
{
- @Html.Partial("DisplayTemplates/_DeleteForm", Tuple.Create(item.LeafInputId, item.Identifier, item.IsDeletable, false))
+ var cssClass
+ = CssClassUtil.CreateCssClassDataDictionary("btn", "btn-outline-secondary");
+ if (!item.IsDeletable)
+ {
+ cssClass.SetButtonDisabled();
+ }
+
+ @Html.Partial("DisplayTemplates/_DeleteForm", Tuple.Create(item.LeafInputId, item.Identifier), cssClass)
}
@helper CancelLink(LeafInputDetails item)
{
- @Html.Partial("DisplayTemplates/_CancelForm", Tuple.Create(item.LeafInputId, item.Identifier, false))
+ var cssClass
+ = CssClassUtil.CreateCssClassDataDictionary("btn", "btn-outline-secondary");
+ if (!item.IsCancellable)
+ {
+ cssClass.SetButtonDisabled();
+ }
+ @Html.Partial("DisplayTemplates/_CancelForm", Tuple.Create(item.LeafInputId, item.Identifier), cssClass)
}
\ No newline at end of file
diff --git a/WebCms/Views/Queue/Index.cshtml b/WebCms/Views/Queue/Index.cshtml
index 3bee08a..e0a1cdc 100644
--- a/WebCms/Views/Queue/Index.cshtml
+++ b/WebCms/Views/Queue/Index.cshtml
@@ -1,6 +1,6 @@
@using ClientDependency.Core.Mvc
@using LeafWeb.Core.Entities
-@using LeafWeb.WebCms.Controllers
+@using LeafWeb.WebCms.Utility
@model QueueViewModel
@{
@@ -13,16 +13,16 @@
var grid = new WebGrid(Model.Items, rowsPerPage: 45);
}
-@using (Html.BeginUmbracoForm("Search", "Queue", null, new {@action = "/leaf-data/manage-queue/"}))
+@using (Html.BeginUmbracoForm("Search", "Queue", null, new { @action = "/leaf-data/manage-queue/" }))
{
@Model.Items.Count() results
Service description: @Model.ServerDescription
@*Est. processing time by LeafInput size -
- 1: @Model.TimeInProgressEstimater.EstimateTimeInProgress(1).ToRoundedReadableString()
- 10: @Model.TimeInProgressEstimater.EstimateTimeInProgress(10).ToRoundedReadableString()
- 100: @Model.TimeInProgressEstimater.EstimateTimeInProgress(100).ToRoundedReadableString()*@
+ 1: @Model.TimeInProgressEstimater.EstimateTimeInProgress(1).ToRoundedReadableString()
+ 10: @Model.TimeInProgressEstimater.EstimateTimeInProgress(10).ToRoundedReadableString()
+ 100: @Model.TimeInProgressEstimater.EstimateTimeInProgress(100).ToRoundedReadableString()*@
@@ -48,31 +48,31 @@
@Html.EditorFor(m => m.Q.species)
-
+
- @Html.EditorFor(m => m.Q.lat, new {size = "small", append = "°"})
+ @Html.EditorFor(m => m.Q.lat, new { size = "small", append = "°" })
- @Html.EditorFor(m => m.Q.latr, new {size = "small", prepend = "±", append = "°"})
+ @Html.EditorFor(m => m.Q.latr, new { size = "small", prepend = "±", append = "°" })
- @Html.EditorFor(m => m.Q.lon, new {size = "small", append = "°"})
+ @Html.EditorFor(m => m.Q.lon, new { size = "small", append = "°" })
- @Html.EditorFor(m => m.Q.lonr, new {size = "small", prepend = "±", append = "°"})
+ @Html.EditorFor(m => m.Q.lonr, new { size = "small", prepend = "±", append = "°" })
-