{% extends 'user/user_layout.html' %} {% load bookwyrm_tags %} {% load humanize %} {% load i18n %} {% block title %} {% include 'user/books_header.html' %} {% endblock %} {% block header %}

{% include 'user/books_header.html' %}

{% endblock %} {% block panel %}
{% if is_self %}
{% trans "Create shelf" as button_text %} {% include 'snippets/toggle/open_button.html' with text=button_text icon="plus" controls_text="create-shelf-form" focus="create-shelf-form-header" %}
{% endif %}
{% include 'user/create_shelf_form.html' with controls_text='create-shelf-form' %}

{{ shelf.name }} {% include 'snippets/privacy-icons.html' with item=shelf %}

{% if is_self and shelf.id %}
{% trans "Edit shelf" as button_text %} {% include 'snippets/toggle/open_button.html' with text=button_text icon="pencil" controls_text="edit-shelf-form" focus="edit-shelf-form-header" %}
{% endif %}
{% include 'user/edit_shelf_form.html' with controls_text="edit-shelf-form" %}
{% if books|length > 0 %}
{% if ratings %}{% endif %} {% if shelf.user == request.user %} {% endif %} {% for book in books %} {% latest_read_through book user as read_through %} {% if ratings %} {% endif %} {% if shelf.user == request.user %} {% endif %} {% endfor %}
{% trans "Cover" %} {% trans "Title" %} {% trans "Author" %} {% trans "Shelved" %} {% trans "Started" %} {% trans "Finished" %}{% trans "Rating" %}
{% include 'snippets/book_cover.html' with book=book size="small" %} {{ book.title }} {% include 'snippets/authors.html' %} {{ book.created_date | naturalday }} {{ read_through.start_date | naturalday |default_if_none:""}} {{ read_through.finish_date | naturalday |default_if_none:""}} {% include 'snippets/stars.html' with rating=ratings|dict_key:book.id %} {% include 'snippets/shelf_selector.html' with current=shelf %}
{% else %}

{% trans "This shelf is empty." %}

{% if shelf.id and shelf.editable %}
{% csrf_token %}
{% endif %} {% endif %}
{% include 'snippets/pagination.html' with page=books path=request.path %}
{% endblock %}