Details and queue management

This commit is contained in:
2017-01-06 08:43:22 -05:00
parent d14e40a36b
commit 42ac27e16f
24 changed files with 260 additions and 51 deletions
+30 -7
View File
@@ -24,17 +24,17 @@
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li class="dropdown-header">Priority</li>
<li>Set High</li>
<li>Set Low</li>
<li>@DetailsLink(item)</li>
<li @if (!item.HasLeafChart)
{
<text>class="disabled"</text>
}>@ChartLink(item)</li>
<li @DisableItem(!item.HasLeafChart)>@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>@DownloadInput(item)</li>
<li @DisableItem(!item.IsComplete)>@DownloadOutputToUser(item)</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>
<li @DisableItem(!item.IsDeletable)>@DeleteLink(item)</li>
</ul>
</div>
</div>
@@ -48,4 +48,27 @@
@helper ChartLink(dynamic item)
{
@Html.Partial("DisplayTemplates/_ChartLink", (int)item.LeafInputId)
}
@helper DownloadInput(dynamic item)
{
<a href="@Url.Action("DownloadInput", "Queue", new {id = item.LeafInputId})">
<span class="glyphicon glyphicon-download"></span> Input
</a>
}
@helper DownloadOutputToUser(dynamic item)
{
<a href="@Url.Action("DownloadOutputToUser", "Queue", new {id = item.LeafInputId})">
<span class="glyphicon glyphicon-download"></span> ToUser
</a>
}
@helper DeleteLink(dynamic item)
{
<a href="@Url.Action("Delete", "Queue", new {id = item.LeafInputId})">
<span class="glyphicon glyphicon-remove"></span> Delete
</a>
}
@helper DisableItem(bool disabled)
{
if (disabled) {<text>class="disabled"</text>}
}