You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
141 lines
7.1 KiB
141 lines
7.1 KiB
14 years ago
|
@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 =>
|
||
14 years ago
|
{
|
||
|
items.Add().Text("Edit").Action("Edit", "Series",
|
||
|
new
|
||
|
{
|
||
|
seriesId =
|
||
|
Model.SeriesId
|
||
|
});
|
||
|
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});
|
||
14 years ago
|
items.Add().Text("Update Info").Action(
|
||
|
"UpdateInfo", "Series",
|
||
|
new { seriesId = Model.SeriesId });
|
||
14 years ago
|
items.Add().Text("Rename Series").Action("RenameSeries",
|
||
|
"Series",
|
||
|
new
|
||
|
{
|
||
|
seriesId
|
||
|
=
|
||
|
Model.
|
||
|
SeriesId
|
||
|
});
|
||
14 years ago
|
}).Render();}
|
||
|
}
|
||
|
|
||
|
@section MainContent{
|
||
|
|
||
14 years ago
|
<fieldset>
|
||
14 years ago
|
<div class="display-label">
|
||
|
ID</div>
|
||
|
<div class="display-field">
|
||
14 years ago
|
@Model.SeriesId</div>
|
||
14 years ago
|
<div class="display-label">
|
||
|
Overview</div>
|
||
|
<div class="display-field">
|
||
14 years ago
|
@Model.Overview</div>
|
||
14 years ago
|
<div class="display-label">
|
||
|
Status</div>
|
||
|
<div class="display-field">
|
||
14 years ago
|
@Model.Status</div>
|
||
14 years ago
|
<div class="display-label">
|
||
|
AirTimes</div>
|
||
|
<div class="display-field">
|
||
14 years ago
|
@Model.AirTimes</div>
|
||
14 years ago
|
<div class="display-label">
|
||
|
Language</div>
|
||
|
<div class="display-field">
|
||
14 years ago
|
@Model.Language.ToUpper()</div>
|
||
14 years ago
|
<div class="display-label">
|
||
|
Location</div>
|
||
|
<div class="display-field">
|
||
14 years ago
|
@Model.Path</div>
|
||
14 years ago
|
</fieldset>
|
||
14 years ago
|
@*Todo: This breaks when using SQLServer... thoughts?*@
|
||
|
|
||
|
@foreach (var season in Model.Seasons.Where(s => s.SeasonNumber > 0).Reverse())
|
||
14 years ago
|
{
|
||
14 years ago
|
|
||
14 years ago
|
<br />
|
||
14 years ago
|
<h3>Season @season.SeasonNumber</h3>
|
||
14 years ago
|
Season season1 = season;
|
||
|
Html.Telerik().Grid<EpisodeModel>().Name("seasons_" + season.SeasonNumber)
|
||
14 years ago
|
.TableHtmlAttributes(new { @class = "Grid" })
|
||
14 years ago
|
.Columns(columns =>
|
||
|
{
|
||
|
columns.Bound(o => o.EpisodeId)
|
||
|
.ClientTemplate(
|
||
|
"<input type='checkbox' name='checkedEpisodes' value='<#= EpisodeId #>' />")
|
||
|
.Title("")
|
||
|
.Width(1)
|
||
|
.HtmlAttributes(new {style = "text-align:center"});
|
||
14 years ago
|
|
||
14 years ago
|
columns.Bound(c => c.EpisodeNumber).Width(10).Title("Episode");
|
||
|
columns.Bound(c => c.Title).Title("Title").Width(300);
|
||
|
columns.Bound(c => c.AirDate).Format("{0:d}").Width(10);
|
||
|
columns.Bound(c => c.Quality).Width(10);
|
||
|
columns.Bound(c => c.Path);
|
||
|
})
|
||
14 years ago
|
//.DetailView(detailView => detailView.Template(e => Html.RenderPartial("EpisodeDetail", e)))
|
||
14 years ago
|
.DetailView(detailView => detailView.ClientTemplate("<div><#= Overview #> </br><#= Path #> </div>"))
|
||
|
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber).Descending()).Enabled(true))
|
||
|
.Footer(false)
|
||
|
.DataBinding(
|
||
|
d =>
|
||
|
d.Ajax().Select("_AjaxSeasonGrid", "Series",
|
||
|
new RouteValueDictionary {{"seasonId", season1.SeasonId.ToString()}}))
|
||
14 years ago
|
//.EnableCustomBinding(true)
|
||
|
//.ClientEvents(e => e.OnDetailViewExpand("episodeDetailExpanded")) //Causes issues displaying the episode detail multiple times...
|
||
14 years ago
|
.ToolBar(
|
||
|
c =>
|
||
|
c.Custom().Text("Rename Season").Action("RenameSeason", "Series", new {seasonId = season1.SeasonId})
|
||
|
.ButtonType(GridButtonType.Text))
|
||
14 years ago
|
.Render();
|
||
14 years ago
|
}
|
||
|
|
||
|
//Specials
|
||
14 years ago
|
@{var specialSeasons = Model.Seasons.Where(s => s.SeasonNumber == 0).FirstOrDefault();}
|
||
14 years ago
|
|
||
14 years ago
|
@if (specialSeasons != null)
|
||
14 years ago
|
{
|
||
14 years ago
|
|
||
14 years ago
|
<br />
|
||
|
<h3>
|
||
|
Specials</h3>
|
||
14 years ago
|
Html.Telerik().Grid(specialSeasons.Episodes).Name("seasons_specials")
|
||
14 years ago
|
.TableHtmlAttributes(new { @class = "Grid" })
|
||
14 years ago
|
.Columns(columns =>
|
||
14 years ago
|
{
|
||
|
columns.Bound(c => c.EpisodeNumber).Width(0).Title("Episode");
|
||
|
columns.Bound(c => c.Title);
|
||
|
columns.Bound(c => c.AirDate).Format("{0:d}").Width(0);
|
||
|
})
|
||
14 years ago
|
.DetailView(detailView => detailView.ClientTemplate("<div><#= Overview #></div>"))
|
||
|
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber)).Enabled(false))
|
||
|
.Footer(false)
|
||
|
.Render();
|
||
14 years ago
|
}
|
||
14 years ago
|
|
||
14 years ago
|
}
|
||
|
|
||
|
@section Scripts{
|
||
|
<script type="text/javascript">
|
||
14 years ago
|
function episodeDetailExpanded(e) {
|
||
|
$console.log("OnDetailViewExpand :: " + e.masterRow.cells[1].innerHTML);
|
||
|
}
|
||
|
</script>
|
||
14 years ago
|
}
|