2011-12-10 06:05:17 +01:00
|
|
|
@model List<HistoryModel>
|
2012-01-30 02:38:44 +01:00
|
|
|
@using NzbDrone.Common
|
2011-04-21 06:20:39 +02:00
|
|
|
@using NzbDrone.Web.Models
|
2011-12-09 05:57:23 +01:00
|
|
|
@using NzbDrone.Web.Helpers
|
2011-12-10 06:05:17 +01:00
|
|
|
@{ViewBag.Title = "History";}
|
2011-04-21 06:20:39 +02:00
|
|
|
@section ActionMenu{
|
2011-08-22 04:56:04 +02:00
|
|
|
<ul class="sub-menu">
|
2011-12-01 06:25:01 +01:00
|
|
|
<li>@Ajax.ActionLink("Trim History", "Trim", "History", new AjaxOptions { OnSuccess = "reloadHistoryGrid" })</li>
|
|
|
|
<li>@Ajax.ActionLink("Purge History", "Purge", "History", new AjaxOptions { OnSuccess = "reloadHistoryGrid" })</li>
|
2011-08-06 04:04:35 +02:00
|
|
|
</ul>
|
2011-04-21 06:20:39 +02:00
|
|
|
}
|
2011-12-09 05:57:23 +01:00
|
|
|
@section HeaderContent
|
|
|
|
{
|
|
|
|
@Html.IncludeCss("Grid.css")
|
|
|
|
}
|
2012-02-08 09:17:40 +01:00
|
|
|
|
2011-12-01 06:25:01 +01:00
|
|
|
<div class="grid-container">
|
2012-02-08 09:17:40 +01:00
|
|
|
<table id="historyGrid" class="hidden-grid">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th></th>
|
|
|
|
<th>Series Title</th>
|
|
|
|
<th>Season #</th>
|
|
|
|
<th>Episode #</th>
|
|
|
|
<th>Episode Title</th>
|
|
|
|
<th>Quality</th>
|
|
|
|
<th>Grabbed On</th>
|
|
|
|
|
|
|
|
@*Commands Column*@
|
|
|
|
<th>Actions</th>
|
|
|
|
|
|
|
|
@*Details Column*@
|
|
|
|
<th>Detailsn</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
@foreach(var history in Model)
|
|
|
|
{
|
|
|
|
Html.RenderPartial("History", history);
|
|
|
|
}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2011-12-01 06:25:01 +01:00
|
|
|
</div>
|
2012-02-08 09:17:40 +01:00
|
|
|
|
2011-08-06 04:04:35 +02:00
|
|
|
<script type="text/javascript">
|
2011-08-27 02:59:51 +02:00
|
|
|
deleteHistoryRowUrl = '../History/Delete';
|
|
|
|
redownloadUrl = '../History/Redownload';
|
2011-08-06 04:04:35 +02:00
|
|
|
|
2011-08-22 03:00:12 +02:00
|
|
|
function reloadHistoryGrid() {
|
2011-08-27 02:59:51 +02:00
|
|
|
var grid = $('#history').data('tGrid');
|
2011-11-10 17:22:52 +01:00
|
|
|
grid.ajaxRequest();
|
2011-08-27 02:59:51 +02:00
|
|
|
}
|
2012-02-08 09:17:40 +01:00
|
|
|
|
|
|
|
$(document).ready(function () {
|
|
|
|
$('#historyGrid').removeClass('hidden-grid');
|
|
|
|
|
|
|
|
oTable = $('#historyGrid').dataTable({
|
|
|
|
"bPaginate": true,
|
|
|
|
"bLengthChange": false,
|
|
|
|
"bFilter": true,
|
|
|
|
"bSort": true,
|
|
|
|
"bInfo": true,
|
|
|
|
"bAutoWidth": false,
|
|
|
|
"iDisplayLength": 20,
|
|
|
|
"sPaginationType": "four_button",
|
|
|
|
"aoColumns": [
|
|
|
|
{ sWidth: '20px', "bSortable": false }, //Image
|
|
|
|
{ sWidth: 'auto' }, //Series Title
|
|
|
|
{ sWidth: '90px' }, //Season #
|
|
|
|
{ sWidth: '90px' }, //Episode #
|
|
|
|
{ sWidth: 'auto' }, //Episode Title
|
|
|
|
{ sWidth: '70px' }, //Quality
|
|
|
|
{ sWidth: '150px' }, //Grabbed On
|
|
|
|
{ sWidth: '40px', "bSortable": false }, //Actions
|
|
|
|
{ sWidth: 'auto', "bSortable": false, "bVisible": false } //Details
|
|
|
|
],
|
|
|
|
"aaSorting": [[6, 'desc']]
|
|
|
|
});
|
|
|
|
});
|
2011-12-01 06:25:01 +01:00
|
|
|
</script>
|