Show up to three mentioned books with a status.

This commit is contained in:
Adam Kelly 2020-03-25 14:33:29 +00:00
parent 8bf3225fc4
commit 7d837ad344

View file

@ -21,13 +21,15 @@
</h2>
{% if not hide_book and status.mention_books.count %}
{% for book in status.mention_books.all|slice:"0:3" %}
<div class="book-preview">
{% if status.status_type == 'Review' %}
{% include 'snippets/book.html' with book=status.mention_books.first %}
{% include 'snippets/book.html' with book=book %}
{% else %}
{% include 'snippets/book.html' with book=status.mention_books.first description=True %}
{% include 'snippets/book.html' with book=book description=True %}
{% endif %}
</div>
{% endfor %}
{% endif %}
{% if not hide_book and status.book%}
<div class="book-preview">