From ffdc0f22fb71abc5366729ad7f3bea148d7a04d0 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 10 May 2012 09:17:09 -0700 Subject: [PATCH] Fixed: Search Results will sort by Time Descending instead of Ascending now. --- NzbDrone.Web/Views/SearchHistory/Index.cshtml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/NzbDrone.Web/Views/SearchHistory/Index.cshtml b/NzbDrone.Web/Views/SearchHistory/Index.cshtml index d48c51ec3..81f4209e6 100644 --- a/NzbDrone.Web/Views/SearchHistory/Index.cshtml +++ b/NzbDrone.Web/Views/SearchHistory/Index.cshtml @@ -1,4 +1,5 @@ @using DataTables.Mvc.Core +@using SortDirection = DataTables.Mvc.Core.Enum.SortDirection @model IEnumerable @{ @@ -9,14 +10,12 @@ @section Scripts { - @( - 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")) - .AddColumn(new Column().Image("/Content/Images/{Successful}.png", new { alt = "{Successful}", title = "{Successful}", @class = "gridImage" }, "{Successful}").Title("Successful").Width("110px")) - .AddSorting(1) - ) + @(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")) + .AddColumn(new Column().Image("/Content/Images/{Successful}.png", new { alt = "{Successful}", title = "{Successful}", @class = "gridImage" }, "{Successful}").Title("Successful").Width("110px")) + .AddSorting(1, SortDirection.Desc)) }