display series info at bottom of book.html

This commit is contained in:
Damien De Paoli
2020-11-24 21:24:07 +11:00
parent 3a07c109a0
commit 9d74376033
2 changed files with 15 additions and 3 deletions

View File

@@ -4,7 +4,7 @@
<h3><center>View/Edit Book</center></h1>
{% set keys = [ 'title', 'author', 'publisher', 'genre', 'owned', 'covertype', 'condition', 'year_published', 'rating', 'notes', 'blurb' ] %}
<div class="container-fluid"><div class="row"><form class="form col-lg-9">
<div class="container-fluid"><div class="row"><form class="form col-lg-10">
{% for key in keys %}
<div class="form-row">
<label for="{{key}}" class="col-lg-2 col-form-label">{{key}}:</label>
@@ -85,7 +85,19 @@
{% endif %}
</div class="form-row">
{% endfor %}
{% if books.series|length %}
<div class="form-row">
<label for="series" class="col-lg-2 col-form-label">Series:</label>
<table>
{% for s in books.series %}
<tr><td>
Book {{ SeriesBookNum( s.id, books.id ) }} of {{s.num_books}} in <a href="/series/{{s.id}}">{{s.title}}</a>
</td></tr>
{% endfor %}
</table>
</div>
</form>
{% endif %}
{% if books.sub_book|length %}
<p>sub_book is defined: {{books.sub_book}}</p>
{% endif %}
@@ -99,7 +111,7 @@
<div class="card-body text-info">
<h5 class="card-title">{{books.loan[0].firstnames}} {{books.loan[0].surname}}</h5>
<p class="card-text">
Date Lent: {{books.loan[0].date_lent}}<br>
When: {{books.loan[0].date_lent}}<br>
Contact: {{books.loan[0].contact_details}}
</div>
</div>