30 lines
1.1 KiB
HTML
30 lines
1.1 KiB
HTML
<h3>Books in Series</h1>
|
|
<table id="book_table" class="table table-striped table-sm" data-toolbar="#toolbar" data-search="true">
|
|
<thead>
|
|
<tr class="thead-light"><th>Title</th><th>Book Number</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for book in books %}
|
|
<tr>
|
|
{% if book.sub_book_num is defined %}
|
|
<td><a href="/book/{{book.id}}"> {{book.title}}</a></td>
|
|
{% else %}
|
|
<td><a href="/book/{{book.id}}">{{book.title}}</a></td>
|
|
{% endif %}
|
|
<td data-sort="{{series_id, SeriesBookNum( series_id, book.id )}}">{{ SeriesBookNum( series_id, book.id ) }}
|
|
</a></td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
|
|
<script src="https://cdn.datatables.net/1.10.22/js/dataTables.bootstrap4.min.js"></script>
|
|
<script>
|
|
$(document).ready(function() {
|
|
$('#book_table').DataTable( {
|
|
"paging": false, "searching": false, "info": false,
|
|
"order": [[1, 'asc']],
|
|
"columnDefs": [ { "type": "num", "targets": 1 } ] } );
|
|
} );
|
|
</script>
|