2012-02-09 01:05:16 +00:00
@model String
2012-01-30 01:38:44 +00:00
@using NzbDrone.Common
2011-12-09 04:57:23 +00:00
@using NzbDrone.Web.Helpers
2011-05-01 08:05:28 +00:00
@using NzbDrone.Web.Models;
2012-02-11 00:48:20 +00:00
@{ViewBag.Title = "Missing";}
2011-12-09 04:57:23 +00:00
@section HeaderContent
{
@Html.IncludeCss("Grid.css")
}
2011-10-21 23:33:54 +00:00
@section ActionMenu{
<ul class="sub-menu">
<li>@Ajax.ActionLink("Start RSS Sync", "RssSync", "Command", null, null)</li>
2012-01-25 01:21:20 +00:00
<li>@Ajax.ActionLink("Start Backlog Search", "BacklogSearch", "Command", null, null, new { title = "Backlog search for ALL missing episodes" })</li>
<li>@Ajax.ActionLink("Start Recent Backlog Search", "RecentBacklogSearch", "Command", null, null, new { title = "Backlog search for missing episodes that aired in the last 30 days only" })</li>
2011-10-21 23:33:54 +00:00
</ul>
}
2012-02-09 01:05:16 +00:00
<div class="grid-container">
2012-02-09 17:41:51 +00:00
<table id="missingGrid" class="dataTablesGrid hidden-grid">
2012-02-09 01:05:16 +00:00
<thead>
<tr>
2012-02-11 00:48:20 +00:00
<th>
Series Title
</th>
<th>
Episode
</th>
<th>
Episode Title
</th>
<th>
AirDate
</th>
2012-02-09 01:05:16 +00:00
@*Commands Column*@
2012-02-11 00:48:20 +00:00
<th>
Actions
</th>
2012-02-09 01:05:16 +00:00
@*Details Column*@
2012-02-11 00:48:20 +00:00
<th style="display: none;">
Details
</th>
2012-02-09 01:05:16 +00:00
</tr>
</thead>
<tbody>
@*@foreach(var history in Model)
2012-01-30 01:38:44 +00:00
{
2012-02-09 01:05:16 +00:00
Html.RenderPartial("History", history);
}*@
</tbody>
</table>
</div>
2012-02-11 00:48:20 +00:00
@section Scripts
{
<script type="text/javascript">
$(document).ready(function() {
$('#missingGrid').removeClass('hidden-grid');
2012-02-09 01:05:16 +00:00
2012-02-11 00:48:20 +00:00
oTable = $('.dataTablesGrid').dataTable({
2012-02-09 01:05:16 +00:00
//"sAjaxSource": "History/AjaxBinding",
//"bProcessing": true,
2012-02-11 00:48:20 +00:00
"bShowAll": false,
"aaData": @Html.Raw(Model),
2012-02-09 01:05:16 +00:00
"bPaginate": true,
"bLengthChange": false,
"bFilter": true,
"bSort": true,
"bInfo": true,
"bAutoWidth": false,
"iDisplayLength": 20,
"sPaginationType": "four_button",
"aoColumns": [
{ sWidth: 'auto', "mDataProp": "SeriesTitle" }, //Series Title
{ sWidth: '80px', "mDataProp": "EpisodeNumbering", "bSortable": false }, //EpisodeNumbering
{ sWidth: 'auto', "mDataProp": "EpisodeTitle", "bSortable": false }, //Episode Title
{ sWidth: '150px', "mDataProp": function (source, type, val) {
// 'display' and 'filter' use our fancy naming
if (type === 'display' || type === 'filter') {
return source["AirDateString"];
}
// 'sort' and 'type' both just use the raw data
return source["AirDate"];
}
}, //Grabbed On
{ sWidth: '40px', "mDataProp": "EpisodeId", "bSortable": false, "fnRender": function (row) {
return createImageAjaxLink('/Episode/Search?episodeId=' + row.aData["EpisodeId"], '../../Content/Images/Search.png', 'Search', 'Search for Episode', 'searchImage');
}
}, //Actions
{ sWidth: 'auto', "mDataProp": "Details", "bSortable": false, "bVisible": false, "fnRender": function (row) {
var result = "<b>Overview: </b>" + row.aData["Overview"] + "<br/>";
return result;
}
} //Details
],
"aaSorting": [[3, 'desc']]
});
});
2012-02-11 00:48:20 +00:00
</script>
}