Missing Grid uses ToBestDateString for formatting.

Fixed padding for No Data being cut off (also when loading) for the grids.
This commit is contained in:
Mark McDowall 2011-09-30 09:18:13 -07:00
parent 30ffe79442
commit 71e1827ef8
4 changed files with 10 additions and 1 deletions

View File

@ -38,3 +38,8 @@
{
padding: 0em 0.6em;
}
.t-no-data td
{
padding: 0.6em 0.6em;
}

View File

@ -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));

View File

@ -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; }
}
}

View File

@ -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)