@model NzbDrone.Core.Repository.Series
@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{
@*Todo: This breaks when using SQLServer... thoughts?*@
@foreach (var season in Model.Seasons.Where(s => s.SeasonNumber > 0).Reverse())
{
Season @season.SeasonNumber
}
@{var specialSeasons = Model.Seasons.Where(s => s.SeasonNumber == 0).FirstOrDefault();}
@if (specialSeasons != null)
{
Specials
@{Html.Telerik().Grid(specialSeasons.Episodes).Name("seasons_specials")
.TableHtmlAttributes(new {@class = "Grid"})
.Columns(columns =>
{
columns.Bound(c => c.EpisodeNumber).Width(0).Title("Episode");
columns.Bound(c => c.Title);
columns.Bound(c => c.AirDate).Format("{0:d}").Width(0);
})
//.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)).Enabled(false))
.Footer(false)
.Render(); }
Loading...
}
}
@section Scripts{
}