@model NzbDrone.Web.Models.SeriesModel @using NzbDrone.Core.Repository @using NzbDrone.Web.Models @section TitleContent{ @Model.Title } @section ActionMenu{ } @section MainContent{
@foreach (var season in Model.Seasons) { var ignoreSeason = "ignoreSeason_" + season;
@(season == 0 ? "Specials" : "Season " + season)
}
@foreach (var season in Model.Seasons.Where(s => s > 0).Reverse()) {

Season @season

@{ Html.Telerik().Grid().Name("seasons_" + season) .TableHtmlAttributes(new { @class = "Grid" }) .Columns(columns => { columns.Bound(o => o.Ignored) .Title("") .ClientTemplate( "") .Width(20) .HtmlAttributes(new { style = "text-align:center" }); columns.Bound(c => c.EpisodeNumber).Width(0).Title("Episode"); columns.Bound(c => c.Title).Title("Title"); columns.Bound(c => c.AirDate).Width(0); columns.Bound(c => c.Quality).Width(0); columns.Bound(c => c.Status).Width(0); columns.Bound(o => o.EpisodeId).Title("") .ClientTemplate("'); return false;\">Search" + " | " + "'); return false;\">Rename"); }) .DetailView(detailView => detailView.ClientTemplate("
<#= Overview #>
<#= Path #>
")) .Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber).Descending()).Enabled(false)) .Footer(true) .DataBinding( d => d.Ajax().Select("_AjaxSeasonGrid", "Series", new RouteValueDictionary { { "seriesId", Model.SeriesId }, { "seasonNumber", season } })) .ToolBar( c => c.Custom().Text("Rename Season").Action("RenameSeason", "Series", new { seasonId = season }) .ButtonType(GridButtonType.Text)) .ClientEvents(clientEvents => { clientEvents.OnRowDataBound("grid_rowBound"); clientEvents.OnDataBound("grid_dataBound"); }) .Render();}
} @if (Model.Seasons.Any(s => s == 0)) {

Specials

@{Html.Telerik().Grid().Name("seasons_0") .TableHtmlAttributes(new { @class = "Grid" }) .Columns(columns => { columns.Bound(o => o.Ignored) .Title("") .ClientTemplate( "") .Width(20) .HtmlAttributes(new { style = "text-align:center" }); columns.Bound(c => c.EpisodeNumber).Width(10).Title("Episode"); columns.Bound(c => c.Title).Title("Title").Width(10000); columns.Bound(c => c.AirDate).Width(10); columns.Bound(c => c.Quality).Width(10); columns.Bound(c => c.Status).Width(10); }) .DetailView(detailView => detailView.ClientTemplate("
<#= Overview #>
<#= Path #>
")) .Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber).Descending()).Enabled(false)) .Footer(true) .DataBinding( d => d.Ajax().Select("_AjaxSeasonGrid", "Series", new RouteValueDictionary { { "seriesId", Model.SeriesId }, { "seasonNumber", 0 } })) .ClientEvents(clientEvents => { clientEvents.OnRowDataBound("grid_rowBound"); clientEvents.OnDataBound("grid_dataBound"); }) .Render(); }
} } @section Scripts{ }