Add search query
This commit is contained in:
+12
-105
@@ -22,7 +22,11 @@
|
||||
<i class="fa fa-file-o"></i> 100: <strong>@Model.TimeInProgressEstimater.EstimateTimeInProgress(100).ToRoundedReadableString()</strong>*@
|
||||
</div>
|
||||
<div class="col-12 col-sm-9">
|
||||
@Html.Partial("_LeafDataQuery", Model.Q)
|
||||
@Html.Partial("_LeafDataQuery", Model.Q,
|
||||
new ViewDataDictionary{
|
||||
{"actionName", "Search"},
|
||||
{"controllerName", "Queue"},
|
||||
{"htmlFormAction", "/admin/manage-queue/"}})
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -42,87 +46,27 @@
|
||||
</div>
|
||||
<div class="row justify-content-end">
|
||||
<div class="col-sm">@grid.PagerList()</div>
|
||||
<div class="col-sm col-lg-5 pl-4 pt-3 pt-sm-0" >
|
||||
<div class="col-sm col-lg-5 pl-4 pt-3 pt-sm-0">
|
||||
<span class="pr-2">Download Results</span>
|
||||
@DownloadResults()
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<p>No results.</p>
|
||||
}
|
||||
|
||||
@helper Actions(LeafInput leafInput)
|
||||
{
|
||||
@Html.Partial("_LeafInputActions", leafInput, new ViewDataDictionary {{"admin", true}})
|
||||
}
|
||||
|
||||
@helper Status(LeafInput leafInput)
|
||||
{
|
||||
@Html.Partial("DisplayTemplates/_LeafInputStatus", leafInput)
|
||||
}
|
||||
|
||||
@helper Actions(LeafInput item)
|
||||
{
|
||||
<div class="btn-group text-nowrap" role="group">
|
||||
<div class="btn-group" role="group">
|
||||
<button id="actions(@item.Id)" type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle"
|
||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" title="Actions">
|
||||
<span class="d-none d-sm-inline">Actions</span>
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="actions(@item.Id)">
|
||||
@DetailsLink(item)
|
||||
@ChartLink(item)
|
||||
@if (item.IsPending)
|
||||
{
|
||||
<div class="dropdown-divider"></div>
|
||||
<h6 class="dropdown-header">Priority</h6>
|
||||
<button class="dropdown-item @DisableItem(item.PendingPriority == Priority.High)">@PriorityForm(item, Priority.High)</button>
|
||||
<button class="dropdown-item @DisableItem(item.PendingPriority == Priority.Normal)">@PriorityForm(item, Priority.Normal)</button>
|
||||
<button class="dropdown-item @DisableItem(item.PendingPriority == Priority.Low)">@PriorityForm(item, Priority.Low)</button>
|
||||
}
|
||||
@if (item.IsCancellable)
|
||||
{
|
||||
<div class="dropdown-divider"></div>
|
||||
@CancelLink(item)
|
||||
}
|
||||
<div class="dropdown-divider"></div>
|
||||
<h6 class="dropdown-header">Download</h6>
|
||||
@DownloadInput(item)
|
||||
@DownloadOutputToUser(item)
|
||||
<div class="dropdown-divider"></div>
|
||||
@DeleteLink(item)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@helper DetailsLink(dynamic item)
|
||||
{
|
||||
var cssClass = CssClassUtil.CreateCssClassDataDictionary("dropdown-item");
|
||||
|
||||
@Html.Partial("DisplayTemplates/_DetailsLink", (int)item.Id, cssClass)
|
||||
}
|
||||
|
||||
@helper ChartLink(dynamic item)
|
||||
{
|
||||
var cssClass = CssClassUtil.CreateCssClassDataDictionary("dropdown-item");
|
||||
|
||||
if (!item.HasLeafChart)
|
||||
{
|
||||
cssClass.SetCssDisabled();
|
||||
}
|
||||
@Html.Partial("DisplayTemplates/_ChartLink", (int)item.Id, cssClass)
|
||||
}
|
||||
|
||||
@helper DownloadInput(dynamic item)
|
||||
{
|
||||
<a href="@Url.Action("DownloadInput", "Queue", new {id = item.Id})" class="dropdown-item">
|
||||
<span class="fa fa-download"></span> Input
|
||||
</a>
|
||||
}
|
||||
@helper DownloadOutputToUser(dynamic item)
|
||||
{
|
||||
<a href="@Url.Action("DownloadOutputToUser", "Queue", new {id = item.Id})" class="dropdown-item @DisableItem(!item.HasOutputFiles)">
|
||||
<span class="fa fa-download"></span> ToUser
|
||||
</a>
|
||||
}
|
||||
@helper Statistics(LeafInput leafInput)
|
||||
{
|
||||
var summary = new List<string> { "Added Time: " + leafInput.Added };
|
||||
@@ -162,43 +106,6 @@ else
|
||||
}
|
||||
</span>
|
||||
}
|
||||
@helper DeleteLink(LeafInput item)
|
||||
{
|
||||
var cssClass
|
||||
= CssClassUtil.CreateCssClassDataDictionary("dropdown-item");
|
||||
if (!item.IsDeletable)
|
||||
{
|
||||
cssClass.SetCssDisabled();
|
||||
}
|
||||
@Html.Partial("DisplayTemplates/_DeleteForm", Tuple.Create(item.Id, item.Identifier), cssClass)
|
||||
}
|
||||
|
||||
@helper CancelLink(LeafInput item)
|
||||
{
|
||||
var cssClass
|
||||
= CssClassUtil.CreateCssClassDataDictionary("dropdown-item");
|
||||
if (!item.IsCancellable)
|
||||
{
|
||||
cssClass.SetCssDisabled();
|
||||
}
|
||||
@Html.Partial("DisplayTemplates/_CancelForm", Tuple.Create(item.Id, item.Identifier), cssClass)
|
||||
}
|
||||
|
||||
@helper PriorityForm(LeafInput item, Priority priority)
|
||||
{
|
||||
var cssClass
|
||||
= CssClassUtil.CreateCssClassDataDictionary("dropdown-item");
|
||||
|
||||
@Html.Partial("DisplayTemplates/_PriorityForm", Tuple.Create(item.Id, item.PendingPriority, priority), cssClass)
|
||||
}
|
||||
|
||||
@helper DisableItem(bool disabled)
|
||||
{
|
||||
if (disabled)
|
||||
{<text>disabled</text>}
|
||||
}
|
||||
|
||||
|
||||
@helper DownloadResults()
|
||||
{
|
||||
<div class="btn-group" role="group" aria-label="Download">
|
||||
|
||||
Reference in New Issue
Block a user