50 lines
2.1 KiB
Plaintext
50 lines
2.1 KiB
Plaintext
@model IEnumerable<LeafWeb.WebCms.Models.ResultStatusViewModel>
|
|
|
|
@{
|
|
var grid = new WebGrid(Model, rowsPerPage: 45);
|
|
}
|
|
|
|
@grid.GetHtml(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" }
|
|
)
|
|
|
|
@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 @if (!item.HasLeafChart)
|
|
{
|
|
<text>class="disabled"</text>
|
|
}>@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 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>
|
|
</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)
|
|
} |