2012-02-07 04:22:17 +03:00
|
|
|
@using NzbDrone.Web.Helpers
|
|
|
|
@model NzbDrone.Web.Models.UpcomingEpisodesModel
|
|
|
|
|
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")
|
2012-02-22 19:12:12 +03:00
|
|
|
|
|
|
|
<style>
|
|
|
|
.gridControls {
|
|
|
|
float: right;
|
|
|
|
padding: 0px 5px 25px 0px;
|
|
|
|
}
|
|
|
|
</style>
|
2011-12-09 07:57:23 +03:00
|
|
|
}
|
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-06-29 07:51:30 +03:00
|
|
|
|
2012-02-22 19:12:12 +03:00
|
|
|
<div class="gridControls">
|
|
|
|
@Html.CheckBox("hideDownloaded") Hide Downloaded
|
|
|
|
</div>
|
|
|
|
|
2012-02-07 04:22:17 +03:00
|
|
|
<table class="seriesTable">
|
|
|
|
<colgroup>
|
|
|
|
<col/>
|
2012-02-07 07:16:40 +03:00
|
|
|
<col style="width:90px" />
|
2012-02-07 07:22:00 +03:00
|
|
|
<col style="width:300px" />
|
2012-02-07 04:22:17 +03:00
|
|
|
<col style="width:160px" />
|
|
|
|
<col style="width:100px" />
|
|
|
|
</colgroup>
|
2012-02-08 01:28:53 +03:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Series Title</th>
|
2012-02-10 01:34:59 +03:00
|
|
|
<th>Episode</th>
|
2012-02-08 01:28:53 +03:00
|
|
|
<th>Episode Title</th>
|
|
|
|
<th>Air Time</th>
|
2012-02-07 04:22:17 +03:00
|
|
|
|
2012-02-08 01:28:53 +03:00
|
|
|
@*Commands/Status Column*@
|
|
|
|
<th>
|
|
|
|
Status
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr class="title-row">
|
|
|
|
<td colspan="6">
|
|
|
|
Yesterday
|
|
|
|
</td>
|
|
|
|
</tr>
|
2012-02-07 04:22:17 +03:00
|
|
|
|
2012-02-08 01:28:53 +03:00
|
|
|
@for (int i = 0; i < Model.Yesterday.Count; i++)
|
2012-02-07 04:22:17 +03:00
|
|
|
{
|
2012-02-08 01:28:53 +03:00
|
|
|
var episode = Model.Yesterday[i];
|
|
|
|
|
|
|
|
if (i % 2 == 0)
|
|
|
|
{
|
|
|
|
Html.RenderPartial("UpcomingEpisode", episode);
|
|
|
|
}
|
2012-01-30 09:14:46 +03:00
|
|
|
|
2012-02-08 01:28:53 +03:00
|
|
|
else
|
|
|
|
{
|
|
|
|
Html.RenderPartial("UpcomingEpisode", episode, new ViewDataDictionary { new KeyValuePair<string, object>("AltRow", true) });
|
|
|
|
}
|
2012-02-07 04:22:17 +03:00
|
|
|
}
|
2012-02-08 01:28:53 +03:00
|
|
|
<tr class="title-row">
|
|
|
|
<td colspan="6">
|
|
|
|
Today
|
|
|
|
</td>
|
|
|
|
</tr>
|
2012-02-07 04:22:17 +03:00
|
|
|
|
2012-02-08 01:28:53 +03:00
|
|
|
@for (int i = 0; i < Model.Today.Count; i++)
|
2012-02-07 04:22:17 +03:00
|
|
|
{
|
2012-02-08 01:28:53 +03:00
|
|
|
var episode = Model.Today[i];
|
|
|
|
|
|
|
|
if (i % 2 == 0)
|
|
|
|
{
|
|
|
|
Html.RenderPartial("UpcomingEpisode", episode);
|
|
|
|
}
|
2012-02-07 04:22:17 +03:00
|
|
|
|
2012-02-08 01:28:53 +03:00
|
|
|
else
|
|
|
|
{
|
|
|
|
Html.RenderPartial("UpcomingEpisode", episode, new ViewDataDictionary { new KeyValuePair<string, object>("AltRow", true) });
|
|
|
|
}
|
2012-02-07 04:22:17 +03:00
|
|
|
}
|
2012-02-08 01:28:53 +03:00
|
|
|
<tr class="title-row">
|
|
|
|
<td colspan="6">
|
|
|
|
Tomorrow
|
|
|
|
</td>
|
2012-02-07 04:22:17 +03:00
|
|
|
|
2012-02-08 01:28:53 +03:00
|
|
|
@for (int i = 0; i < Model.Tomorrow.Count; i++)
|
2012-02-07 04:22:17 +03:00
|
|
|
{
|
2012-02-08 01:28:53 +03:00
|
|
|
var episode = Model.Tomorrow[i];
|
|
|
|
|
|
|
|
if (i % 2 == 0)
|
|
|
|
{
|
|
|
|
Html.RenderPartial("UpcomingEpisode", episode);
|
|
|
|
}
|
2012-02-07 04:22:17 +03:00
|
|
|
|
2012-02-08 01:28:53 +03:00
|
|
|
else
|
|
|
|
{
|
|
|
|
Html.RenderPartial("UpcomingEpisode", episode, new ViewDataDictionary { new KeyValuePair<string, object>("AltRow", true) });
|
|
|
|
}
|
2012-02-07 04:22:17 +03:00
|
|
|
}
|
2012-02-08 01:28:53 +03:00
|
|
|
<tr class="title-row">
|
|
|
|
<td colspan="6">
|
|
|
|
Future Forecast
|
|
|
|
</td>
|
|
|
|
</tr>
|
2012-02-07 04:22:17 +03:00
|
|
|
|
2012-02-08 01:28:53 +03:00
|
|
|
@for (int i = 0; i < Model.Week.Count; i++)
|
2012-02-07 04:22:17 +03:00
|
|
|
{
|
2012-02-08 01:28:53 +03:00
|
|
|
var episode = Model.Week[i];
|
|
|
|
|
|
|
|
if (i % 2 == 0)
|
|
|
|
{
|
|
|
|
Html.RenderPartial("UpcomingEpisode", episode);
|
|
|
|
}
|
2012-02-07 04:22:17 +03:00
|
|
|
|
2012-02-08 01:28:53 +03:00
|
|
|
else
|
|
|
|
{
|
|
|
|
Html.RenderPartial("UpcomingEpisode", episode, new ViewDataDictionary { new KeyValuePair<string, object>("AltRow", true) });
|
|
|
|
}
|
2012-02-07 04:22:17 +03:00
|
|
|
}
|
2012-02-08 01:28:53 +03:00
|
|
|
</tbody>
|
2012-02-07 04:22:17 +03:00
|
|
|
</table>
|
|
|
|
|
|
|
|
@section Scripts{
|
2012-02-22 19:12:12 +03:00
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function () {
|
|
|
|
var cookieValue = $.cookie("hideDownloaded");
|
|
|
|
|
|
|
|
if (cookieValue == "true") {
|
|
|
|
$('#hideDownloaded').attr('checked', true);
|
|
|
|
toggleDownloaded(true);
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
$('#hideDownloaded').attr('checked', false);
|
|
|
|
toggleDownloaded(false);
|
|
|
|
}
|
|
|
|
});
|
2012-02-07 04:22:17 +03:00
|
|
|
|
2012-02-22 19:12:12 +03:00
|
|
|
$('#hideDownloaded').on('change', function () {
|
|
|
|
var checked = $(this).attr('checked');
|
|
|
|
toggleDownloaded(checked);
|
|
|
|
toggleHideDownloadedCookie(checked);
|
|
|
|
});
|
|
|
|
|
|
|
|
function toggleDownloaded(hide) {
|
2012-02-22 19:37:44 +03:00
|
|
|
var ready = $('.statusImage[title="Ready"]');
|
2012-02-22 19:12:12 +03:00
|
|
|
|
|
|
|
ready.each(function () {
|
|
|
|
if (hide) {
|
|
|
|
$(this).parents('tr').hide();
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
$(this).parents('tr').show();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function toggleHideDownloadedCookie(hide) {
|
|
|
|
if (hide)
|
|
|
|
$.cookie("hideDownloaded", true, { expires: 365 });
|
|
|
|
|
|
|
|
else
|
|
|
|
$.cookie("hideDownloaded", false, { expires: 365 });
|
|
|
|
}
|
|
|
|
</script>
|
2012-01-30 09:14:46 +03:00
|
|
|
}
|