Add search query
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
@using LeafWeb.Core.Entities
|
||||
@using LeafWeb.WebCms.Utility
|
||||
@model SearchViewModel
|
||||
@{
|
||||
var grid = new WebGrid(Model.Items, rowsPerPage: 45);
|
||||
}
|
||||
|
||||
<div class="row align-items-end">
|
||||
<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">
|
||||
@Html.Partial("_LeafDataQuery", Model.Q,
|
||||
new ViewDataDictionary{
|
||||
{"actionName", "Search"},
|
||||
{"controllerName", "Results"},
|
||||
{"htmlFormAction", "/leaf-data/search/"}})
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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" }
|
||||
)
|
||||
@grid.PagerList()
|
||||
</div>
|
||||
|
||||
|
||||
@helper Actions(LeafInput leafInput)
|
||||
{
|
||||
@Html.Partial("_LeafInputActions", leafInput)
|
||||
}
|
||||
|
||||
@helper Status(LeafInput leafInput)
|
||||
{
|
||||
@Html.Partial("DisplayTemplates/_LeafInputStatus", leafInput)
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
@using LeafWeb.Core.Entities
|
||||
@using LeafWeb.WebCms.Utility
|
||||
@model IQueryable<LeafInput>
|
||||
@{
|
||||
var grid = new WebGrid(Model, rowsPerPage: 45);
|
||||
}
|
||||
dfdf
|
||||
<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("", "", item => ChartLink(item.Value))
|
||||
),
|
||||
htmlAttributes: new { @class = "table table-sm table-striped table-bordered table-hover" }
|
||||
)
|
||||
@grid.PagerList()
|
||||
</div>
|
||||
|
||||
@helper ChartLink(LeafInput leafInput)
|
||||
{
|
||||
var cssClass = CssClassUtil.CreateCssClassDataDictionary("btn", " btn-outline-secondary", "btn-sm");
|
||||
if (!leafInput.HasLeafChart)
|
||||
{
|
||||
cssClass.SetCssDisabled();
|
||||
}
|
||||
@Html.Partial("DisplayTemplates/_ChartButton", leafInput.Id, cssClass)
|
||||
}
|
||||
|
||||
@helper Status(LeafInput leafInput)
|
||||
{
|
||||
@Html.Partial("DisplayTemplates/_LeafInputStatus", leafInput)
|
||||
}
|
||||
Reference in New Issue
Block a user