2012-03-02 08:02:42 +03:00
|
|
|
@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
|
|
|
|
{
|
2012-02-22 19:12:12 +03:00
|
|
|
<style>
|
2012-02-25 22:41:48 +03:00
|
|
|
.gridControls
|
|
|
|
{
|
2012-02-22 19:12:12 +03:00
|
|
|
float: right;
|
2012-02-25 22:41:48 +03:00
|
|
|
padding-top: 10px;
|
2012-02-22 22:52:31 +03:00
|
|
|
visibility: hidden;
|
2012-02-22 19:12:12 +03:00
|
|
|
}
|
2012-02-25 22:41:48 +03:00
|
|
|
|
|
|
|
.sub-menu
|
|
|
|
{
|
|
|
|
float: left;
|
|
|
|
}
|
2012-02-22 19:12:12 +03:00
|
|
|
</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">
|
2012-03-14 00:04:42 +03:00
|
|
|
<li>@Ajax.ActionLink("Start RSS Sync", "RssSync", "Command", null, null, new { Title = "Check for newly released downloads" })</li>
|
2011-08-06 05:04:35 +03:00
|
|
|
</ul>
|
2011-04-21 09:18:28 +03:00
|
|
|
}
|
2012-02-22 19:12:12 +03:00
|
|
|
<div class="gridControls">
|
2012-02-22 22:52:31 +03:00
|
|
|
@Html.CheckBox("showDownloaded", true)
|
2012-02-25 22:41:48 +03:00
|
|
|
<label for="showDownloaded">
|
|
|
|
Show Downloaded</label>
|
2012-02-22 19:12:12 +03:00
|
|
|
</div>
|
2012-02-07 04:22:17 +03:00
|
|
|
<table class="seriesTable">
|
|
|
|
<colgroup>
|
2012-02-25 22:41:48 +03:00
|
|
|
<col />
|
|
|
|
<col style="width: 90px" />
|
|
|
|
<col style="width: 300px" />
|
|
|
|
<col style="width: 160px" />
|
|
|
|
<col style="width: 100px" />
|
2012-02-07 04:22:17 +03:00
|
|
|
</colgroup>
|
2012-02-08 01:28:53 +03:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2012-02-25 22:41:48 +03:00
|
|
|
<th>
|
|
|
|
Series Title
|
|
|
|
</th>
|
|
|
|
<th>
|
|
|
|
Episode
|
|
|
|
</th>
|
|
|
|
<th>
|
|
|
|
Episode Title
|
|
|
|
</th>
|
|
|
|
<th>
|
|
|
|
Air Time
|
|
|
|
</th>
|
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>
|
|
|
|
@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];
|
2012-02-25 22:41:48 +03:00
|
|
|
|
2012-02-08 01:28:53 +03:00
|
|
|
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>
|
|
|
|
@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];
|
2012-02-25 22:41:48 +03:00
|
|
|
|
2012-02-08 01:28:53 +03:00
|
|
|
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-25 22:41:48 +03:00
|
|
|
@for (int i = 0; i < Model.Tomorrow.Count; i++)
|
2012-02-08 01:28:53 +03:00
|
|
|
{
|
2012-02-25 22:41:48 +03:00
|
|
|
var episode = Model.Tomorrow[i];
|
2012-02-07 04:22:17 +03:00
|
|
|
|
2012-02-25 22:41:48 +03:00
|
|
|
if (i % 2 == 0)
|
|
|
|
{
|
|
|
|
Html.RenderPartial("UpcomingEpisode", episode);
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
{
|
|
|
|
Html.RenderPartial("UpcomingEpisode", episode, new ViewDataDictionary { new KeyValuePair<string, object>("AltRow", true) });
|
|
|
|
}
|
2012-02-08 01:28:53 +03:00
|
|
|
}
|
2012-02-25 22:41:48 +03:00
|
|
|
<tr class="title-row">
|
|
|
|
<td colspan="6">
|
2012-03-02 23:20:30 +03:00
|
|
|
Later
|
2012-02-25 22:41:48 +03:00
|
|
|
</td>
|
|
|
|
</tr>
|
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];
|
2012-02-25 22:41:48 +03:00
|
|
|
|
2012-02-08 01:28:53 +03:00
|
|
|
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 () {
|
2012-02-22 22:52:31 +03:00
|
|
|
var cookieValue = $.cookie("showDownloaded");
|
2012-02-22 19:12:12 +03:00
|
|
|
|
2012-02-22 22:52:31 +03:00
|
|
|
if (cookieValue == "false") {
|
|
|
|
$('#showDownloaded').attr('checked', false);
|
|
|
|
toggleDownloaded(false);
|
2012-02-22 19:12:12 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
2012-02-22 22:52:31 +03:00
|
|
|
$('#showDownloaded').attr('checked', true);
|
|
|
|
toggleDownloaded(true);
|
2012-02-22 19:12:12 +03:00
|
|
|
}
|
2012-02-22 22:52:31 +03:00
|
|
|
|
|
|
|
$('#showDownloaded').button();
|
|
|
|
$('.gridControls').css('visibility', 'visible');
|
2012-02-22 19:12:12 +03:00
|
|
|
});
|
2012-02-07 04:22:17 +03:00
|
|
|
|
2012-02-22 22:52:31 +03:00
|
|
|
$('#showDownloaded').on('change', function () {
|
2012-02-22 19:12:12 +03:00
|
|
|
var checked = $(this).attr('checked');
|
|
|
|
toggleDownloaded(checked);
|
|
|
|
toggleHideDownloadedCookie(checked);
|
|
|
|
});
|
|
|
|
|
2012-02-22 22:52:31 +03:00
|
|
|
function toggleDownloaded(show) {
|
2012-02-22 19:37:44 +03:00
|
|
|
var ready = $('.statusImage[title="Ready"]');
|
2012-02-22 19:12:12 +03:00
|
|
|
|
|
|
|
ready.each(function () {
|
2012-02-22 22:52:31 +03:00
|
|
|
if (show) {
|
|
|
|
$(this).parents('tr').show();
|
2012-02-22 19:12:12 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
2012-02-22 22:52:31 +03:00
|
|
|
$(this).parents('tr').hide();
|
2012-02-22 19:12:12 +03:00
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2012-02-22 22:52:31 +03:00
|
|
|
function toggleHideDownloadedCookie(show) {
|
|
|
|
if (show)
|
|
|
|
$.cookie("showDownloaded", true, { expires: 365 });
|
2012-02-25 22:41:48 +03:00
|
|
|
|
2012-02-22 19:12:12 +03:00
|
|
|
else
|
2012-02-22 22:52:31 +03:00
|
|
|
$.cookie("showDownloaded", false, { expires: 365 });
|
2012-02-22 19:12:12 +03:00
|
|
|
}
|
|
|
|
</script>
|
2012-02-25 22:41:48 +03:00
|
|
|
}
|