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

16
templates/loans.html Normal file
View File

@@ -0,0 +1,16 @@
{% extends "base.html" %}
{% block main_content %}
<h3>Loans</h3>
<table id="book_table" class="table table-striped table-sm" data-toolbar="#toolbar" data-search="true">
<thead>
<tr class="thead-light"><th>Surname</th><th>Firstname(s)</th><th>Date Lent</th><th>Contact Details</th></tr>
</thead>
<tbody>
{% for loan in loans %}
<tr><td><a href="{{url_for('loan', id=loan.id )}}">{{loan.surname}}</a></td><td>{{loan.firstnames}}</td><td>{{loan.date_lent}}</td>
<td>{{loan.contact_details}}</td></tr>
{% endfor %}
</tbody>
</table>
{% endblock main_content %}