mirror of
https://github.com/lazylibrarian/LazyLibrarian.git
synced 2026-06-11 17:17:23 -04:00
171 lines
7.6 KiB
HTML
171 lines
7.6 KiB
HTML
<%inherit file="base.html"/>
|
|
<%!
|
|
import lazylibrarian
|
|
%>
|
|
<%def name="headerIncludes()">
|
|
<div id="subhead_container">
|
|
<a href="authorPage?AuthorID=${series['AuthorID']}" class="btn btn-sm btn-primary">
|
|
<i class="fa fa-chevron-left"></i> Return to Author</a>
|
|
<a href="series?AuthorID=${series['AuthorID']}" class="btn btn-sm btn-primary">
|
|
<i class="fa fa-list"></i> Series List</a>
|
|
%if perm&lazylibrarian.perm_force:
|
|
<a href="refreshAuthor?AuthorID=${series['AuthorID']}" class="btn btn-sm btn-primary">
|
|
<i class="fa fa-sync"></i> Refresh Author</a>
|
|
%endif
|
|
</div>
|
|
</%def>
|
|
<%def name="body()">
|
|
%if multi == "True":
|
|
<h1>${title}</h1>
|
|
%else:
|
|
<h1>${series['AuthorName']} : ${title}</h1>
|
|
%endif
|
|
<form action="markBooks" method="get" class="form-inline">
|
|
<div class="indented">
|
|
<input type="hidden" name="redirect" value="members">
|
|
<input type="hidden" name="seriesid" value="${series['SeriesID']}">
|
|
<input type="hidden" name="AuthorID" value="${series['AuthorID']}">
|
|
%if perm&lazylibrarian.perm_status:
|
|
<div class="form-group">
|
|
<label for="marktype" class="">Mark selected </label>
|
|
% if lazylibrarian.SHOW_AUDIO != 0:
|
|
<select class="markTypes form-control input-sm" id="marktype" name="marktype">
|
|
// would be nice to use fontawesome icons here but options are not styleable
|
|
// and some browsers don't show them, eg linux firefox, android chrome
|
|
// They only show icons on closed select, not in dropdown
|
|
%for item in ["eBook", "AudioBook", "eBook+Audio"]:
|
|
<option value="${item}">${item}</option>
|
|
%endfor
|
|
</select>
|
|
%else:
|
|
<label for="marktype" class="">Mark selected eBook </label>
|
|
<select class="markTypes form-control input-sm hidden" id="marktype" name="marktype">
|
|
<option value="eBook">eBook</option>
|
|
</select>
|
|
%endif
|
|
<label for="action" class=""> as </label>
|
|
<select class="markBooks form-control input-sm" id="action" name="action">
|
|
// would be nice to use fontawesome icons here but options are not styleable
|
|
// and some browsers don't show them, eg linux firefox, android chrome
|
|
// They only show icons on closed select, not in dropdown
|
|
%for item in ["Wanted", "Have", "Ignored", "Skipped", "Remove", "Delete"]:
|
|
<option value="${item}">${item}</option>
|
|
%endfor
|
|
%if lazylibrarian.CONFIG['USER_ACCOUNTS']:
|
|
<option value="Unread">Unread</option>
|
|
<option value="Read">Read</option>
|
|
<option value="ToRead">To Read</option>
|
|
%endif
|
|
</select>
|
|
</div>
|
|
<input type="submit" class="markBooks btn btn-sm btn-primary" value="Go">
|
|
%endif
|
|
%if lazylibrarian.CONFIG['TOGGLES'] == True:
|
|
Toggle: <a class="toggle-vis" data-column="1">Cover</a> - <a class="toggle-vis" data-column="2">Title</a> - <a class="toggle-vis" data-column="3">Author</a> - <a class="toggle-vis" data-column="4">Num</a> - <a class="toggle-vis" data-column="5">Status</a>
|
|
%endif
|
|
</div>
|
|
<p> </p>
|
|
<div class="table-responsive">
|
|
<table class="display table table-striped table-hover table-bordered" id="book_table">
|
|
<thead>
|
|
<tr>
|
|
%if perm&lazylibrarian.perm_status:
|
|
<th class="select text-center no-sort"><input type="checkbox" onClick="toggleAll(this)" /></th>
|
|
%else:
|
|
<td class="hidden"></td>
|
|
%endif
|
|
<th class="bookart text-center no-sort hidden-xs">Cover</th>
|
|
<th class="bookname">Title</th>
|
|
%if multi == "True":
|
|
<th class="authorname">Author</th>
|
|
%else:
|
|
<th class="authorname hidden">Author</th>
|
|
%endif
|
|
<th class="date col-xs-1 text-center">Num</th>
|
|
<th class="status text-center">Status</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
%for result in members:
|
|
<tr>
|
|
%if perm&lazylibrarian.perm_status:
|
|
<td class="select text-center"><input type="checkbox" name="${result['BookID']}" /></td>
|
|
%else:
|
|
<td class="hidden"></td>
|
|
%endif
|
|
<td class="bookart text-center hidden-xs"><a href="${result['BookImg']}" target="_blank" rel="noreferrer"><img src="${result['BookImg']}" class="bookcover-xs img-responsive" alt="Cover"></a></td>
|
|
<td class="bookname">
|
|
<button onclick="bookinfo(${result['BookID']})" class="button btn btn-link" type="button">${result['BookName']}</button><br>
|
|
<a href="${result['BookLink']}" target="_new"><small><i>GoodReads</i></small></a>
|
|
<a href="${result['WorkPage']}" target="_new"><small><i>LibraryThing</i></small></a>
|
|
%if perm&lazylibrarian.perm_edit:
|
|
<a href="editBook?bookid=${result['BookID']}" target="_new"><small><i>Manual</i></small></a>
|
|
%endif
|
|
</td>
|
|
%if multi == "True":
|
|
<td class="authorname">${result['AuthorName']}</td>
|
|
%else:
|
|
<td class="authorname hidden">${result['AuthorName']}</td>
|
|
%endif
|
|
<td class="date text-center">${result['SeriesNum']}</td>
|
|
%if 'Open' in result['Status']:
|
|
<td class="status text-center">
|
|
<a class="button green btn btn-xs btn-warning" href="openBook?bookid=${result['BookID']}&library=eBook"
|
|
target="_self"><i class="fa fa-book"></i> Open${result['Flag']}</a>
|
|
%else:
|
|
<td class="status text-center"><i class="fa fa-book"></i> ${result['Status']}${result['Flag']}
|
|
%endif
|
|
% if lazylibrarian.SHOW_AUDIO != 0:
|
|
<br>
|
|
%if 'Open' in result['AudioStatus']:
|
|
<a class="button green btn btn-xs btn-warning" href="openBook?bookid=${result['BookID']}&library=AudioBook"
|
|
target="_self"><i class="fa fa-headphones"></i> Open</a>
|
|
%else:
|
|
<i class="fa fa-headphones"></i> ${result['AudioStatus']}
|
|
%endif
|
|
% endif
|
|
</td>
|
|
</tr>
|
|
%endfor
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</form>
|
|
<p> </p>
|
|
</%def>
|
|
<%def name="headIncludes()">
|
|
</%def>
|
|
<%def name="javascriptIncludes()">
|
|
<script>
|
|
$(document).ready(function()
|
|
{
|
|
var oTable = $('#book_table').DataTable(
|
|
{
|
|
"bAutoWidth": false,
|
|
"order": [[ 4, 'asc' ]],
|
|
"columnDefs": [{ targets: 'no-sort', orderable: false },
|
|
{ type: 'natural', targets: 4 }],
|
|
"oLanguage": {
|
|
"sSearch": "Filter: ",
|
|
"sLengthMenu":"_MENU_ rows per page",
|
|
"sEmptyTable": "No books found",
|
|
"sInfo":"Showing _START_ to _END_ of _TOTAL_ rows",
|
|
"sInfoEmpty":"Showing 0 to 0 of 0 rows",
|
|
"sInfoFiltered":"(filtered from _MAX_ total rows)"},
|
|
"sPaginationType": "full_numbers",
|
|
"aaSorting": [[4, 'asc']],
|
|
"aLengthMenu": [[5, 10, 15, 25, 50, 100, -1], [5, 10, 15, 25, 50, 100, "All"]],
|
|
"iDisplayLength": ${lazylibrarian.CONFIG['DISPLAYLENGTH']},
|
|
});
|
|
$('.dataTables_filter input').attr("placeholder", "Results filter");
|
|
//$(window).resize(function() {oTable.draw(false)});
|
|
$('a.toggle-vis').click(function (e) {
|
|
e.preventDefault();
|
|
var column = oTable.column( $(this).attr('data-column') );
|
|
column.visible( ! column.visible() );
|
|
} );
|
|
});
|
|
|
|
</script>
|
|
</%def>
|