format multiple book references in a status

This commit is contained in:
Mouse Reeve 2020-09-30 11:49:41 -07:00
parent 3e65d53305
commit 49807d069f

View File

@ -3,8 +3,9 @@
<div class="media"> <div class="media">
{% if not hide_book and status.mention_books.count %} {% if not hide_book and status.mention_books.count %}
<div class="media-left"> <div class="media-left">
<div class="columns">
{% for book in status.mention_books.all|slice:"0:4" %} {% for book in status.mention_books.all|slice:"0:4" %}
<div> <div class="column">
<a href="/book/{{ book.id }}">{% include 'snippets/book_cover.html' with book=book %}</a> <a href="/book/{{ book.id }}">{% include 'snippets/book_cover.html' with book=book %}</a>
{% if status.mention_books.count > 1 %} {% if status.mention_books.count > 1 %}
<p>{% include 'snippets/book_titleby.html' with book=book %}</p> <p>{% include 'snippets/book_titleby.html' with book=book %}</p>
@ -13,6 +14,7 @@
</div> </div>
{% endfor %} {% endfor %}
</div> </div>
</div>
{% endif %} {% endif %}
{% if not hide_book and status.book %} {% if not hide_book and status.book %}