@using LeafWeb.Core.Entities
@using LeafWeb.WebCms.Utility
@model SearchLeafInputViewModel
@{
var grid = new WebGrid(Model.Results, rowsPerPage: 45);
}
@Model.Results.Count() results
@Html.Partial("_LeafDataQuery", Model.Q,
new ViewDataDictionary{
{"actionName", "Search"},
{"controllerName", "Results"},
{"htmlFormAction", "/services/search/"}})
@if (Model.Results.Any())
{
@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" }
)
@grid.PagerList()
@*
Download Results
@DownloadResults()
*@
}
else
{
@Html.Partial("NoResults")
}
@helper Actions(LeafInput leafInput)
{
@Html.Partial("_LeafInputActions", leafInput)
}
@helper Status(LeafInput leafInput)
{
@Html.Partial("DisplayTemplates/_LeafInputStatus", leafInput)
}
@helper DownloadResults()
{
}