{% load fr_display %}

{% for shelf in shelves %}
{% if shelf.books %}
<div class="container">
    <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>
        {% for book in shelf.books %}
        <div>
            <label for="book-{{ book.id }}-radio">
                {% include 'snippets/book_cover.html' with book=book %}
            </label>
        {% include 'snippets/shelve_button.html' with book=book hide_pulldown=True %}
        </div>
        {% endfor %}
    </div>
</div>
{% endif %}
{% endfor %}