87 lines
2.9 KiB
Plaintext
87 lines
2.9 KiB
Plaintext
@model IEnumerable<ResultStatusViewModel>
|
|
|
|
@{
|
|
var grid = new WebGrid(Model, rowsPerPage: 45);
|
|
}
|
|
|
|
@grid.Table(columns:
|
|
grid.Columns(
|
|
grid.Column("LeafInputIdentifier", "Identifier"),
|
|
grid.Column("LeafInputSiteId", "Site Id"),
|
|
grid.Column("LeafInputName", "Submitted By"),
|
|
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" }
|
|
)
|
|
@grid.BootstrapPager()
|
|
|
|
@helper Btns(dynamic item)
|
|
{
|
|
<div class="btn-group text-nowrap" role="group">
|
|
<div class="btn-group" role="group">
|
|
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
Actions
|
|
<span class="caret"></span>
|
|
</button>
|
|
<ul class="dropdown-menu">
|
|
<li>@DetailsLink(item)</li>
|
|
<li @DisableItem(!item.HasLeafChart)>@ChartLink(item)</li>
|
|
@*<li role="separator" class="divider"></li>
|
|
<li class="dropdown-header">Priority</li>
|
|
<li>@SetPriorityHigh(item, "Set High")</li>
|
|
<li>@SetPriorityLow(item, "Set Low")</li>*@
|
|
<li role="separator" class="divider"></li>
|
|
<li class="dropdown-header">Download</li>
|
|
<li>@DownloadInput(item)</li>
|
|
<li @DisableItem(!item.IsComplete)>@DownloadOutputToUser(item)</li>
|
|
<li role="separator" class="divider"></li>
|
|
<li @DisableItem(!item.IsDeletable)>@DeleteLink(item)</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
@helper DetailsLink(dynamic item)
|
|
{
|
|
@Html.Partial("DisplayTemplates/_DetailsLink", (int)item.LeafInputId)
|
|
}
|
|
|
|
@helper ChartLink(dynamic item)
|
|
{
|
|
@Html.Partial("DisplayTemplates/_ChartLink", (int)item.LeafInputId)
|
|
}
|
|
|
|
@helper SetPriorityHigh(dynamic item, string label)
|
|
{
|
|
<a href="@Url.Action("SetPriorityHigh", "Queue", new {id = item.LeafInputId})">
|
|
<span class="glyphicon glyphicon-arrow-up"></span> @label
|
|
</a>
|
|
}
|
|
@helper SetPriorityLow(dynamic item, string label)
|
|
{
|
|
<a href="@Url.Action("SetPriorityLow", "Queue", new {id = item.LeafInputId})">
|
|
<span class="glyphicon glyphicon-arrow-down"></span> @label
|
|
</a>
|
|
}
|
|
|
|
@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)
|
|
{
|
|
@Html.Partial("DisplayTemplates/_DeleteForm", (Tuple<int, bool>)Tuple.Create(item.LeafInputId, item.IsDeletable))
|
|
}
|
|
|
|
@helper DisableItem(bool disabled)
|
|
{
|
|
if (disabled) {<text>class="disabled"</text>}
|
|
} |