|
|
@ -1,13 +1,10 @@
|
|
|
|
@model NzbDrone.Core.Repository.Series
|
|
|
|
@model NzbDrone.Core.Repository.Series
|
|
|
|
@using NzbDrone.Core.Repository
|
|
|
|
@using NzbDrone.Core.Repository
|
|
|
|
@using NzbDrone.Web.Models
|
|
|
|
@using NzbDrone.Web.Models
|
|
|
|
|
|
|
|
|
|
|
|
@section TitleContent{
|
|
|
|
@section TitleContent{
|
|
|
|
@Model.Title
|
|
|
|
@Model.Title
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@section ActionMenu{
|
|
|
|
@section ActionMenu{
|
|
|
|
|
|
|
|
|
|
|
|
@{Html.Telerik().Menu().Name("SeriesMenu").Items(items =>
|
|
|
|
@{Html.Telerik().Menu().Name("SeriesMenu").Items(items =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
items.Add().Text("Edit").Action("Edit", "Series",
|
|
|
|
items.Add().Text("Edit").Action("Edit", "Series",
|
|
|
@ -20,7 +17,7 @@
|
|
|
|
"Series");
|
|
|
|
"Series");
|
|
|
|
items.Add().Text("Scan For Episodes on Disk").Action(
|
|
|
|
items.Add().Text("Scan For Episodes on Disk").Action(
|
|
|
|
"SyncEpisodesOnDisk", "Series",
|
|
|
|
"SyncEpisodesOnDisk", "Series",
|
|
|
|
new {seriesId = Model.SeriesId});
|
|
|
|
new { seriesId = Model.SeriesId });
|
|
|
|
items.Add().Text("Update Info").Action(
|
|
|
|
items.Add().Text("Update Info").Action(
|
|
|
|
"UpdateInfo", "Series",
|
|
|
|
"UpdateInfo", "Series",
|
|
|
|
new { seriesId = Model.SeriesId });
|
|
|
|
new { seriesId = Model.SeriesId });
|
|
|
@ -35,9 +32,7 @@
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}).Render();}
|
|
|
|
}).Render();}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@section MainContent{
|
|
|
|
@section MainContent{
|
|
|
|
|
|
|
|
|
|
|
|
<fieldset>
|
|
|
|
<fieldset>
|
|
|
|
<div class="display-label">
|
|
|
|
<div class="display-label">
|
|
|
|
ID</div>
|
|
|
|
ID</div>
|
|
|
@ -64,73 +59,67 @@
|
|
|
|
<div class="display-field">
|
|
|
|
<div class="display-field">
|
|
|
|
@Model.Path</div>
|
|
|
|
@Model.Path</div>
|
|
|
|
</fieldset>
|
|
|
|
</fieldset>
|
|
|
|
@*Todo: This breaks when using SQLServer... thoughts?*@
|
|
|
|
@*Todo: This breaks when using SQLServer... thoughts?*@
|
|
|
|
|
|
|
|
@foreach (var season in Model.Seasons.Where(s => s.SeasonNumber > 0).Reverse())
|
|
|
|
@foreach (var season in Model.Seasons.Where(s => s.SeasonNumber > 0).Reverse())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
<h3>Season @season.SeasonNumber</h3>
|
|
|
|
<h3>
|
|
|
|
Season season1 = season;
|
|
|
|
Season @season.SeasonNumber</h3>
|
|
|
|
Html.Telerik().Grid<EpisodeModel>().Name("seasons_" + season.SeasonNumber)
|
|
|
|
Season season1 = season;
|
|
|
|
.TableHtmlAttributes(new { @class = "Grid" })
|
|
|
|
Html.Telerik().Grid<EpisodeModel>().Name("seasons_" + season.SeasonNumber)
|
|
|
|
.Columns(columns =>
|
|
|
|
.TableHtmlAttributes(new { @class = "Grid" })
|
|
|
|
{
|
|
|
|
.Columns(columns =>
|
|
|
|
columns.Bound(o => o.EpisodeId)
|
|
|
|
{
|
|
|
|
.ClientTemplate(
|
|
|
|
columns.Bound(o => o.EpisodeId)
|
|
|
|
"<input type='checkbox' name='checkedEpisodes' value='<#= EpisodeId #>' />")
|
|
|
|
.ClientTemplate(
|
|
|
|
.Title("")
|
|
|
|
"<input type='checkbox' name='checkedEpisodes' value='<#= EpisodeId #>' />")
|
|
|
|
.Width(1)
|
|
|
|
.Title("")
|
|
|
|
.HtmlAttributes(new {style = "text-align:center"});
|
|
|
|
.Width(1)
|
|
|
|
|
|
|
|
.HtmlAttributes(new { style = "text-align:center" });
|
|
|
|
|
|
|
|
|
|
|
|
columns.Bound(c => c.EpisodeNumber).Width(10).Title("Episode");
|
|
|
|
columns.Bound(c => c.EpisodeNumber).Width(10).Title("Episode");
|
|
|
|
columns.Bound(c => c.Title).Title("Title").Width(300);
|
|
|
|
columns.Bound(c => c.Title).Title("Title").Width(300);
|
|
|
|
columns.Bound(c => c.AirDate).Format("{0:d}").Width(10);
|
|
|
|
columns.Bound(c => c.AirDate).Format("{0:d}").Width(10);
|
|
|
|
columns.Bound(c => c.Quality).Width(10);
|
|
|
|
columns.Bound(c => c.Quality).Width(10);
|
|
|
|
columns.Bound(c => c.Path);
|
|
|
|
columns.Bound(c => c.Path);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
//.DetailView(detailView => detailView.Template(e => Html.RenderPartial("EpisodeDetail", e)))
|
|
|
|
//.DetailView(detailView => detailView.Template(e => Html.RenderPartial("EpisodeDetail", e)))
|
|
|
|
.DetailView(detailView => detailView.ClientTemplate("<div><#= Overview #> </br><#= Path #> </div>"))
|
|
|
|
.DetailView(detailView => detailView.ClientTemplate("<div><#= Overview #> </br><#= Path #> </div>"))
|
|
|
|
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber).Descending()).Enabled(true))
|
|
|
|
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber).Descending()).Enabled(true))
|
|
|
|
.Footer(false)
|
|
|
|
.Footer(false)
|
|
|
|
.DataBinding(
|
|
|
|
.DataBinding(
|
|
|
|
d =>
|
|
|
|
d =>
|
|
|
|
d.Ajax().Select("_AjaxSeasonGrid", "Series",
|
|
|
|
d.Ajax().Select("_AjaxSeasonGrid", "Series",
|
|
|
|
new RouteValueDictionary {{"seasonId", season1.SeasonId.ToString()}}))
|
|
|
|
new RouteValueDictionary { { "seasonId", season1.SeasonId.ToString() } }))
|
|
|
|
//.EnableCustomBinding(true)
|
|
|
|
//.EnableCustomBinding(true)
|
|
|
|
//.ClientEvents(e => e.OnDetailViewExpand("episodeDetailExpanded")) //Causes issues displaying the episode detail multiple times...
|
|
|
|
//.ClientEvents(e => e.OnDetailViewExpand("episodeDetailExpanded")) //Causes issues displaying the episode detail multiple times...
|
|
|
|
.ToolBar(
|
|
|
|
.ToolBar(
|
|
|
|
c =>
|
|
|
|
c =>
|
|
|
|
c.Custom().Text("Rename Season").Action("RenameSeason", "Series", new {seasonId = season1.SeasonId})
|
|
|
|
c.Custom().Text("Rename Season").Action("RenameSeason", "Series", new { seasonId = season1.SeasonId })
|
|
|
|
.ButtonType(GridButtonType.Text))
|
|
|
|
.ButtonType(GridButtonType.Text))
|
|
|
|
.Render();
|
|
|
|
.Render();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@{var specialSeasons = Model.Seasons.Where(s => s.SeasonNumber == 0).FirstOrDefault();}
|
|
|
|
//Specials
|
|
|
|
@if (specialSeasons != null)
|
|
|
|
@{var specialSeasons = Model.Seasons.Where(s => s.SeasonNumber == 0).FirstOrDefault();}
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
@if (specialSeasons != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<br />
|
|
|
|
|
|
|
|
<h3>
|
|
|
|
|
|
|
|
Specials</h3>
|
|
|
|
|
|
|
|
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("<div><#= Overview #></div>"))
|
|
|
|
|
|
|
|
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber)).Enabled(false))
|
|
|
|
|
|
|
|
.Footer(false)
|
|
|
|
|
|
|
|
.Render();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<br />
|
|
|
|
|
|
|
|
<h3>
|
|
|
|
|
|
|
|
Specials</h3>
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber)).Enabled(false))
|
|
|
|
|
|
|
|
.Footer(false)
|
|
|
|
|
|
|
|
.Render();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@section Scripts{
|
|
|
|
@section Scripts{
|
|
|
|
<script type="text/javascript">
|
|
|
|
<script type="text/javascript">
|
|
|
|
function episodeDetailExpanded(e) {
|
|
|
|
function episodeDetailExpanded(e) {
|
|
|
|