From 74e78434b3cd2cd7addee6e3493dbe58dde1d9dd Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 10 May 2012 09:53:37 -0700 Subject: [PATCH] Fixed: Missing grid failing when too many episodes were missing. --- NzbDrone.Web/Controllers/MissingController.cs | 4 +- NzbDrone.Web/Views/Missing/Index.cshtml | 139 +++++++----------- 2 files changed, 54 insertions(+), 89 deletions(-) diff --git a/NzbDrone.Web/Controllers/MissingController.cs b/NzbDrone.Web/Controllers/MissingController.cs index ec13dd92c..0afc635bc 100644 --- a/NzbDrone.Web/Controllers/MissingController.cs +++ b/NzbDrone.Web/Controllers/MissingController.cs @@ -37,9 +37,9 @@ namespace NzbDrone.Web.Controllers AirDateString = e.AirDate.Value.ToBestDateString() }); - var serialized = new JavaScriptSerializer().Serialize(missing); + //var serialized = new JavaScriptSerializer().Serialize(missing); - return View((object)serialized); + return View(missing); } } } diff --git a/NzbDrone.Web/Views/Missing/Index.cshtml b/NzbDrone.Web/Views/Missing/Index.cshtml index f2a1a16a5..646ce7b85 100644 --- a/NzbDrone.Web/Views/Missing/Index.cshtml +++ b/NzbDrone.Web/Views/Missing/Index.cshtml @@ -1,5 +1,7 @@ -@model String +@model IEnumerable +@using DataTables.Mvc.Core @using NzbDrone.Web.Helpers +@using SortDirection = DataTables.Mvc.Core.Enum.SortDirection @{ViewBag.Title = "Missing";} @section ActionMenu{ @@ -9,94 +11,57 @@
  • @Ajax.ActionLink("Start Recent Backlog Search", "RecentBacklogSearch", "Command", null, null, new { title = "Search and download missing episodes that aired in the last 30 days" })
  • } -
    - - - - - - - - @*Commands Column*@ - - - - - @*@foreach(var history in Model) - { - Html.RenderPartial("History", history); - }*@ - -
    - Series Title - - Episode - - Episode Title - - AirDate - - - - @*Details Column*@ - - Details -
    -
    + +@Html.GridHtml("missingGrid", "dataTablesGrid") + @section Scripts { - }