Search for both LeafInput and LeafInputData
This commit is contained in:
@@ -1,70 +1,15 @@
|
||||
@using LeafWeb.Core.Entities
|
||||
@using LeafWeb.WebCms.Controllers
|
||||
@using LeafWeb.WebCms.Utility
|
||||
@model SearchViewModel
|
||||
@{
|
||||
var grid = new WebGrid(Model.Items, rowsPerPage: 45);
|
||||
}
|
||||
@model SearchLeafInputViewModel
|
||||
|
||||
<div class="row align-items-end mb-3">
|
||||
<div class="col-3 order-last order-sm-first font-italic font-weight-light ">
|
||||
<strong>@Model.Items.Count()</strong> results
|
||||
</div>
|
||||
<div class="col-12 col-sm-9">
|
||||
<div class="row align-items-end">
|
||||
<div class="col-12 col-md-9 offset-md-3">
|
||||
@Html.Partial("_LeafDataQuery", Model.Q,
|
||||
new ViewDataDictionary{
|
||||
{"actionName", "Search"},
|
||||
{"controllerName", "Results"},
|
||||
{"htmlFormAction", "/services/search/"}})
|
||||
{"actionName", "Search"},
|
||||
{"controllerName", "Results"},
|
||||
{"htmlFormAction", "/services/search/"},
|
||||
{"expand", true}})
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (Model.Items.Any())
|
||||
{
|
||||
<div class="table-responsive">
|
||||
@grid.Table(columns:
|
||||
grid.Columns(
|
||||
grid.Column("Identifier", "Identifier"),
|
||||
grid.Column("SiteId", "Site Id"),
|
||||
//grid.Column("Name", "Submitted By"),
|
||||
grid.Column("CurrentStatus", "Status", item => Status(item.Value)),
|
||||
grid.Column("", format: item => Actions(item.Value), canSort: false)
|
||||
),
|
||||
htmlAttributes: new { @class = "table table-sm table-striped table-bordered table-hover" }
|
||||
)
|
||||
</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">
|
||||
<span class="pr-2">Download Results</span>
|
||||
@DownloadResults()
|
||||
</div>*@
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<p>No results. <a href="@UmbracoContext.Current.UrlProvider.GetUrl(LeafWebPageIds.LeafInputCreate)">Click here to submit Leaf Data.</a></p>
|
||||
}
|
||||
|
||||
|
||||
@helper Actions(LeafInput leafInput)
|
||||
{
|
||||
@Html.Partial("_LeafInputActions", leafInput)
|
||||
}
|
||||
|
||||
@helper Status(LeafInput leafInput)
|
||||
{
|
||||
@Html.Partial("DisplayTemplates/_LeafInputStatus", leafInput)
|
||||
}
|
||||
|
||||
@helper DownloadResults()
|
||||
{
|
||||
<div class="btn-group" role="group" aria-label="Download">
|
||||
<a class="btn btn-outline-secondary small" role="button" href="@Url.Action("ResultsInputZip", "Download", Model.Q.GetNameValueCollection().ToRouteValueDictionary())">
|
||||
<span class="fa fa-download"></span> Input
|
||||
</a>
|
||||
<a class="btn btn-outline-secondary small" role="button" href="@Url.Action("ResultsOutputZip", "Download", Model.Q.GetNameValueCollection().ToRouteValueDictionary())">
|
||||
<span class="fa fa-download"></span> Output
|
||||
</a>
|
||||
</div>
|
||||
}
|
||||
Reference in New Issue
Block a user