mirror of
https://github.com/lazylibrarian/LazyLibrarian.git
synced 2026-02-18 23:04:11 -05:00
147 lines
6.2 KiB
HTML
147 lines
6.2 KiB
HTML
<%inherit file="base.html" />
|
|
<%!
|
|
import lazylibrarian
|
|
%>
|
|
|
|
<%def name="headerIncludes()">
|
|
<div id="subhead_container">
|
|
<form action="addMagazine" method="get">
|
|
<ul id="subhead_menu">
|
|
<li><a href="forceSearch?source=magazines" id="button"> Force Search </a></li>
|
|
<li><a href="forceProcess?source=magazines" id="button"> Force Post-Processing </a></li>
|
|
<li><a href="magazineScan" id="button"> Library Scan </a></li>
|
|
<li><a href="pastIssues?whichStatus=Skipped" id="button"> Past Issues </a></li>
|
|
<div style="float:right; margin-right:15px; margin-top:2px;">
|
|
<li><input type="text" placeholder="Magazine Title" name="title"></li>
|
|
<li><input type="submit" value="+Magazine"></li>
|
|
</div>
|
|
</ul>
|
|
</form>
|
|
</div>
|
|
</%def>
|
|
|
|
<%def name="body()">
|
|
<BR>
|
|
<h1>  Magazines</h1>
|
|
|
|
<p class="indented">
|
|
<form action="markMagazines" method="get">
|
|
<select name="action" id="action" style="margin-left:30px;margin-top:15px;margin-bottom:15px;">
|
|
<option value="Active">Active</option>
|
|
<option value="Paused">Paused</option>
|
|
<option value="Reset">Reset</option>
|
|
<option value="Remove">Remove</option>
|
|
<option value="Delete">Delete</option>
|
|
<option value="Leave" hidden>Leave</option>
|
|
</select>
|
|
<input type="submit" id="go" value="Go">
|
|
</p>
|
|
|
|
|
|
<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="seriesNum">Num</th>
|
|
<th id="lastacquired">Acquired</th>
|
|
<th id="issuedate">Latest Issue</th>
|
|
<th id="status">Status</th>
|
|
<th id="issue">Magazine</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
%for result in magazines:
|
|
<tr class="gradeZ">
|
|
<td id="select"><input type="checkbox" name="${result['Title']}" class="checkbox" /></td>
|
|
<td id="magtitle">${result['Title']}</td>
|
|
<!-- <td id="regex"> -->
|
|
<!-- <form action="updateRegex" method="get"><input type="hidden" name="title" value="${result['Title']}">-->
|
|
<!-- <select name="regex">-->
|
|
<!-- <option selected="selected">${result['Regex']}</option>-->
|
|
<!-- <option value="RegexA">(DD) MonthName YYYY</option>-->
|
|
<!-- <option value="RegexB">YYYY-MM</option>-->
|
|
<!-- <option value="RegexC">MonthName DD YYYY</option>-->
|
|
<!-- </select>-->
|
|
<!-- <input type="submit" value="Go">-->
|
|
<!-- </form>-->
|
|
<!-- </td>-->
|
|
<td id="seriesNum">${result['Count']}</td>
|
|
<td id="lastacquired">${result['LastAcquired']}</td>
|
|
<td id="issuedate">${result['IssueDate']}</td>
|
|
<td id="status">${result['Status']}</td>
|
|
%if result['IssueStatus'] == 'Open':
|
|
%if result['Count'] > 1:
|
|
<td id="issue"><a class="button orange" href="openMag?bookid=${result['safetitle']}" target="_self">Show</a></td>
|
|
%else:
|
|
<td id="issue"><a class="button green" href="openMag?bookid=${result['safetitle']}" target="_self">Open</a></td>
|
|
%endif
|
|
%else:
|
|
%if result['IssueStatus'] == 'Wanted':
|
|
<td id="issue"><a class="button red" href="searchForMag?bookid=${result['safetitle']}" target="_self"><span class="a">${result['IssueStatus']}</span><span class="b">Search</span></a></td>
|
|
%else:
|
|
%if result['IssueStatus'] == 'Snatched':
|
|
<td id="issue"><a class="button">${result['IssueStatus']}</a></td>
|
|
%else:
|
|
<td id="issue"><a class="button grey">${result['IssueStatus']}</a></td>
|
|
%endif
|
|
%endif
|
|
%endif
|
|
</tr>
|
|
%endfor
|
|
</tbody>
|
|
</table>
|
|
</%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()
|
|
{
|
|
|
|
$('#go').click(function () {
|
|
var action = $("#action").val();
|
|
if (action == "Delete") {
|
|
if (confirm('Are you sure you want to permanently delete the selected magazines?')) {
|
|
return
|
|
} else {
|
|
$("#action").val("Leave")
|
|
return
|
|
}
|
|
} else {
|
|
return
|
|
}
|
|
});
|
|
|
|
$('#book_table').dataTable(
|
|
{
|
|
"aoColumns": [
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null
|
|
],
|
|
"oLanguage": {
|
|
"sLengthMenu":"Show _MENU_ magazines per page",
|
|
"sEmptyTable": "No magazines found",
|
|
"sInfo":"Showing _START_ to _END_ of _TOTAL_ results",
|
|
"sInfoEmpty":"Showing 0 to 0 of 0 books",
|
|
"sInfoFiltered":"(filtered from _MAX_ total magazines)"},
|
|
"sPaginationType": "full_numbers",
|
|
"aLengthMenu": [[5, 10, 15, 25, 50, 100, -1], [5, 10, 15, 25, 50, 100, "All"]],
|
|
"iDisplayLength": ${lazylibrarian.DISPLAYLENGTH},
|
|
});
|
|
$('.dataTables_filter input').attr("placeholder", "Search table here");
|
|
});
|
|
</script>
|
|
</%def>
|