2011-12-09 07:57:23 +03:00
@model List<UpcomingEpisodeModel>
2012-01-30 04:38:44 +03:00
@using NzbDrone.Common
2011-12-09 07:57:23 +03:00
@using NzbDrone.Web.Helpers
2011-04-21 09:18:28 +03:00
@using NzbDrone.Web.Models
2011-12-10 08:05:17 +03:00
@{ViewBag.Title = "Upcoming";}
2011-12-09 07:57:23 +03:00
@section HeaderContent
{
@Html.IncludeCss("Grid.css")
}
2011-04-21 09:18:28 +03:00
@section ActionMenu{
2011-12-01 08:25:01 +03:00
<ul class="sub-menu">
2011-08-06 05:04:35 +03:00
<li>@Ajax.ActionLink("Start RSS Sync", "RssSync", "Command", null, null)</li>
</ul>
2011-04-21 09:18:28 +03:00
}
2011-12-01 08:25:01 +03:00
<div id="yesterday">
<h2>
Yesterday</h2>
<div class="grid-container">
@{Html.Telerik().Grid<UpcomingEpisodeModel>().Name("Yesterday").NoRecordsTemplate(
2011-05-20 01:59:30 +03:00
"No watched shows aired yesterday")
.TableHtmlAttributes(new { @class = "Grid" })
.Columns(columns =>
{
2011-08-31 03:15:22 +03:00
columns.Bound(c => c.SeriesTitle)
2011-05-20 01:59:30 +03:00
.ClientTemplate("<a href=" +
Url.Action("Details", "Series", new { seriesId = "<#= SeriesId #>" }) +
2011-08-31 03:15:22 +03:00
"><#= SeriesTitle #></a>")
.Title("Series Title");
2011-05-20 01:59:30 +03:00
columns.Bound(c => c.SeasonNumber).Title("Season #").Width(40);
columns.Bound(c => c.EpisodeNumber).Title("Episode #").Width(40);
2011-12-08 09:22:16 +03:00
columns.Bound(c => c.Title).Title("Episode Title").Width(350);
2011-09-29 03:20:29 +03:00
columns.Bound(c => c.AirDateTime).Title("Air Time")
.ClientTemplate("<#= AirTime #>")
.Width(160);
columns.Bound(c => c.Status)
.ClientTemplate("<img src='../../Content/Images/<#= Status #>.png' alt='<#= Status #>' title='<#= Status #>' class='statusImage status-<#= Status #>' />" +
2012-01-10 09:08:26 +03:00
Ajax.ImageActionLink("../../Content/Images/Search.png", new { Alt = "Search", Title = "Search for episode", @class = "searchImage" }, "Search", "Episode", new { EpisodeId = "<#= EpisodeId #>" }, null, null)
2011-12-08 09:22:16 +03:00
).Width(100);
2011-05-20 01:59:30 +03:00
})
.DetailView(detailView => detailView.ClientTemplate(
"<fieldset>" +
"<div><b>Overview: </b><#= Overview #></div>" +
"</fieldset>"
))
.DataBinding(data => data.Ajax().Select("_AjaxBindingYesterday", "Upcoming"))
2011-09-29 03:20:29 +03:00
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.AirDateTime).Ascending()).Enabled(true))
2012-01-30 04:38:44 +03:00
.ClientEvents(clientEvents =>
{
2012-01-30 09:14:46 +03:00
clientEvents.OnRowDataBound("grid_rowBound");
2012-01-30 04:38:44 +03:00
if (EnviromentProvider.IsProduction)
clientEvents.OnError("grid_onError");
})
2011-05-20 01:59:30 +03:00
.Render();}
2011-03-24 01:41:38 +02:00
</div>
2011-12-01 08:25:01 +03:00
</div>
<br />
<div id="today">
<h2>
Today</h2>
<div class="grid-container">
@{Html.Telerik().Grid<UpcomingEpisodeModel>().Name("Today").NoRecordsTemplate("No watched shows airing today.")
2011-05-20 01:59:30 +03:00
.TableHtmlAttributes(new { @class = "Grid" })
.Columns(columns =>
{
2011-08-31 03:15:22 +03:00
columns.Bound(c => c.SeriesTitle)
2011-05-20 01:59:30 +03:00
.ClientTemplate("<a href=" +
Url.Action("Details", "Series", new { seriesId = "<#= SeriesId #>" }) +
2011-09-04 11:01:01 +03:00
"><#= SeriesTitle #></a>")
2011-05-20 01:59:30 +03:00
.Title("Series Name");
columns.Bound(c => c.SeasonNumber).Title("Season #").Width(40);
columns.Bound(c => c.EpisodeNumber).Title("Episode #").Width(40);
2011-12-08 09:22:16 +03:00
columns.Bound(c => c.Title).Title("Episode Title").Width(350);
2011-09-29 03:20:29 +03:00
columns.Bound(c => c.AirDateTime).Title("Air Time")
.ClientTemplate("<#= AirTime #>")
.Width(160);
columns.Bound(c => c.Status)
.ClientTemplate("<img src='../../Content/Images/<#= Status #>.png' alt='<#= Status #>' title='<#= Status #>' class='statusImage status-<#= Status #>' />" +
"<a href=\"../Episode/Season?episodeId=<#= EpisodeId #>\" onclick=\"searchForEpisode('<#= EpisodeId #>'); return false;\"><img src='../../Content/Images/Search.png' alt='Search' title='Search for episode' class='searchImage' /></a>"
2011-12-08 09:22:16 +03:00
).Width(100);
2011-05-20 01:59:30 +03:00
})
.DetailView(detailView => detailView.ClientTemplate(
"<fieldset>" +
"<div><b>Overview: </b><#= Overview #></div>" +
"</fieldset>"
))
.DataBinding(data => data.Ajax().Select("_AjaxBindingToday", "Upcoming"))
2011-09-29 03:20:29 +03:00
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.AirDateTime).Ascending()).Enabled(true))
2012-01-30 04:38:44 +03:00
.ClientEvents(clientEvents =>
{
2012-01-30 09:14:46 +03:00
clientEvents.OnRowDataBound("grid_rowBound");
2012-01-30 04:38:44 +03:00
if (EnviromentProvider.IsProduction)
clientEvents.OnError("grid_onError");
})
2011-05-20 01:59:30 +03:00
.Render();}
2011-03-24 01:41:38 +02:00
</div>
2011-12-01 08:25:01 +03:00
</div>
<br />
<div id="tomorrow">
<h2>
Tomorrow</h2>
<div class="grid-container">
@{Html.Telerik().Grid<UpcomingEpisodeModel>().Name("Tomorrow").NoRecordsTemplate(
2011-05-20 01:59:30 +03:00
"No watched shows airing tomorrow")
.TableHtmlAttributes(new { @class = "Grid" })
.Columns(columns =>
{
2011-08-31 03:15:22 +03:00
columns.Bound(c => c.SeriesTitle)
2011-05-20 01:59:30 +03:00
.ClientTemplate("<a href=" +
Url.Action("Details", "Series", new { seriesId = "<#= SeriesId #>" }) +
2011-09-04 11:01:01 +03:00
"><#= SeriesTitle #></a>")
2011-05-20 01:59:30 +03:00
.Title("Series Name");
columns.Bound(c => c.SeasonNumber).Title("Season #").Width(40);
columns.Bound(c => c.EpisodeNumber).Title("Episode #").Width(40);
2011-12-08 09:22:16 +03:00
columns.Bound(c => c.Title).Title("Episode Title").Width(350);
2011-09-29 03:20:29 +03:00
columns.Bound(c => c.AirDateTime).Title("Air Time")
.ClientTemplate("<#= AirTime #>")
.Width(160);
columns.Bound(c => c.Status)
.ClientTemplate("<img src='../../Content/Images/<#= Status #>.png' alt='<#= Status #>' title='<#= Status #>' class='statusImage status-<#= Status #>' />" +
"<a href=\"../Episode/Season?episodeId=<#= EpisodeId #>\" onclick=\"searchForEpisode('<#= EpisodeId #>'); return false;\"><img src='../../Content/Images/Search.png' alt='Search' title='Search for episode' class='searchImage' /></a>"
2011-12-08 09:22:16 +03:00
).Width(100);
2011-05-20 01:59:30 +03:00
})
.DetailView(detailView => detailView.ClientTemplate(
"<fieldset>" +
"<div><b>Overview: </b><#= Overview #></div>" +
"</fieldset>"
))
2011-06-29 07:51:30 +03:00
2011-05-20 01:59:30 +03:00
.DataBinding(data => data.Ajax().Select("_AjaxBindingTomorrow", "Upcoming"))
2011-09-29 03:20:29 +03:00
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.AirDateTime).Ascending()).Enabled(true))
2012-01-30 04:38:44 +03:00
.ClientEvents(clientEvents =>
{
2012-01-30 09:14:46 +03:00
clientEvents.OnRowDataBound("grid_rowBound");
2012-01-30 04:38:44 +03:00
if (EnviromentProvider.IsProduction)
clientEvents.OnError("grid_onError");
})
2011-05-20 01:59:30 +03:00
.Render();}
2011-04-28 02:51:38 +03:00
</div>
2011-12-01 08:25:01 +03:00
</div>
<br />
<div id="week">
<h2>
Future Forecast</h2>
<div class="grid-container">
@{Html.Telerik().Grid<UpcomingEpisodeModel>().Name("Week").NoRecordsTemplate(
2011-05-20 01:59:30 +03:00
"No watched shows airing in the next week...")
.TableHtmlAttributes(new { @class = "Grid" })
.Columns(columns =>
{
2011-08-31 03:15:22 +03:00
columns.Bound(c => c.SeriesTitle)
2011-05-20 01:59:30 +03:00
.ClientTemplate("<a href=" +
Url.Action("Details", "Series", new { seriesId = "<#= SeriesId #>" }) +
2011-09-04 11:01:01 +03:00
"><#= SeriesTitle #></a>")
2011-05-20 01:59:30 +03:00
.Title("Series Name");
columns.Bound(c => c.SeasonNumber).Title("Season #").Width(40);
columns.Bound(c => c.EpisodeNumber).Title("Episode #").Width(40);
2011-12-08 09:22:16 +03:00
columns.Bound(c => c.Title).Title("Episode Title").Width(350);
2011-09-29 03:20:29 +03:00
columns.Bound(c => c.AirDateTime).Title("Air Date/Time")
.ClientTemplate("<#= AirDate #> at <#= AirTime #>")
.Width(160);
columns.Bound(c => c.Status)
.ClientTemplate("<img src='../../Content/Images/<#= Status #>.png' alt='<#= Status #>' title='<#= Status #>' class='statusImage status-<#= Status #>' />" +
"<a href=\"../Episode/Season?episodeId=<#= EpisodeId #>\" onclick=\"searchForEpisode('<#= EpisodeId #>'); return false;\"><img src='../../Content/Images/Search.png' alt='Search' title='Search for episode' class='searchImage' /></a>"
2011-12-08 09:22:16 +03:00
).Width(100);
2011-05-20 01:59:30 +03:00
})
.DetailView(detailView => detailView.ClientTemplate(
"<fieldset>" +
"<div><b>Overview: </b><#= Overview #></div>" +
"</fieldset>"
))
.DataBinding(data => data.Ajax().Select("_AjaxBindingWeek", "Upcoming"))
2011-09-29 03:20:29 +03:00
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.AirDateTime).Ascending()).Enabled(true))
2012-01-30 04:38:44 +03:00
.ClientEvents(clientEvents =>
{
2012-01-30 09:14:46 +03:00
clientEvents.OnRowDataBound("grid_rowBound");
2012-01-30 04:38:44 +03:00
if (EnviromentProvider.IsProduction)
clientEvents.OnError("grid_onError");
})
2011-05-20 01:59:30 +03:00
.Render();}
2011-03-24 01:41:38 +02:00
</div>
2011-12-01 08:25:01 +03:00
</div>
2012-01-30 09:14:46 +03:00
@section Scripts{
<script type="text/javascript">
function grid_rowBound(e) {
highlightRow(e);
}
</script>
}