mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-23 00:26:33 +00:00
61 lines
1.1 KiB
HTML
61 lines
1.1 KiB
HTML
{% load humanize %}
|
|
{% load fr_display %}
|
|
{% if shelf.books %}
|
|
<table>
|
|
<tr class="book-preview">
|
|
<th>
|
|
Cover
|
|
</th>
|
|
<th>
|
|
Title
|
|
</th>
|
|
<th>
|
|
Author
|
|
</th>
|
|
<th>
|
|
Published
|
|
</th>
|
|
<th>
|
|
Shelved
|
|
</th>
|
|
<th>
|
|
External links
|
|
</th>
|
|
{% if ratings %}
|
|
<th>
|
|
Rating
|
|
</th>
|
|
{% endif %}
|
|
</tr>
|
|
{% for book in shelf.books.all %}
|
|
<tr class="book-preview">
|
|
<td>
|
|
{% include 'snippets/book_cover.html' with book=book %}
|
|
</td>
|
|
<td>
|
|
<a href="/book/{{ book.openlibrary_key }}">{{ book.title }}</a>
|
|
</td>
|
|
<td>
|
|
{{ book.authors.first.name }}
|
|
</td>
|
|
<td>
|
|
{% if book.first_published_date %}{{ book.first_published_date }}{% endif %}
|
|
</td>
|
|
<td>
|
|
{{ book.created_date | naturalday }}
|
|
</td>
|
|
<td>
|
|
<a href="https://openlibrary.org{{ book.key }}" target="_blank">OpenLibrary</a>
|
|
</td>
|
|
{% if ratings %}
|
|
<td>
|
|
{{ ratings | dict_key:book.id | stars}}
|
|
</td>
|
|
{% endif %}
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% else %}
|
|
<p>This shelf is empty.</p>
|
|
{% endif %}
|
|
|