2010-10-21 01:49:23 +00:00
|
|
|
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<NzbDrone.Core.Repository.Series>" %>
|
2010-10-24 07:46:58 +00:00
|
|
|
<%@ Import Namespace="NzbDrone.Core.Repository" %>
|
2010-10-30 02:46:32 +00:00
|
|
|
<%@ Import Namespace="NzbDrone.Web.Models" %>
|
2010-09-24 07:14:42 +00:00
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
|
2011-04-10 02:44:01 +00:00
|
|
|
<%:Model.Title%>
|
2010-09-24 07:14:42 +00:00
|
|
|
</asp:Content>
|
2011-02-23 17:09:13 +00:00
|
|
|
<asp:Content ID="Menu" ContentPlaceHolderID="ActionMenu" runat="server">
|
|
|
|
<%
|
2011-03-31 01:42:27 +00:00
|
|
|
Html.Telerik().Menu().Name("SeriesMenu").Items(items =>
|
2011-04-10 02:44:01 +00:00
|
|
|
{
|
|
|
|
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});
|
2011-04-20 07:44:13 +00:00
|
|
|
items.Add().Text("Update Info").Action(
|
|
|
|
"UpdateInfo", "Series",
|
|
|
|
new { seriesId = Model.SeriesId });
|
2011-04-10 02:44:01 +00:00
|
|
|
items.Add().Text("Rename Series").Action("RenameSeries",
|
|
|
|
"Series",
|
|
|
|
new
|
|
|
|
{
|
|
|
|
seriesId
|
|
|
|
=
|
|
|
|
Model.
|
|
|
|
SeriesId
|
|
|
|
});
|
|
|
|
}).Render();
|
|
|
|
%>
|
2011-02-23 17:09:13 +00:00
|
|
|
</asp:Content>
|
2010-09-24 07:14:42 +00:00
|
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
|
|
|
<fieldset>
|
2010-10-05 06:21:18 +00:00
|
|
|
<div class="display-label">
|
|
|
|
ID</div>
|
|
|
|
<div class="display-field">
|
2011-04-10 02:44:01 +00:00
|
|
|
<%:Model.SeriesId%></div>
|
2010-10-05 06:21:18 +00:00
|
|
|
<div class="display-label">
|
|
|
|
Overview</div>
|
|
|
|
<div class="display-field">
|
2011-04-10 02:44:01 +00:00
|
|
|
<%:Model.Overview%></div>
|
2010-10-05 06:21:18 +00:00
|
|
|
<div class="display-label">
|
|
|
|
Status</div>
|
|
|
|
<div class="display-field">
|
2011-04-10 02:44:01 +00:00
|
|
|
<%:Model.Status%></div>
|
2010-10-05 06:21:18 +00:00
|
|
|
<div class="display-label">
|
|
|
|
AirTimes</div>
|
|
|
|
<div class="display-field">
|
2011-04-10 02:44:01 +00:00
|
|
|
<%:Model.AirTimes%></div>
|
2010-10-05 06:21:18 +00:00
|
|
|
<div class="display-label">
|
|
|
|
Language</div>
|
|
|
|
<div class="display-field">
|
2011-04-10 02:44:01 +00:00
|
|
|
<%:Model.Language.ToUpper()%></div>
|
2010-10-05 06:21:18 +00:00
|
|
|
<div class="display-label">
|
|
|
|
Location</div>
|
|
|
|
<div class="display-field">
|
2011-04-10 02:44:01 +00:00
|
|
|
<%:Model.Path%></div>
|
2010-09-24 07:14:42 +00:00
|
|
|
</fieldset>
|
2011-04-10 02:44:01 +00:00
|
|
|
<%
|
2011-01-29 06:10:22 +00:00
|
|
|
//Todo: This breaks when using SQLServer... thoughts?
|
2010-10-24 07:46:58 +00:00
|
|
|
//Normal Seasons
|
2011-02-23 06:23:59 +00:00
|
|
|
foreach (var season in Model.Seasons.Where(s => s.SeasonNumber > 0).Reverse())
|
2010-10-05 06:21:18 +00:00
|
|
|
{
|
2011-04-10 02:44:01 +00:00
|
|
|
%>
|
2010-10-24 07:46:58 +00:00
|
|
|
<br />
|
|
|
|
<h3>
|
|
|
|
Season
|
2011-04-10 02:44:01 +00:00
|
|
|
<%:season.SeasonNumber%></h3>
|
2010-10-24 07:46:58 +00:00
|
|
|
<%
|
2011-03-31 01:42:27 +00:00
|
|
|
Season season1 = season;
|
|
|
|
Html.Telerik().Grid<EpisodeModel>().Name("seasons_" + season.SeasonNumber)
|
2011-04-10 02:44:01 +00:00
|
|
|
.Columns(columns =>
|
|
|
|
{
|
|
|
|
columns.Bound(o => o.EpisodeId)
|
|
|
|
.ClientTemplate(
|
|
|
|
"<input type='checkbox' name='checkedEpisodes' value='<#= EpisodeId #>' />")
|
|
|
|
.Title("")
|
|
|
|
.Width(1)
|
|
|
|
.HtmlAttributes(new {style = "text-align:center"});
|
2011-03-31 01:42:27 +00:00
|
|
|
|
2011-04-10 02:44:01 +00:00
|
|
|
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);
|
|
|
|
})
|
2011-03-31 01:42:27 +00:00
|
|
|
//.DetailView(detailView => detailView.Template(e => Html.RenderPartial("EpisodeDetail", e)))
|
2011-04-10 02:44:01 +00:00
|
|
|
.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()}}))
|
2011-03-31 01:42:27 +00:00
|
|
|
//.EnableCustomBinding(true)
|
|
|
|
//.ClientEvents(e => e.OnDetailViewExpand("episodeDetailExpanded")) //Causes issues displaying the episode detail multiple times...
|
2011-04-10 02:44:01 +00:00
|
|
|
.ToolBar(
|
|
|
|
c =>
|
|
|
|
c.Custom().Text("Rename Season").Action("RenameSeason", "Series", new {seasonId = season1.SeasonId})
|
|
|
|
.ButtonType(GridButtonType.Text))
|
2011-03-31 01:42:27 +00:00
|
|
|
.Render();
|
2010-10-24 07:46:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//Specials
|
|
|
|
var specialSeasons = Model.Seasons.Where(s => s.SeasonNumber == 0).FirstOrDefault();
|
|
|
|
|
|
|
|
if (specialSeasons != null)
|
|
|
|
{
|
2011-04-10 02:44:01 +00:00
|
|
|
%>
|
2010-10-24 07:46:58 +00:00
|
|
|
<br />
|
|
|
|
<h3>
|
|
|
|
Specials</h3>
|
|
|
|
<%
|
2011-04-10 02:44:01 +00:00
|
|
|
|
2011-03-31 01:42:27 +00:00
|
|
|
Html.Telerik().Grid(specialSeasons.Episodes).Name("seasons_specials")
|
2011-04-10 02:44:01 +00:00
|
|
|
.Columns(columns =>
|
2011-03-31 01:42:27 +00:00
|
|
|
{
|
|
|
|
columns.Bound(c => c.EpisodeNumber).Width(0).Title("Episode");
|
|
|
|
columns.Bound(c => c.Title);
|
|
|
|
columns.Bound(c => c.AirDate).Format("{0:d}").Width(0);
|
|
|
|
})
|
2011-04-10 02:44:01 +00:00
|
|
|
.DetailView(detailView => detailView.ClientTemplate("<div><#= Overview #></div>"))
|
|
|
|
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber)).Enabled(false))
|
|
|
|
.Footer(false)
|
|
|
|
.Render();
|
2010-10-24 07:46:58 +00:00
|
|
|
}
|
2011-04-10 02:44:01 +00:00
|
|
|
%>
|
2010-09-24 07:14:42 +00:00
|
|
|
</asp:Content>
|
2010-10-30 02:46:32 +00:00
|
|
|
<asp:Content ContentPlaceHolderID="Scripts" runat="server">
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
function episodeDetailExpanded(e) {
|
|
|
|
$console.log("OnDetailViewExpand :: " + e.masterRow.cells[1].innerHTML);
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</asp:Content>
|