mirror of
https://github.com/lazylibrarian/LazyLibrarian.git
synced 2026-06-12 09:35:37 -04:00
149 lines
6.1 KiB
HTML
149 lines
6.1 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="Search"></li>
|
|
</div>
|
|
</ul>
|
|
</form>
|
|
</div>
|
|
</%def>
|
|
|
|
<%def name="body()">
|
|
<BR><BR>
|
|
<h1>  ${title}</h1>
|
|
<p class="indented">
|
|
<form action="markMagazines" method="get">
|
|
<label>  Mark selected magazines as: </label>
|
|
<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>
|
|
% if covercount > 0:
|
|
<th id="bookart">Cover</th>
|
|
% else:
|
|
<th id="bookart" hidden="true">Cover</th>
|
|
% endif
|
|
<th id="bookname">Title</th>
|
|
<th id="number">Num</th>
|
|
<th id="series">Acquired</th>
|
|
<th id="date">Latest</th>
|
|
<th id="stars">Status</th>
|
|
<th id="status">Show</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
%for result in magazines:
|
|
<tr class="gradeZ">
|
|
<td id="select"><input type="checkbox" name="${result['Title']}" class="checkbox" /></td>
|
|
% if covercount > 0:
|
|
<td id="bookart"><a href="${result['Cover']}" target="_blank"><img src="${result['Cover']}" alt="cover" height="75" width="50"></a></td>
|
|
% else:
|
|
<td id="bookart" hidden="true"><a href="${result['Cover']}" target="_blank"><img src="${result['Cover']}" alt="cover" height="75" width="50"></a></td>
|
|
% endif
|
|
<td id="bookname">${result['Title']}</td>
|
|
<td id="number">${result['Count']}</td>
|
|
<td id="series">${result['LastAcquired']}</td>
|
|
<td id="date">${result['IssueDate']}</td>
|
|
<td id="status">${result['Status']}</td>
|
|
%if result['IssueStatus'] == 'Open':
|
|
%if result['Count'] == 1 and lazylibrarian.CONFIG['MAG_SINGLE']:
|
|
<td id="issue"><a class="button green" href="openMag?bookid=${result['safetitle']}" target="_self">Open</a></td>
|
|
%else:
|
|
<td id="issue"><a class="button orange" href="openMag?bookid=${result['safetitle']}" target="_self">Show</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>
|
|
</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 src="js/libs/natural.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": [
|
|
{"bSortable": false},
|
|
{"bSortable": false},
|
|
null,
|
|
{ "sType": "natural" },
|
|
null,
|
|
{ "sType": "natural" },
|
|
null,
|
|
{"bSortable": false}
|
|
],
|
|
"order": [[ 2, 'asc']],
|
|
"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 magazines",
|
|
"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.CONFIG['DISPLAYLENGTH']},
|
|
});
|
|
$('.dataTables_filter input').attr("placeholder", "Search table here");
|
|
});
|
|
</script>
|
|
</%def>
|