From 71e1827ef872ab4e8618a9584a7dc9a00bce0165 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Fri, 30 Sep 2011 09:18:13 -0700 Subject: [PATCH] Missing Grid uses ToBestDateString for formatting. Fixed padding for No Data being cut off (also when loading) for the grids. --- NzbDrone.Web/Content/Grid.css | 5 +++++ NzbDrone.Web/Controllers/MissingController.cs | 2 ++ NzbDrone.Web/Models/MissingEpisodeModel.cs | 1 + NzbDrone.Web/Views/Missing/Index.cshtml | 3 ++- 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/NzbDrone.Web/Content/Grid.css b/NzbDrone.Web/Content/Grid.css index 346291666..f690f9ada 100644 --- a/NzbDrone.Web/Content/Grid.css +++ b/NzbDrone.Web/Content/Grid.css @@ -37,4 +37,9 @@ .t-grid td { padding: 0em 0.6em; +} + +.t-no-data td +{ + padding: 0.6em 0.6em; } \ No newline at end of file diff --git a/NzbDrone.Web/Controllers/MissingController.cs b/NzbDrone.Web/Controllers/MissingController.cs index 8ac0724c1..ffae561c4 100644 --- a/NzbDrone.Web/Controllers/MissingController.cs +++ b/NzbDrone.Web/Controllers/MissingController.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; +using NzbDrone.Core; using NzbDrone.Core.Providers; using NzbDrone.Web.Models; using Telerik.Web.Mvc; @@ -38,6 +39,7 @@ namespace NzbDrone.Web.Controllers Overview = e.Overview, SeriesTitle = e.Series.Title, AirDate = e.AirDate.Value, + AirDateString = e.AirDate.Value.ToBestDateString() }); return View(new GridModel(missing)); diff --git a/NzbDrone.Web/Models/MissingEpisodeModel.cs b/NzbDrone.Web/Models/MissingEpisodeModel.cs index 95ec9ff3d..4a949b372 100644 --- a/NzbDrone.Web/Models/MissingEpisodeModel.cs +++ b/NzbDrone.Web/Models/MissingEpisodeModel.cs @@ -13,6 +13,7 @@ namespace NzbDrone.Web.Models public int EpisodeNumber { get; set; } public string EpisodeTitle { get; set; } public DateTime AirDate { get; set; } + public string AirDateString { get; set; } public string Overview { get; set; } } } \ No newline at end of file diff --git a/NzbDrone.Web/Views/Missing/Index.cshtml b/NzbDrone.Web/Views/Missing/Index.cshtml index c55a4e99c..4abc3f2bd 100644 --- a/NzbDrone.Web/Views/Missing/Index.cshtml +++ b/NzbDrone.Web/Views/Missing/Index.cshtml @@ -20,7 +20,8 @@ Missing columns.Bound(c => c.SeasonNumber).Title("Season").Width(40); columns.Bound(c => c.EpisodeNumber).Title("Episode").Width(40); columns.Bound(c => c.EpisodeTitle).Title("Episode Title"); - columns.Bound(c => c.AirDate).Format("{0:d}") + columns.Bound(c => c.AirDate) + .ClientTemplate("<#= AirDateString #>") .Title("Air Date") .Width(80); columns.Bound(c => c.EpisodeId)