Files
LazyLibrarian/data/interfaces/default/manageissues.html
2016-10-25 18:05:54 +02:00

109 lines
3.7 KiB
HTML

<%inherit file="base.html" />
<%!
import lazylibrarian
%>
<%def name="headerIncludes()">
<div id="subhead_container">
</div>
</%def>
<%def name="body()">
<BR>
<h1>&nbsp&nbspManage Past Issues</h1><br>
<form action="pastIssues" method="get">
Manage Issues with status <select name="whichStatus">
%for item in ['Skipped', 'Have', 'Ignored']:
<option value="${item}"
%if whichStatus == item:
selected = "selected"
%endif
>${item}</option>
%endfor
</select>
<input class="btn" type="submit" value="Manage" />
</form>
<br>
<h3>Magazines with status ${whichStatus}</h3>
<br>
<form action="markPastIssues" method="get"><input type="hidden" name="redirect" value="manageissues">
<table class="display" id="book_table">
<thead>
<tr>
<th id="select"><input type="checkbox" onClick="toggleAll(this)" /></th>
<th id="magtitle">Title</th>
<th id="lastacquired">NZBdate</th>
<th id="issuedate">Issue Date</th>
<th id="provider">NZBprov</th>
</tr>
</thead>
<!--
<tbody>
%for result in issues:
<tr class="gradeZ">
<td id="select"><input type="checkbox" name="${result['NZBurl']}" class="checkbox" /></td>
<td id="magtitle"><BR>${result['NZBtitle']}<BR><BR></td>
<td id="lastacquired">${result['NZBdate']}</td>
<td id="issuedate">${result['Auxinfo']}</td>
<td id="provider">${result['NZBprov']}</td>
<td id="status">${result['Status']}</td>
</tr>
%endfor
</tbody>
-->
</table>
<p>
Change selected magazines to <select class="markPastIssues" name="action" style="margin-left:30px;margin-top:15px;margin-bottom:15px;">
%for item in ['Skipped', 'Wanted', 'Have', 'Ignored', 'Remove']:
%if whichStatus != item:
<option value="${item}">${item}</option>
%endif
%endfor
</select>
<input type="submit" class="markPastIssues" value="Go">
</p>
</form>
</%def>
<%def name="headIncludes()">
<link rel="stylesheet" href="css/data_table.css">
</%def>
<%def name="javascriptIncludes()">
<script src="js/libs/jquery.dataTables.min.js"></script>
<script>
$(document).ready(function()
{
$('#book_table').dataTable(
{
"order": [[ 1, 'asc' ]],
"aoColumns": [
{"bSortable": false},
null,
null,
null,
null
],
"oLanguage": {
"sLengthMenu":"Show _MENU_ magazines per page",
"sEmptyTable": "No matching issues found",
"sInfo":"Showing _START_ to _END_ of _TOTAL_ results",
"sInfoEmpty":"Showing 0 to 0 of 0 magazines",
"sInfoFiltered":"(filtered from _MAX_ total magazines)"},
"aLengthMenu": [[5, 10, 15, 25, 50, 100, -1], [5, 10, 15, 25, 50, 100, "All"]],
"iDisplayLength": ${lazylibrarian.DISPLAYLENGTH},
"sPaginationType": "full_numbers",
"aaSorting": [[1, 'asc']],
"bServerSide": true,
// need to pass requested status filter
"sAjaxSource": 'getPastIssues?whichStatus=Skipped',
"bFilter": true,
});
$('.dataTables_filter input').attr("placeholder", "Search table here");
});
</script>
</%def>