bookwyrm/fedireads/templates/snippets/covers_shelf.html

37 lines
1.2 KiB
HTML
Raw Normal View History

2020-03-15 21:15:36 +00:00
{% load fr_display %}
2020-04-01 19:32:24 +00:00
<div class="all-shelves content-container">
{% for shelf in shelves %}
{% if shelf.books %}
<div>
<h2>{{ shelf.name }}
{% if shelf.size > shelf.books|length %}
<small>(<a href="/shelf/{{ user | username }}/{{ shelf.identifier }}">See all {{ shelf.size }}</a>)</small>
{% endif %}
</h2>
<div class="covers-shelf {{ shelf.identifier }}">
{% for book in shelf.books %}
<div class="book-preview" onclick="show_compose(this)" id="book-{{ book.id }}">
{% include 'snippets/book_cover.html' with book=book %}
{% include 'snippets/shelve_button.html' with book=book %}
</div>
{% endfor %}
2020-03-16 23:10:59 +00:00
</div>
2020-04-01 19:32:24 +00:00
</div>
{% endif %}
{% endfor %}
</div>
{% for shelf in shelves %}
{% for book in shelf.books %}
<div class="compose-suggestion" id="compose-book-{{ book.id }}">
<span class="close icon icon-close" onclick="hide_element(this)">
<span class="hidden-text">Close</span>
</span>
<div class="content-container">
{% include 'snippets/create_status.html' with book=book user=request.user %}
2020-03-15 21:15:36 +00:00
</div>
2020-03-16 23:10:59 +00:00
</div>
2020-04-01 19:32:24 +00:00
{% endfor %}
2020-03-15 21:15:36 +00:00
{% endfor %}