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

2
BUGs
View File

@@ -4,8 +4,6 @@ BUG-2: series does not deal with calcd_rating...
BUG-3: alter a condition, covertype, etc. and its not in drop-down list (even though db look via index is correct, e.g books.html shows updated covertype)
BUG-4: show books, only shows first author
BUG-6: author,series, etc. do not have explicit ordering like sub-books... sort of irritating / needs code and DB fix
- add/remove authors, and after save they are ordered by author.id, not order of addition (prob. needs book_author_link to have an auth_num)

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) %}