Add unresponsive status

This commit is contained in:
2018-09-12 21:23:47 -04:00
parent 91d9efa7f7
commit 62e4e156ae
13 changed files with 106 additions and 61 deletions
+18 -15
View File
@@ -4,22 +4,22 @@
<div class="row">
<div class="col-sm-3 divider-right detail-actions">
<h3>Actions</h3>
@Html.Partial("DisplayTemplates/_ChartButton", Model.LeafInputId, new ViewDataDictionary { { "Disabled", !Model.HasLeafChart } })
<a href="@Url.Action("DownloadInput", "Queue", new {id = Model.LeafInputId})"
class="btn btn-default" role="button">
class="btn btn-default" role="button">
<span class="glyphicon glyphicon-download"></span> Download Input
</a>
<a href="@Url.Action("DownloadOutputToUser", "Queue", new {id = Model.LeafInputId})"
class="btn btn-default@{if (!Model.HasOutputFiles)
class="btn btn-default@{if (!Model.HasOutputFiles)
{<text> disabled</text>}}" role="button">
<span class="glyphicon glyphicon-download"></span> Download ToUser
</a>
<a href="@Url.Action("DownloadOutputNotToUser", "Queue", new {id = Model.LeafInputId})"
class="btn btn-default@{if (!Model.HasOutputFiles)
class="btn btn-default@{if (!Model.HasOutputFiles)
{<text> disabled</text>}}" role="button">
<span class="glyphicon glyphicon-download"></span> Download NotToUser
</a>
@@ -32,22 +32,25 @@
<span class="glyphicon glyphicon-send"></span> Email User Download link
</button>
}
@if (Model.IsCancellable)
{
@CancelLink(Model)
}
@DeleteLink(Model.LeafInputId, Model.Identifier, Model.IsDeletable)
@DeleteLink(Model)
</div>
<div class="col-sm-9">
@Html.DisplayForModel()
</div>
</div>
@helper DeleteLink(int id, string identifier, bool deletable)
@helper DeleteLink(LeafInputDetails item)
{
using (Html.BeginUmbracoForm<QueueController>(
"Delete", null, new { @class = "confirm", confirm_msg = "Deletion cannot be undone! Confirm deleting '" + identifier + "'." }))
{
<input type="hidden" name="id" value="@id" />
<button type="submit" class="btn btn-default" @{if (!deletable) { <text> disabled="disabled" </text> }}>
<span class="glyphicon glyphicon-remove"></span> Delete
</button>
}
@Html.Partial("DisplayTemplates/_DeleteForm", Tuple.Create(item.LeafInputId, item.Identifier, item.IsDeletable, false))
}
@helper CancelLink(LeafInputDetails item)
{
@Html.Partial("DisplayTemplates/_CancelForm", Tuple.Create(item.LeafInputId, item.Identifier, false))
}
+5 -5
View File
@@ -146,17 +146,17 @@ else
}
@helper DeleteLink(LeafInput item)
{
@Html.Partial("DisplayTemplates/_DeleteForm", Tuple.Create(item.Id, item.Identifier, item.IsDeletable))
@Html.Partial("DisplayTemplates/_DeleteForm", Tuple.Create(item.Id, item.Identifier, item.IsDeletable, true))
}
@helper CancelLink(dynamic item)
@helper CancelLink(LeafInput item)
{
@Html.Partial("DisplayTemplates/_CancelForm", (Tuple<int, string>)Tuple.Create(item.Id, item.Identifier))
@Html.Partial("DisplayTemplates/_CancelForm", Tuple.Create(item.Id, item.Identifier, true))
}
@helper PriorityForm(dynamic item, Priority priority)
@helper PriorityForm(LeafInput item, Priority priority)
{
@Html.Partial("DisplayTemplates/_PriorityForm", (Tuple<int, Priority, Priority>)Tuple.Create(item.Id, item.PendingPriority, priority))
@Html.Partial("DisplayTemplates/_PriorityForm", Tuple.Create(item.Id, item.PendingPriority, priority))
}
@helper DisableItem(bool disabled)