Merge branch 'master' of 192.168.0.2:pybook
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
<tr class="thead-light"><th>Title</th><th>Book Number</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% set last = namespace(val=0) %}
|
||||
{% for book in books %}
|
||||
<tr>
|
||||
<td>
|
||||
@@ -13,7 +14,13 @@
|
||||
<a id="down-{{book.id}}" class="btn btn-outline-primary btn-small" style="{{style}}" href="#"><i class="fas fa-angle-double-down"></i></a>
|
||||
<a href="/book/{{book.id}}">{{book.title}}</a>
|
||||
</td>
|
||||
<td data-sort="{{series.id}}.{{"%02d".format( SeriesBookNum( series.id, book.id ))}}">
|
||||
{% set num = SeriesBookNum( series.id, book.id ) %}
|
||||
{% if num == None %}
|
||||
{# okay, if this is a parent book, the num == None, so make it use last real-book and add .01 to it to make sure it sorts just after the last one #}
|
||||
<td data-sort="{{series.id}}.{{"{:02d}1".format( last.val )}}">
|
||||
{% else %}
|
||||
<td data-sort="{{series.id}}.{{"{:02d}".format( num )}}">
|
||||
{% endif %}
|
||||
{% for s in book.series %}
|
||||
{% if not book.child_ref|length %}
|
||||
{{ SeriesBookNum( s.id, book.id ) }} of <a href="/series/{{s.id}}">{{s.title}}</a><br>
|
||||
@@ -36,6 +43,7 @@
|
||||
{% endif %}
|
||||
</script>
|
||||
{% endif %}
|
||||
{% set last.val = num %}
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user