added in loans support, also particular route for book_for_loan without markup used as div content on loan.html page via ajax load

This commit is contained in:
2020-11-18 19:58:55 +11:00
parent d669ef71a4
commit 191fcf8f9d
4 changed files with 165 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
<h3>Loaned Books</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></tr>
</thead>
<tbody>
{% for book in books %}
<tr>
{% if book.sub_book_num is defined %}
<td data-sort="{{book.parent_id}}.{{book.sub_book_num}}"><a href="/book/{{book.id}}">&nbsp;&nbsp;&nbsp;&nbsp;{{book.title}}</a></td>
{% else %}
<td data-sort="{{book.id}}"><a href="/book/{{book.id}}">{{book.title}}</a></td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>