mirror of
https://github.com/lazylibrarian/LazyLibrarian.git
synced 2026-06-12 09:35:37 -04:00
114 lines
4.9 KiB
HTML
114 lines
4.9 KiB
HTML
<%inherit file="base.html" />
|
|
<%!
|
|
import lazylibrarian
|
|
from lazylibrarian import database
|
|
%>
|
|
|
|
<%def name="headerIncludes()">
|
|
<div id="subhead_container">
|
|
<div id="subhead_menu">
|
|
<a href="forceSearch?source=magazines" class="button btn btn-sm btn-primary"><i class="fa fa-search"></i> Force Search</a>
|
|
<a href="forceProcess?source=magazines" class="button btn btn-sm btn-primary">Force Post-Processing</a>
|
|
<a href="magazineScan" class="button btn btn-sm btn-primary"><i class="fa fa-flash"></i> Library Scan</a>
|
|
<a href="pastIssues?whichStatus=Skipped" class="button btn btn-sm btn-primary"><i class="fa fa-calendar"></i> Past Issues</a>
|
|
</div>
|
|
</div>
|
|
</%def>
|
|
|
|
<%def name="body()">
|
|
<h1>Issues</h1>
|
|
<form action="markIssues" method="get" class="form-inline">
|
|
<div class="form-group">
|
|
<label for="action" class="control-label">Selected issues:</label>
|
|
<select name="action" id="action" class="form-control input-sm">
|
|
<option value="Remove" selected>Remove</option>
|
|
<option value="Delete">Delete</option>
|
|
<option value="Leave" hidden>Leave</option>
|
|
</select>
|
|
<button type="submit" value="Go" id="go" class="btn btn-sm btn-primary">Go</button>
|
|
</div>
|
|
<p> </p>
|
|
<div class="table-responsive">
|
|
<table class="table table-striped table-hover table-bordered" id="book_tablez">
|
|
<thead>
|
|
<tr>
|
|
<th class="select no-sort"><input type="checkbox" onClick="toggleAll(this)" class="form-control" /></th>
|
|
% if covercount > 0:
|
|
<th class="bookart no-sort" width=50%>Cover</th>
|
|
% else:
|
|
<th class="bookart hidden">Cover</th>
|
|
% endif
|
|
<th class="issuedate text-center">${issues[0]['Title']}</th>
|
|
<th class="lastacquired text-center">Acquired</th>
|
|
<th class="issue text-center">Issue</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
%for result in issues:
|
|
<tr>
|
|
<td class="select"><input type="checkbox" name="${result['IssueID']}" class="form-control" /></td>
|
|
% if covercount > 0:
|
|
<td class="bookart"><a href="${result['Cover']}" target="_blank" rel="noreferrer"><img src="${result['Cover']}" alt="cover" width="90%"></a></td>
|
|
% else:
|
|
<td class="bookart hidden"><a href="${result['Cover']}" target="_blank" rel="noreferrer"><img src="${result['Cover']}" alt="Cover"></a></td>
|
|
% endif
|
|
<td class="issuedate text-center">${result['IssueDate']}</td>
|
|
<td class="lastacquired text-center">${result['IssueAcquired']}</td>
|
|
<td class="issue text-center"><a class="button green btn btn-xs btn-warning" href="openMag?bookid=${result['IssueID']}" target="_self"><i class="fa fa-book"></i> Open</a></td>
|
|
</tr>
|
|
%endfor
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
</form>
|
|
</%def>
|
|
|
|
<%def name="headIncludes()">
|
|
|
|
</%def>
|
|
|
|
<%def name="javascriptIncludes()">
|
|
|
|
<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 issues?')) {
|
|
return
|
|
} else {
|
|
$("#action").val("Leave")
|
|
return
|
|
}
|
|
} else {
|
|
return
|
|
}
|
|
});
|
|
|
|
$('#book_table').dataTable(
|
|
{
|
|
"responsive": true,
|
|
"order": [[ 2, 'asc']],
|
|
"columnDefs":
|
|
[{ targets: 'no-sort', orderable: false }]
|
|
,
|
|
"oLanguage": {
|
|
"sLengthMenu":"Show _MENU_ issues per page",
|
|
"sEmptyTable": "No issues found",
|
|
"sInfo":"Showing _START_ to _END_ of _TOTAL_ results",
|
|
"sInfoEmpty":"Showing 0 to 0 of 0 issues",
|
|
"sInfoFiltered":"(filtered from _MAX_ total issues)"},
|
|
"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 filter");
|
|
});
|
|
</script>
|
|
</%def>
|