fixed BUG-4 (books only showing 1 author)

This commit is contained in:
2021-01-03 11:55:16 +11:00
parent 195daf98e0
commit 98372ea62c
2 changed files with 6 additions and 4 deletions

View File

@@ -4,7 +4,7 @@
<h3>All 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><th>Author</th><th>Publisher</th><th>Condition</th><th>Owned</th><th>Covertype</th></tr>
<tr class="thead-light"><th>Title</th><th>Author(s)</th><th>Publisher</th><th>Condition</th><th>Owned</th><th>Covertype</th></tr>
</thead>
<tbody>
{% for book in books %}
@@ -14,7 +14,11 @@
{% else %}
<td data-sort="{{book.id}}"><a href="/book/{{book.id}}">{{book.title}}</a></td>
{% endif %}
<td>{{ book.author[0]['surname'] }}, {{book.author[0]['firstnames']}}</td>
<td>
{% for auth in book.author %}
{{ auth['surname'] }}, {{auth['firstnames']}}
{% endfor %}
</td>
<td>{{ GetPublisherById(book.publisher)}}</td>
<td align="center">
{% set cond = GetConditionById(book.condition) %}