Add unresponsive status
This commit is contained in:
@@ -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))
|
||||
}
|
||||
@@ -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)
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
@using LeafWeb.WebCms.Controllers
|
||||
@model Tuple<int, string>
|
||||
@model Tuple<int, string, bool>
|
||||
@{
|
||||
var leafInputId = Model.Item1;
|
||||
var identifier = Model.Item2;
|
||||
// true for a link, false for a button
|
||||
var buttonType = Model.Item3 ? "btn-link" : "btn-default";
|
||||
}
|
||||
@using (Html.BeginUmbracoForm<QueueController>("Cancel", null,
|
||||
new { @class = "confirm clearfix", confirm_msg = "Cancelling cannot be undone! Confirm cancelling '" + identifier + "'." }))
|
||||
{
|
||||
<input type="hidden" name="id" value="@leafInputId"/>
|
||||
<button type="submit" class="btn btn-link">
|
||||
<button type="submit" class="btn @buttonType">
|
||||
<span class="glyphicon glyphicon-ban-circle"></span> Cancel
|
||||
</button>
|
||||
}
|
||||
@@ -1,15 +1,17 @@
|
||||
@using LeafWeb.WebCms.Controllers
|
||||
@model Tuple<int, string, bool>
|
||||
@model Tuple<int, string, bool, bool>
|
||||
@{
|
||||
var leafInputId = Model.Item1;
|
||||
var identifier = Model.Item2;
|
||||
var isDeletable = Model.Item3;
|
||||
// true for a link, false for a button
|
||||
var buttonType = Model.Item4 ? "btn-link" : "btn-default";
|
||||
}
|
||||
@using (Html.BeginUmbracoForm<QueueController>("Delete", null,
|
||||
new { @class = "confirm clearfix", confirm_msg = "Deletion cannot be undone! Confirm deleting '" + identifier + "'." }))
|
||||
{
|
||||
<input type="hidden" name="id" value="@leafInputId"/>
|
||||
<button type="submit" class="btn btn-link" @{if (!isDeletable) { <text> disabled="disabled" </text> }}>
|
||||
<button type="submit" class="btn @buttonType" @{if (!isDeletable) { <text> disabled="disabled" </text> }}>
|
||||
<span class="glyphicon glyphicon-remove"></span> Delete
|
||||
</button>
|
||||
}
|
||||
Reference in New Issue
Block a user