40 lines
1.6 KiB
HTML
40 lines
1.6 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>
|
|
{% 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;">
|
|
<i class="fas fa-angle-double-up" style="font-size:10px"></i></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;">
|
|
<i class="fas fa-angle-double-down" style="font-size:10px"></i></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:650px;text-overflow: ellipsis; overflow: hidden;white-space: nowrap;">{{book.notes}}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|