@model SeriesModel @using NzbDrone.Web.Helpers @using NzbDrone.Web.Models @{ViewBag.Title = Model.Title;} @section HeaderContent { @Html.IncludeCss("Grid.css") } @{ ViewBag.Title = Model.Title; } @section ActionMenu{ }
@foreach (var season in Model.Seasons) { var ignoreSeason = "ignoreSeason_" + season;
@(season == 0 ? "Specials" : "Season " + season)
}
@foreach (var s in Model.Seasons.Reverse()) { var seriesId = @Model.SeriesId; var season = s;

@(season == 0 ? "Specials" : "Season " + season)

Html.Telerik().Grid().Name("seasons_" + season) .TableHtmlAttributes(new { @class = "Grid" }) .Columns(columns => { columns.Bound(c => c.EpisodeNumber).Width(100).Title("Episode #").Sortable(true); columns.Bound(c => c.Title).Title("Title").Sortable(false); columns.Bound(c => c.AirDate).Width(100).Sortable(false); columns.Bound(c => c.Quality).Width(100); columns.Bound(c => c.Status).Sortable(false) .Title("" + "Status" + "Search" + "Rename") .ClientTemplate("" + "<#= Status #>" + "\" onclick=\"searchForEpisode('<#= EpisodeId #>'); return false;\">Search" + "\" onclick=\"renameEpisode('<#= EpisodeFileId #>'); return false;\">Rename") .Width(80); }) .DetailView(detailView => detailView.ClientTemplate("
<#= Overview #>
<#= Path #>
")) .Footer(true) .DataBinding( d => d.Ajax().Select("_AjaxSeasonGrid", "Series", new RouteValueDictionary { { "seriesId", Model.SeriesId }, { "seasonNumber", season } })) .ClientEvents(clientEvents => { clientEvents.OnRowDataBound("grid_rowBound"); clientEvents.OnDataBound("grid_dataBound"); }) .Sortable(sorting => sorting .OrderBy(sortOrder => sortOrder.Add(o => o.EpisodeNumber).Descending()).SortMode(GridSortMode.SingleColumn)) .Render(); } @section Scripts{ @Html.IncludeScript("NzbDrone/seriesDetails.js") }