1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

Added filtering to the missing View.

This commit is contained in:
Mark McDowall 2011-05-02 23:03:49 -07:00
parent 0f170e8a03
commit 7b4ac03748
2 changed files with 14 additions and 6 deletions

View File

@ -29,7 +29,7 @@ public ActionResult _AjaxBinding()
//TODO: possible subsonic bug, IQuarible causes some issues so ToList() is called
//https://github.com/subsonic/SubSonic-3.0/issues/263
var missing = _episodeProvider.EpisodesWithoutFiles(false).Select(e => new MissingEpisodeModel
var missing = _episodeProvider.EpisodesWithoutFiles(true).Select(e => new MissingEpisodeModel
{
EpisodeId = e.EpisodeId,
SeasonNumber = e.SeasonNumber,

View File

@ -1,16 +1,22 @@
@model List<MissingEpisodeModel>
@using NzbDrone.Web.Models;
@section TitleContent{
Missing
}
@section MainContent{
@{Html.Telerik().Grid<MissingEpisodeModel>().Name("missing")
.TableHtmlAttributes(new { @class = "Grid" })
.Columns(columns =>
{
columns.Bound(c => c.SeriesTitle).Title("Series Name");
columns.Bound(c => c.SeasonNumber).Title("Season").Width(1);
columns.Bound(c => c.EpisodeNumber).Title("Episode").Width(1);
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).Title("Air Date").Width(50);
columns.Bound(c => c.AirDate).Format("{0:d}")
.Title("Air Date")
.Width(80);
})
.DetailView(detailView => detailView.ClientTemplate(
"<fieldset>" +
@ -19,10 +25,12 @@
))
.DataBinding(data => data.Ajax().Select("_AjaxBinding", "Missing"))
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.AirDate).Descending()).Enabled(true))
.Filterable(filtering => filtering
.Filters(filters => filters
.Add(o => o.SeasonNumber).IsGreaterThan(0)))
.Pageable(
c =>
c.PageSize(20).Position(GridPagerPosition.Bottom).Style(GridPagerStyles.NextPrevious))
//.Filterable()
//.ClientEvents(c => c.OnRowDataBound("onRowDataBound"))
.Render();}
}