46 lines
1.8 KiB
HTML
46 lines
1.8 KiB
HTML
<table class="table table-sm table-striped small">
|
|
<thead>
|
|
<tr class="thead-light"><th>Title</th><th>Rating</th><th>Author(s)</th><th>Year Published</th><th>Notes</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for book in sub_books %}
|
|
<tr>
|
|
<td style="white-space: nowrap;">
|
|
{% set state="" %}
|
|
{% if loop.index == 1 %}
|
|
{% set state="disabled" %}
|
|
{% endif %}
|
|
<button name="move_button_for" value="up-{{book.sub_book_id}}" id="up-{{book.sub_book_id}}" class="btn btn-outline-primary" {{state}}
|
|
onClick="$.ajax({
|
|
type: 'POST', url: '/subbooks_for_book/{{book.book_id}}',
|
|
data: 'move_button=up-{{book.sub_book_id}}',
|
|
success: function(data){
|
|
$('#sub_book_content').html(data); }
|
|
} ); return false;">
|
|
<svg width="12" height="12" fill="currentColor">
|
|
<use xlink:href="{{url_for('static', filename='icons.svg')}}#caret-up-fill"/>
|
|
</svg>
|
|
</button>
|
|
{% set state="" %}
|
|
{% if loop.index == sub_books|length %}
|
|
{% set state="disabled" %}
|
|
{% endif %}
|
|
<button name="move_button" value="down-{{book.sub_book_id}}" id="down-{{book.sub_book_id}}" class="btn btn-outline-primary" {{state}}
|
|
onClick="$.ajax({
|
|
type: 'POST', url: '/subbooks_for_book/{{book.book_id}}',
|
|
data: 'move_button=down-{{book.sub_book_id}}',
|
|
success: function(data){
|
|
$('#sub_book_content').html(data); }
|
|
} ); return false;">
|
|
<svg width="12" height="12" fill="currentColor">
|
|
<use xlink:href="{{url_for('static', filename='icons.svg')}}#caret-down-fill"/>
|
|
</svg>
|
|
</button>
|
|
<a href="/book/{{book.sub_book_id}}">{{book.title}}</a>
|
|
</td>
|
|
<td>{{book.rating}}</td><td>{{book.author}}</td><td>{{book.year_published}}</td>
|
|
<td style="width: auto;min-width:0;max-width:600px;text-overflow: ellipsis; overflow: hidden;white-space: nowrap;">{{book.notes}}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|