2011-06-04 01:56:53 +00:00
|
|
|
@model NzbDrone.Web.Models.SeriesModel
|
2011-04-21 07:14:47 +00:00
|
|
|
@using NzbDrone.Core.Repository
|
|
|
|
@using NzbDrone.Web.Models
|
|
|
|
@section TitleContent{
|
|
|
|
@Model.Title
|
|
|
|
}
|
2011-08-03 07:26:39 +00:00
|
|
|
|
|
|
|
<script src="../../Scripts/seriesDetails.js" type="text/javascript"></script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
.ignoreEpisode
|
|
|
|
{
|
|
|
|
width: 18px;
|
|
|
|
height: 18px;
|
|
|
|
padding-bottom: -6px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.ignoredEpisodesMaster
|
|
|
|
{
|
|
|
|
width: 18px;
|
|
|
|
height: 18px;
|
|
|
|
padding-left: 18px;
|
|
|
|
padding-right: -18px;
|
|
|
|
}
|
2011-08-20 03:02:47 +00:00
|
|
|
|
|
|
|
.seasonToggleTopGroup
|
|
|
|
{
|
|
|
|
overflow: hidden;
|
|
|
|
width: 50%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.seasonToggleTop
|
|
|
|
{
|
|
|
|
@*float: left;
|
|
|
|
border-width: 1px;
|
|
|
|
border-style: solid;
|
|
|
|
border-color: grey;
|
|
|
|
margin: 5px;
|
|
|
|
padding: 3px;
|
|
|
|
padding-top: 0px;
|
|
|
|
padding-bottom: 0px;*@
|
|
|
|
|
|
|
|
background-color: #F1EDED;
|
|
|
|
background-position: 5px center;
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
display: inline-block;
|
|
|
|
font-size: 15px;
|
|
|
|
margin: 2px;
|
|
|
|
padding: 2px 5px;
|
|
|
|
width: 95px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.seasonToggleLabel
|
|
|
|
{
|
|
|
|
margin-left: 5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.seasonToggleTop .ignoredEpisodesMaster
|
|
|
|
{
|
|
|
|
padding-left: 0px;
|
|
|
|
padding-right: 0px;
|
|
|
|
margin-bottom: -4px;
|
|
|
|
}
|
2011-08-03 07:26:39 +00:00
|
|
|
</style>
|
|
|
|
|
2011-04-21 07:14:47 +00:00
|
|
|
@section ActionMenu{
|
2011-08-06 02:04:35 +00:00
|
|
|
<ul id="sub-menu">
|
|
|
|
<li>@Html.ActionLink("Back to Series List", "Index", "Series")</li>
|
|
|
|
<li>@Ajax.ActionLink("Scan For Episodes on Disk", "SyncEpisodesOnDisk", "Command", new { seriesId = Model.SeriesId }, null)</li>
|
|
|
|
<li>@Ajax.ActionLink("Update Info", "UpdateInfo", "Command", new { seriesId = Model.SeriesId }, null)</li>
|
|
|
|
<li>@Ajax.ActionLink("Rename Series", "RenameSeries", "Command", new { seriesId = Model.SeriesId }, null)</li>
|
|
|
|
</ul>
|
2011-04-21 07:14:47 +00:00
|
|
|
}
|
|
|
|
@section MainContent{
|
2011-08-20 03:02:47 +00:00
|
|
|
|
|
|
|
<div class="seasonToggleTopGroup">
|
|
|
|
@foreach (var season in Model.Seasons)
|
|
|
|
{
|
|
|
|
var ignoreSeason = "ignoreSeason_" + season;
|
|
|
|
<div class="seasonToggleTop">
|
|
|
|
<img src='../../Content/Images/ignoredNeutral.png' class='ignoredEpisodesMaster ignoreEpisode @ignoreSeason' />
|
|
|
|
<span class="seasonToggleLabel">@(season == 0 ? "Specials" : "Season " + season)</span>
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
|
2011-08-22 00:48:37 +00:00
|
|
|
@foreach (var s in Model.Seasons.Where(s => s > 0).Reverse())
|
2011-04-24 05:48:12 +00:00
|
|
|
{
|
2011-08-22 00:48:37 +00:00
|
|
|
var seriesId = @Model.SeriesId;
|
|
|
|
var season = s;
|
|
|
|
|
2011-05-24 04:12:54 +00:00
|
|
|
<h3>
|
2011-06-04 01:56:53 +00:00
|
|
|
Season @season</h3>
|
2011-05-19 15:08:00 +00:00
|
|
|
<div class="grid-container">
|
2011-06-04 01:56:53 +00:00
|
|
|
@{
|
|
|
|
Html.Telerik().Grid<EpisodeModel>().Name("seasons_" + season)
|
|
|
|
.TableHtmlAttributes(new { @class = "Grid" })
|
|
|
|
.Columns(columns =>
|
2011-08-20 03:02:47 +00:00
|
|
|
{
|
|
|
|
columns.Bound(o => o.Ignored)
|
|
|
|
.Title("<img src='../../Content/Images/ignoredNeutral.png' class='ignoredEpisodesMaster ignoreEpisode ignoreSeason_" + season + "'/>")
|
|
|
|
.ClientTemplate(
|
|
|
|
"<img src='../../Content/Images/ignoredNeutral.png' class='ignoreEpisode ignoreEpisode_" + season + " ignored' id='<#= EpisodeId #>' />")
|
|
|
|
.Width(20)
|
|
|
|
.HtmlAttributes(new { style = "text-align:center" });
|
2011-03-31 01:42:27 +00:00
|
|
|
|
2011-08-20 03:02:47 +00:00
|
|
|
columns.Bound(c => c.EpisodeNumber).Width(0).Title("Episode");
|
|
|
|
columns.Bound(c => c.Title).Title("Title");
|
|
|
|
columns.Bound(c => c.AirDate).Width(0);
|
|
|
|
columns.Bound(c => c.Quality).Width(0);
|
|
|
|
columns.Bound(c => c.Status).Width(0);
|
|
|
|
columns.Bound(o => o.EpisodeId).Title("")
|
2011-08-22 00:48:37 +00:00
|
|
|
.ClientTemplate("<a href=\"../Episode/Season?episodeId=<#= EpisodeId #>\" onclick=\"searchForEpisode('<#= EpisodeId #>'); return false;\">Search</a>"
|
|
|
|
+ " | " +
|
|
|
|
"<a href=\"../Episode/Rename?episodeFileId=<#= EpisodeId #>\" onclick=\"renameEpisode('<#= EpisodeFileId #>'); return false;\">Rename</a>"
|
|
|
|
);
|
2011-08-20 03:02:47 +00:00
|
|
|
})
|
2011-06-04 01:56:53 +00:00
|
|
|
.DetailView(detailView => detailView.ClientTemplate("<div><#= Overview #> </br><#= Path #> </div>"))
|
2011-08-03 07:26:39 +00:00
|
|
|
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber).Descending()).Enabled(false))
|
2011-06-04 01:56:53 +00:00
|
|
|
.Footer(true)
|
|
|
|
.DataBinding(
|
|
|
|
d =>
|
|
|
|
d.Ajax().Select("_AjaxSeasonGrid", "Series",
|
|
|
|
new RouteValueDictionary { { "seriesId", Model.SeriesId }, { "seasonNumber", season } }))
|
2011-08-22 00:48:37 +00:00
|
|
|
.ToolBar(toolbar => toolbar.Template(@<text>
|
|
|
|
<div>
|
|
|
|
<a href="../Episode/SearchSeason?seriesId=@seriesId&seasonNumber=@season" onclick="searchSeason('@seriesId', @season); return false;">Search for Season</a>
|
|
|
|
|
|
|
|
|
<a href="../Episode/RenameSeason?seriesId=@seriesId&seasonNumber=@season" onclick="renameSeason('@seriesId', @season); return false;">Rename Season</a>
|
|
|
|
</div>
|
|
|
|
</text>))
|
2011-08-03 07:26:39 +00:00
|
|
|
.ClientEvents(clientEvents =>
|
2011-08-20 03:02:47 +00:00
|
|
|
{
|
|
|
|
clientEvents.OnRowDataBound("grid_rowBound");
|
|
|
|
clientEvents.OnDataBound("grid_dataBound");
|
|
|
|
})
|
2011-06-04 01:56:53 +00:00
|
|
|
.Render();}
|
2011-05-19 15:08:00 +00:00
|
|
|
</div>
|
2011-04-24 05:48:12 +00:00
|
|
|
}
|
2011-06-19 20:43:47 +00:00
|
|
|
@if (Model.Seasons.Any(s => s == 0))
|
2011-04-24 05:48:12 +00:00
|
|
|
{
|
|
|
|
<br />
|
2011-05-24 04:12:54 +00:00
|
|
|
<h3>
|
|
|
|
Specials</h3>
|
2011-05-19 15:08:00 +00:00
|
|
|
<div class="grid-container">
|
2011-08-20 03:02:47 +00:00
|
|
|
@{Html.Telerik().Grid<EpisodeModel>().Name("seasons_0")
|
2011-05-24 04:12:54 +00:00
|
|
|
.TableHtmlAttributes(new { @class = "Grid" })
|
2011-05-19 15:08:00 +00:00
|
|
|
.Columns(columns =>
|
2011-08-20 03:02:47 +00:00
|
|
|
{
|
|
|
|
columns.Bound(o => o.Ignored)
|
|
|
|
.Title("<img src='../../Content/Images/ignoredNeutral.png' class='ignoredEpisodesMaster ignoreEpisode ignoreSeason_0' />")
|
|
|
|
.ClientTemplate(
|
|
|
|
"<img src='../../Content/Images/ignoredNeutral.png' class='ignoreEpisode ignoreEpisode_0 ignored' id='<#= EpisodeId #>' />")
|
|
|
|
.Width(20)
|
|
|
|
.HtmlAttributes(new { style = "text-align:center" });
|
2011-05-21 07:09:41 +00:00
|
|
|
|
2011-08-20 03:02:47 +00:00
|
|
|
columns.Bound(c => c.EpisodeNumber).Width(10).Title("Episode");
|
|
|
|
columns.Bound(c => c.Title).Title("Title").Width(10000);
|
|
|
|
columns.Bound(c => c.AirDate).Width(10);
|
|
|
|
columns.Bound(c => c.Quality).Width(10);
|
|
|
|
columns.Bound(c => c.Status).Width(10);
|
|
|
|
})
|
2011-05-21 07:09:41 +00:00
|
|
|
.DetailView(detailView => detailView.ClientTemplate("<div><#= Overview #> </br><#= Path #> </div>"))
|
2011-08-03 07:26:39 +00:00
|
|
|
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber).Descending()).Enabled(false))
|
2011-05-21 07:09:41 +00:00
|
|
|
.Footer(true)
|
|
|
|
.DataBinding(
|
|
|
|
d =>
|
|
|
|
d.Ajax().Select("_AjaxSeasonGrid", "Series",
|
2011-08-20 03:02:47 +00:00
|
|
|
new RouteValueDictionary { { "seriesId", Model.SeriesId }, { "seasonNumber", 0 } }))
|
|
|
|
.ClientEvents(clientEvents =>
|
|
|
|
{
|
|
|
|
clientEvents.OnRowDataBound("grid_rowBound");
|
|
|
|
clientEvents.OnDataBound("grid_dataBound");
|
|
|
|
})
|
|
|
|
.Render(); }
|
2011-05-19 15:08:00 +00:00
|
|
|
</div>
|
2011-04-24 05:48:12 +00:00
|
|
|
}
|
2011-04-21 07:14:47 +00:00
|
|
|
}
|
|
|
|
@section Scripts{
|
|
|
|
<script type="text/javascript">
|
2011-08-04 01:45:45 +00:00
|
|
|
seriesId = @Model.SeriesId;
|
2010-10-30 02:46:32 +00:00
|
|
|
</script>
|
2011-04-21 07:14:47 +00:00
|
|
|
}
|