2011-06-04 04:56:53 +03:00
|
|
|
@model NzbDrone.Web.Models.SeriesModel
|
2011-04-21 10:14:47 +03:00
|
|
|
@using NzbDrone.Core.Repository
|
|
|
|
@using NzbDrone.Web.Models
|
|
|
|
@section TitleContent{
|
|
|
|
@Model.Title
|
|
|
|
}
|
2011-08-03 10:26:39 +03: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;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
2011-04-21 10:14:47 +03:00
|
|
|
@section ActionMenu{
|
|
|
|
@{Html.Telerik().Menu().Name("SeriesMenu").Items(items =>
|
2011-04-10 05:44:01 +03:00
|
|
|
{
|
2011-05-29 09:58:24 +03:00
|
|
|
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 });
|
2011-04-21 10:14:47 +03:00
|
|
|
}).Render();}
|
|
|
|
}
|
|
|
|
@section MainContent{
|
2010-09-24 10:14:42 +03:00
|
|
|
<fieldset>
|
2010-10-05 09:21:18 +03:00
|
|
|
<div class="display-label">
|
|
|
|
ID</div>
|
|
|
|
<div class="display-field">
|
2011-04-21 10:14:47 +03:00
|
|
|
@Model.SeriesId</div>
|
2010-10-05 09:21:18 +03:00
|
|
|
<div class="display-label">
|
|
|
|
Overview</div>
|
|
|
|
<div class="display-field">
|
2011-04-21 10:14:47 +03:00
|
|
|
@Model.Overview</div>
|
2010-10-05 09:21:18 +03:00
|
|
|
<div class="display-label">
|
|
|
|
Status</div>
|
|
|
|
<div class="display-field">
|
2011-04-21 10:14:47 +03:00
|
|
|
@Model.Status</div>
|
2010-10-05 09:21:18 +03:00
|
|
|
<div class="display-label">
|
|
|
|
AirTimes</div>
|
|
|
|
<div class="display-field">
|
2011-06-25 01:49:23 +03:00
|
|
|
@Model.AirsDayOfWeek</div>
|
2010-10-05 09:21:18 +03:00
|
|
|
<div class="display-label">
|
|
|
|
Language</div>
|
|
|
|
<div class="display-label">
|
|
|
|
Location</div>
|
|
|
|
<div class="display-field">
|
2011-04-21 10:14:47 +03:00
|
|
|
@Model.Path</div>
|
2010-09-24 10:14:42 +03:00
|
|
|
</fieldset>
|
2011-06-04 04:56:53 +03:00
|
|
|
@foreach (var season in Model.Seasons.Where(s => s > 0).Reverse())
|
2011-04-24 08:48:12 +03:00
|
|
|
{
|
|
|
|
<br />
|
2011-05-24 07:12:54 +03:00
|
|
|
<h3>
|
2011-06-04 04:56:53 +03:00
|
|
|
Season @season</h3>
|
2011-05-19 18:08:00 +03:00
|
|
|
<div class="grid-container">
|
2011-06-04 04:56:53 +03:00
|
|
|
@{
|
|
|
|
Html.Telerik().Grid<EpisodeModel>().Name("seasons_" + season)
|
|
|
|
.TableHtmlAttributes(new { @class = "Grid" })
|
|
|
|
.Columns(columns =>
|
|
|
|
{
|
2011-08-03 10:26:39 +03:00
|
|
|
columns.Bound(o => o.Ignored)
|
2011-08-05 08:10:36 +03:00
|
|
|
.Title("<img src='../../Content/Images/ignoredNeutral.png' class='ignoredEpisodesMaster ignoreEpisode' id='master_" + season + "' />")
|
2011-06-04 04:56:53 +03:00
|
|
|
.ClientTemplate(
|
2011-08-05 08:10:36 +03:00
|
|
|
"<img src='../../Content/Images/ignoredNeutral.png' class='ignoreEpisode ignoreEpisode_" + season + " ignored' id='<#= EpisodeId #>' />")
|
2011-08-03 10:26:39 +03:00
|
|
|
.Width(20)
|
2011-06-04 04:56:53 +03:00
|
|
|
.HtmlAttributes(new { style = "text-align:center" });
|
2011-03-31 04:42:27 +03:00
|
|
|
|
2011-06-04 04:56:53 +03:00
|
|
|
columns.Bound(c => c.EpisodeNumber).Width(0).Title("Episode");
|
|
|
|
columns.Bound(c => c.Title).Title("Title");
|
2011-06-23 21:37:17 +03:00
|
|
|
columns.Bound(c => c.AirDate).Width(0);
|
2011-06-04 04:56:53 +03:00
|
|
|
columns.Bound(c => c.Quality).Width(0);
|
|
|
|
columns.Bound(c => c.Status).Width(0);
|
|
|
|
columns.Bound(o => o.EpisodeId).Title("")
|
2011-06-06 08:23:28 +03:00
|
|
|
.ClientTemplate("<a href='#Search' onClick=\"searchForEpisode('<#= EpisodeId #>'); return false;\">Search</a>"
|
|
|
|
+ " | " +
|
|
|
|
"<a href='#Rename' onClick=\"renameEpisode('<#= EpisodeFileId #>'); return false;\">Rename</a>");
|
2011-06-04 04:56:53 +03:00
|
|
|
})
|
|
|
|
.DetailView(detailView => detailView.ClientTemplate("<div><#= Overview #> </br><#= Path #> </div>"))
|
2011-08-03 10:26:39 +03:00
|
|
|
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber).Descending()).Enabled(false))
|
2011-06-04 04:56:53 +03:00
|
|
|
.Footer(true)
|
|
|
|
.DataBinding(
|
|
|
|
d =>
|
|
|
|
d.Ajax().Select("_AjaxSeasonGrid", "Series",
|
|
|
|
new RouteValueDictionary { { "seriesId", Model.SeriesId }, { "seasonNumber", season } }))
|
|
|
|
.ToolBar(
|
|
|
|
c =>
|
|
|
|
c.Custom().Text("Rename Season").Action("RenameSeason", "Series", new { seasonId = season })
|
|
|
|
.ButtonType(GridButtonType.Text))
|
2011-08-03 10:26:39 +03:00
|
|
|
.ClientEvents(clientEvents =>
|
|
|
|
{
|
|
|
|
clientEvents.OnRowDataBound("grid_rowBound");
|
|
|
|
clientEvents.OnDataBound("grid_dataBound");
|
|
|
|
})
|
2011-06-04 04:56:53 +03:00
|
|
|
.Render();}
|
2011-05-19 18:08:00 +03:00
|
|
|
</div>
|
2011-04-24 08:48:12 +03:00
|
|
|
}
|
2011-06-19 23:43:47 +03:00
|
|
|
@if (Model.Seasons.Any(s => s == 0))
|
2011-04-24 08:48:12 +03:00
|
|
|
{
|
|
|
|
<br />
|
2011-05-24 07:12:54 +03:00
|
|
|
<h3>
|
|
|
|
Specials</h3>
|
2011-05-19 18:08:00 +03:00
|
|
|
<div class="grid-container">
|
2011-05-21 10:09:41 +03:00
|
|
|
@{Html.Telerik().Grid<EpisodeModel>().Name("seasons_specials")
|
2011-05-24 07:12:54 +03:00
|
|
|
.TableHtmlAttributes(new { @class = "Grid" })
|
2011-05-19 18:08:00 +03:00
|
|
|
.Columns(columns =>
|
2011-05-21 10:09:41 +03:00
|
|
|
{
|
2011-08-03 10:26:39 +03:00
|
|
|
columns.Bound(o => o.Ignored)
|
2011-08-05 08:10:36 +03:00
|
|
|
.Title("<img src='../../Content/Images/ignoredNeutral.png' class='ignoredEpisodesMaster ignoreEpisode' id='master_0' />")
|
2011-05-21 10:09:41 +03:00
|
|
|
.ClientTemplate(
|
2011-08-05 08:10:36 +03:00
|
|
|
"<img src='../../Content/Images/ignoredNeutral.png' class='ignoreEpisode ignoreEpisode_0 ignored' id='<#= EpisodeId #>' />")
|
2011-08-03 10:26:39 +03:00
|
|
|
.Width(20)
|
2011-05-21 10:09:41 +03:00
|
|
|
.HtmlAttributes(new { style = "text-align:center" });
|
|
|
|
|
|
|
|
columns.Bound(c => c.EpisodeNumber).Width(10).Title("Episode");
|
2011-05-24 07:12:54 +03:00
|
|
|
columns.Bound(c => c.Title).Title("Title").Width(10000);
|
2011-06-23 21:37:17 +03:00
|
|
|
columns.Bound(c => c.AirDate).Width(10);
|
2011-05-21 10:09:41 +03:00
|
|
|
columns.Bound(c => c.Quality).Width(10);
|
2011-05-24 07:12:54 +03:00
|
|
|
columns.Bound(c => c.Status).Width(10);
|
2011-05-21 10:09:41 +03:00
|
|
|
})
|
|
|
|
.DetailView(detailView => detailView.ClientTemplate("<div><#= Overview #> </br><#= Path #> </div>"))
|
2011-08-03 10:26:39 +03:00
|
|
|
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber).Descending()).Enabled(false))
|
2011-05-21 10:09:41 +03:00
|
|
|
.Footer(true)
|
|
|
|
.DataBinding(
|
|
|
|
d =>
|
|
|
|
d.Ajax().Select("_AjaxSeasonGrid", "Series",
|
2011-06-19 23:43:47 +03:00
|
|
|
new RouteValueDictionary { { "seriesId", Model.SeriesId }, { "seasonNumber", 0 } }
|
2011-06-04 04:56:53 +03:00
|
|
|
)).Render(); }
|
2011-05-19 18:08:00 +03:00
|
|
|
</div>
|
2011-04-24 08:48:12 +03:00
|
|
|
}
|
2011-04-21 10:14:47 +03:00
|
|
|
}
|
|
|
|
@section Scripts{
|
|
|
|
<script type="text/javascript">
|
2010-10-30 05:46:32 +03:00
|
|
|
function episodeDetailExpanded(e) {
|
|
|
|
$console.log("OnDetailViewExpand :: " + e.masterRow.cells[1].innerHTML);
|
|
|
|
}
|
2011-06-06 08:23:28 +03:00
|
|
|
|
|
|
|
var renameEpisodeUrl = '@Url.Action("Rename", "Episode")';
|
|
|
|
|
|
|
|
function renameEpisode(id) {
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: renameEpisodeUrl,
|
|
|
|
data: jQuery.param({ episodeFileId: id }),
|
|
|
|
error: function (req, status, error) {
|
|
|
|
alert("Sorry! We could rename " + id + " at this time. " + error);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
2011-08-03 10:26:39 +03:00
|
|
|
|
2011-08-04 04:45:45 +03:00
|
|
|
seriesId = @Model.SeriesId;
|
2011-06-06 08:23:28 +03:00
|
|
|
|
2010-10-30 05:46:32 +03:00
|
|
|
</script>
|
2011-04-21 10:14:47 +03:00
|
|
|
}
|