cleaned up tabs on comments in main.py, allowed series edit page to stretch full page, shrank font for books in series table, added move up/down buttons (non-functional as yet), and visualised books being in more than one series
This commit is contained in:
@@ -1,21 +1,33 @@
|
||||
<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>
|
||||
<table id="book_table" class="table table-striped table-sm small" 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>
|
||||
<td>
|
||||
{% if SeriesBookNum( series.id, book.id ) == 1 %}
|
||||
{% set ds="disabled" %}
|
||||
{% endif %}
|
||||
<a class="btn btn-outline-primary btn-small {{ds}}" href="#"><i class="fas fa-angle-double-up"></i></a>
|
||||
{% if SeriesBookNum( series.id, book.id ) == series.num_books %}
|
||||
{% set de="disabled" %}
|
||||
{% endif %}
|
||||
<a class="btn btn-outline-primary btn-small {{de}}" href="#"><i class="fas fa-angle-double-down"></i></a>
|
||||
{% if book.sub_book_num is defined %}
|
||||
<a href="/book/{{book.id}}"> {{book.title}}</a>
|
||||
{% else %}
|
||||
<a href="/book/{{book.id}}">{{book.title}}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td data-sort="{{series.id}}.{{"%02d".format( SeriesBookNum( series.id, book.id ))}}">
|
||||
{% for s in book.series %}
|
||||
{{ SeriesBookNum( s.id, book.id ) }} of <a href="/series/{{s.id}}">{{s.title}}</a><br>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% 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>
|
||||
|
||||
Reference in New Issue
Block a user