{% extends 'layout.html' %} {% load shelf_tags %} {% load utilities %} {% load humanize %} {% load i18n %} {% block title %} {% include 'user/books_header.html' with shelf=shelf %} {% endblock %} {% block opengraph %} {% include 'snippets/opengraph.html' with image=user.preview_image %} {% endblock %} {% block content %}

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

{% if user.moved_to %}

{% trans "You have have moved to" %} {% id_to_username user.moved_to %}

{% trans "You can undo this move to restore full functionality, but some followers may have already unfollowed this account." %}

{% csrf_token %}
{% else %}
{% include 'shelf/create_shelf_form.html' with controls_text='create_shelf_form' %}

{% if shelf.identifier == 'to-read' %}{% trans "To Read" %} {% elif shelf.identifier == 'reading' %}{% trans "Currently Reading" %} {% elif shelf.identifier == 'read' %}{% trans "Read" %} {% elif shelf.identifier == 'stopped-reading' %}{% trans "Stopped Reading" %} {% else %}{{ shelf.name }}{% endif %} {% include 'snippets/privacy-icons.html' with item=shelf %} {% with count=books.paginator.count %} {% if count %} {% blocktrans trimmed count counter=count with formatted_count=count|intcomma %} {{ formatted_count }} book {% plural %} {{ formatted_count }} books {% endblocktrans %} {% if books.has_other_pages %} {% blocktrans trimmed with start=books.start_index end=books.end_index %} (showing {{ start }}-{{ end }}) {% endblocktrans %} {% endif %} {% endif %} {% endwith %}

{% if is_self and shelf.id %}
{% trans "Edit shelf" as button_text %} {% include 'snippets/toggle/open_button.html' with text=button_text icon_with_text="pencil" controls_text="edit_shelf_form" focus="edit_shelf_form_header" %} {% if shelf.deletable %}
{% csrf_token %}
{% endif %}
{% endif %}
{% if shelf.description %}

{{ shelf.description }}

{% endif %}
{% include 'shelf/edit_shelf_form.html' with controls_text="edit_shelf_form" %}
{% if books|length > 0 %} {% if request.user.is_authenticated %} {% if is_self %} {% endif %} {% endif %} {% if shelf.user == request.user %} {% endif %} {% for book in books %} {% spaceless %} {% if request.user.is_authenticated %} {% if is_self %} {% endif %} {% endif %} {% if shelf.user == request.user %} {% endif %} {% endspaceless %} {% endfor %}
{% trans "Cover"%} {% trans "Title" as text %}{% include 'snippets/table-sort-header.html' with field="sort_title" sort=sort text=text %} {% trans "Author" as text %}{% include 'snippets/table-sort-header.html' with field="author" sort=sort text=text %}{% trans "Shelved" as text %}{% include 'snippets/table-sort-header.html' with field="shelved_date" sort=sort text=text %} {% trans "Started" as text %}{% include 'snippets/table-sort-header.html' with field="start_date" sort=sort text=text %} {% if shelf.identifier == 'read' %}{% trans "Finished" as text %}{% else %}{% trans "Until" as text %}{% endif %}{% include 'snippets/table-sort-header.html' with field="finish_date" sort=sort text=text %}{% trans "Rating" as text %}{% include 'snippets/table-sort-header.html' with field="rating" sort=sort text=text %}
{% include 'snippets/book_cover.html' with book=book cover_class='is-w-s-tablet is-h-s' size='small' %} {{ book.title }} {% include 'snippets/authors.html' %} {{ book.shelved_date|naturalday }} {{ book.start_date|naturalday|default_if_none:""}} {{ book.finish_date|naturalday|default_if_none:""}} {% include 'snippets/stars.html' with rating=book.rating %} {% with right=True %} {% if not shelf.id %} {% active_shelf book as current %} {% include 'snippets/shelf_selector.html' with current=current.shelf class="is-small" %} {% else %} {% include 'snippets/shelf_selector.html' with current=shelf class="is-small" %} {% endif %} {% endwith %}
{% else %}

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

{% endif %}
{% include 'snippets/pagination.html' with page=books path=request.path %}
{% endif %} {% endblock %} {% block scripts %} {% if request.user.show_guided_tour %} {% include 'guided_tour/user_books.html' %} {% endif %} {% endblock %}