Add object for results details

This commit is contained in:
2020-07-18 21:39:18 -04:00
parent 1e7fa1bb1d
commit 28377cfce8
14 changed files with 156 additions and 33 deletions
+61
View File
@@ -0,0 +1,61 @@
@using LeafWeb.WebCms.Utility
@model LeafInputDetails_Admin
<div class="row pb-3">
@ChartLink(Model)
<div class="dropdown pl-3">
<button class="btn btn-outline-secondary dropdown-toggle" id="downloadButton"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="fa fa-download"></span> Download
</button>
<div class="dropdown-menu" aria-labelledby="downloadButton">
<a href="@Url.Action("DownloadInput", "Queue", new {id = Model.LeafInputId})"
class="dropdown-item">
Input
</a>
<a href="@Url.Action("DownloadOutputToUser", "Queue", new {id = Model.LeafInputId})"
class="dropdown-item @if (!Model.HasOutputFiles) {<text> disabled</text>}">
ToUser
</a>
</div>
</div>
@if (Model.IsCancellable)
{
<div class="pl-3">
@CancelLink(Model)
</div>
}
</div>
<div class="row">
<div class="container">
@Html.DisplayForModel()
</div>
</div>
@helper ChartLink(dynamic item)
{
var cssClass
= CssClassUtil.CreateCssClassDataDictionary("btn", "btn-outline-secondary");
if (!item.HasLeafChart)
{
cssClass.SetCssDisabled();
}
@Html.Partial("DisplayTemplates/_ChartLink", (int)item.LeafInputId, cssClass)
}
@helper CancelLink(LeafInputDetails_Admin item)
{
var cssClass
= CssClassUtil.CreateCssClassDataDictionary("btn", "btn-outline-secondary");
if (!item.IsCancellable)
{
cssClass.SetCssDisabled();
}
@Html.Partial("DisplayTemplates/_CancelForm", Tuple.Create(item.LeafInputId, item.Identifier), cssClass)
}