2012-04-21 08:16:15 +00:00
@using DataTables.Mvc.Core
2012-05-10 16:17:09 +00:00
@using SortDirection = DataTables.Mvc.Core.Enum.SortDirection
2012-04-23 07:38:42 +00:00
@model IEnumerable<NzbDrone.Web.Models.SearchHistoryModel>
2012-04-21 08:16:15 +00:00
@{
ViewBag.Title = "Search Results";
}
2012-04-21 08:25:42 +00:00
@Html.GridHtml("searchResultsGrid", "dataTablesGrid no-details")
2012-04-21 08:16:15 +00:00
@section Scripts
{
2012-05-10 16:17:09 +00:00
@(Html.GridScriptForModel("#searchResultsGrid")
.PageLength(20)
.ChangePageLength(false)
.AddColumn(new Column().DataProperty("DisplayName").Link("SearchHistory/Details?searchId={Id}", "{DisplayName}", null).Title("Name"))
.AddColumn(new Column().DataProperty("SearchTime").Title("Time").Width("170px"))
.AddColumn(new Column().DataProperty("ReportCount").Title("Reports Found").Width("140px"))
2012-10-19 15:07:28 +00:00
.AddColumn(new Column().DataProperty("Successful").Title("Successful").Width("110px"))
//.AddColumn(new Column().Image("/Content/Images/{Successful}.png", new { alt = "{Successful}", title = "{Successful}", @class = "gridImage" }, "{Successful}").Title("Successful").Width("110px"))
2012-09-26 15:51:02 +00:00
.AddSorting(1, SortDirection.Desc)
.Language(new Language().EmptyTable("No search results available").ZeroRecords("No results match the filter")))
2012-04-21 08:16:15 +00:00
}