@model NzbDrone.Web.Models.SeriesModel @using NzbDrone.Core.Repository @using NzbDrone.Web.Models @section TitleContent{ @Model.Title } @section ActionMenu{ @{Html.Telerik().Menu().Name("SeriesMenu").Items(items => { items.Add().Text("Back to Series List").Action("Index", "Series"); items.Add().Text("Scan For Episodes on Disk") .Action("SyncEpisodesOnDisk", "Series", new { seriesId = Model.SeriesId }); items.Add().Text("Update Info").Action("UpdateInfo", "Series", new { seriesId = Model.SeriesId }); items.Add().Text("Rename Series").Action("RenameSeries", "Series", new { seriesId = Model.SeriesId }); }).Render();} } @section MainContent{
ID
@Model.SeriesId
Overview
@Model.Overview
Status
@Model.Status
AirTimes
@Model.AirsDayOfWeek.ToString()
Language
Location
@Model.Path
@*Todo: This breaks when using SQLServer... thoughts?*@ @*Easy, don't use SQL Server!!!*@ @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.EpisodeId) .ClientTemplate( "") .Title("") .Width(1) .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).Format("{0:d}").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 #>
")) .ClientEvents(clientEvents => { clientEvents.OnDataBinding("grid_bind"); clientEvents.OnDataBound("grid_bound"); }) .Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber).Descending()).Enabled(true)) .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)) .Render();} Loading Loading...
} @{var specialSeason = Model.Seasons.Where(s => s == 0).FirstOrDefault();} @if (specialSeason != null) {

Specials

@{Html.Telerik().Grid().Name("seasons_specials") .TableHtmlAttributes(new { @class = "Grid" }) .Columns(columns => { columns.Bound(o => o.EpisodeId) .ClientTemplate( "") .Title("") .Width(1) .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).Format("{0:d}").Width(10); columns.Bound(c => c.Quality).Width(10); columns.Bound(c => c.Status).Width(10); }) .DetailView(detailView => detailView.ClientTemplate("
<#= Overview #>
<#= Path #>
")) .ClientEvents(clientEvents => { clientEvents.OnDataBinding("grid_bind"); clientEvents.OnDataBound("grid_bound"); }) .Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber).Descending()).Enabled(true)) .Footer(true) .DataBinding( d => d.Ajax().Select("_AjaxSeasonGrid", "Series", new RouteValueDictionary { { "seriesId", Model.SeriesId }, { "seasonNumber", specialSeason } } )).Render(); } Loading Loading...
} } @section Scripts{ }