147 lines
5.6 KiB
Plaintext
147 lines
5.6 KiB
Plaintext
@model NzbDrone.Web.Models.SeriesModel
|
|
@using NzbDrone.Core.Repository
|
|
@using NzbDrone.Web.Models
|
|
@section TitleContent{
|
|
@Model.Title
|
|
}
|
|
|
|
<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;
|
|
}
|
|
|
|
.seasonToggleTopGroup
|
|
{
|
|
overflow: hidden;
|
|
width: 50%;
|
|
}
|
|
|
|
.seasonToggleTop
|
|
{
|
|
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;
|
|
}
|
|
|
|
.statusImage
|
|
{
|
|
width: 18px;
|
|
height: 18px;
|
|
}
|
|
</style>
|
|
|
|
@section ActionMenu{
|
|
<ul class="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>
|
|
}
|
|
@section MainContent{
|
|
|
|
<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>
|
|
|
|
@foreach (var s in Model.Seasons.Reverse())
|
|
{
|
|
var seriesId = @Model.SeriesId;
|
|
var season = s;
|
|
|
|
<h3>
|
|
@(season == 0 ? "Specials" : "Season " + season)
|
|
</h3>
|
|
|
|
<div class="grid-container">
|
|
@{
|
|
Html.Telerik().Grid<EpisodeModel>().Name("seasons_" + season)
|
|
.TableHtmlAttributes(new { @class = "Grid" })
|
|
.Columns(columns =>
|
|
{
|
|
columns.Bound(o => o.Ignored)
|
|
.Title("<img src='../../Content/Images/ignoredNeutral.png' class='ignoredEpisodesMaster ignoreEpisode ignoreSeason_" + season + "' title='Click to toggle season ignore status' />")
|
|
.ClientTemplate(
|
|
"<img src='../../Content/Images/ignoredNeutral.png' class='ignoreEpisode ignoreEpisode_" + season + " ignored' id='<#= EpisodeId #>' title='Click to toggle episode ignore status' />")
|
|
.Width(20)
|
|
.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).Width(0);
|
|
columns.Bound(c => c.Quality).Width(0);
|
|
columns.Bound(c => c.Status)
|
|
.ClientTemplate("<img src='../../Content/Images/<#= Status #>.png' alt='<#= Status #>' title='<#= Status #>' class='statusImage' />")
|
|
.Width(20)
|
|
.HtmlAttributes(new { style = "text-align:center" });
|
|
columns.Bound(o => o.EpisodeId).Title("")
|
|
.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>"
|
|
);
|
|
})
|
|
.DetailView(detailView => detailView.ClientTemplate("<div><#= Overview #> </br><#= Path #> </div>"))
|
|
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber).Descending()).Enabled(false))
|
|
.Footer(true)
|
|
.DataBinding(
|
|
d =>
|
|
d.Ajax().Select("_AjaxSeasonGrid", "Series",
|
|
new RouteValueDictionary { { "seriesId", Model.SeriesId }, { "seasonNumber", season } }))
|
|
.ToolBar(toolbar => toolbar.Template(@<text>
|
|
<ul class="sub-menu">
|
|
<li><a href="../Episode/SearchSeason?seriesId=@seriesId&seasonNumber=@season" onclick="searchSeason('@seriesId', @season); return false;">Search for Season</a></li>
|
|
<li><a href="../Episode/RenameSeason?seriesId=@seriesId&seasonNumber=@season" onclick="renameSeason('@seriesId', @season); return false;">Rename Season</a></li>
|
|
</ul>
|
|
</text>))
|
|
.ClientEvents(clientEvents =>
|
|
{
|
|
clientEvents.OnRowDataBound("grid_rowBound");
|
|
clientEvents.OnDataBound("grid_dataBound");
|
|
})
|
|
.Render();}
|
|
</div>
|
|
}
|
|
}
|
|
@section Scripts{
|
|
<script type="text/javascript">
|
|
seriesId = @Model.SeriesId;
|
|
</script>
|
|
}
|