{% extends 'layout.html' %} {% load i18n %} {% load bookwyrm_tags %} {% load humanize %} {% load utilities %} {% load static %} {% block title %}{{ book|book_title }}{% endblock %} {% block opengraph_images %} {% include 'snippets/opengraph_images.html' with image=book.preview_image %} {% endblock %} {% block content %} {% with user_authenticated=request.user.is_authenticated can_edit_book=perms.bookwyrm.edit_book %}

{{ book.title }}

{% if book.subtitle or book.series %}

{% if book.subtitle %} {{ book.subtitle }} {% endif %} {% if book.series %} ({{ book.series }}{% if book.series_number %} #{{ book.series_number }}{% endif %}) {% endif %}

{% endif %} {% if book.authors.exists %}
{% trans "by" %} {% include 'snippets/authors.html' with book=book %}
{% endif %}
{% if user_authenticated and can_edit_book %} {% endif %}
{% if not book.cover %} {% if user_authenticated %} {% join "add_cover" book.id as modal_id %} {% include 'book/cover_add_modal.html' with id=modal_id %} {% if request.GET.cover_error %}

{% trans "Failed to load cover" %}

{% endif %} {% else %} {% include 'snippets/book_cover.html' with book=book cover_class='is-h-m-mobile' %} {% endif %} {% endif %} {% if book.cover %} {% include 'book/cover_show_modal.html' with book=book id="cover_show_modal" %} {% endif %} {% include 'snippets/rate_action.html' with user=request.user book=book %}
{% include 'snippets/shelve_button/shelve_button.html' %}
{% with book=book %}
{% include 'book/publisher_info.html' %}
{% include 'book/book_identifiers.html' %}
{% endwith %} {% trans "Load data" as button_text %} {% if book.openlibrary_key %}

{% trans "View on OpenLibrary" %} {% if request.user.is_authenticated and perms.bookwyrm.edit_book %} {% include "book/sync_modal.html" with source="openlibrary.org" source_name="OpenLibrary" id="openlibrary_sync" %} {% endif %}

{% endif %} {% if book.inventaire_id %}

{% trans "View on Inventaire" %} {% if request.user.is_authenticated and perms.bookwyrm.edit_book %} {% include "book/sync_modal.html" with source="inventaire.io" source_name="Inventaire" id="inventaire_sync" %} {% endif %}

{% endif %}
{# @todo Is it possible to not hard-code the value? #} {% include 'snippets/stars.html' with rating=rating %} {% blocktrans count counter=review_count trimmed %} ({{ review_count }} review) {% plural %} ({{ review_count }} reviews) {% endblocktrans %}
{% with full=book|book_description itemprop='abstract' %} {% include 'snippets/trimmed_text.html' %} {% endwith %} {% if user_authenticated and can_edit_book and not book|book_description %} {% trans 'Add Description' as button_text %} {% include 'snippets/toggle/open_button.html' with text=button_text controls_text="add_description" controls_uid=book.id focus="id_description" hide_active=True id="hide_description" %} {% endif %} {% if book.parent_work.editions.count > 1 %}

{% blocktrans with path=book.parent_work.local_path count=book.parent_work.editions.count %}{{ count }} editions{% endblocktrans %}

{% endif %}
{# user's relationship to the book #}
{% if user_shelfbooks.count > 0 %}

{% trans "You have shelved this edition in:" %}

    {% for shelf in user_shelfbooks %}
  • {{ shelf.shelf.name }}
    {% include 'snippets/shelf_selector.html' with shelf=shelf.shelf class="is-small" readthrough=readthrough %}
  • {% endfor %}
{% endif %} {% for shelf in other_edition_shelves %}

{% blocktrans with book_path=shelf.book.local_path shelf_path=shelf.shelf.local_path shelf_name=shelf.shelf.name %}A different edition of this book is on your {{ shelf_name }} shelf.{% endblocktrans %} {% include 'snippets/switch_edition_button.html' with edition=book %}

{% endfor %}
{% if user_authenticated %}

{% trans "Your reading activity" %}

{% trans "Add read dates" as button_text %} {% include 'snippets/toggle/open_button.html' with text=button_text icon_with_text="plus" class="is-small" controls_text="add_readthrough" focus="add_readthrough_focus_" %}
{% if not readthroughs.exists %}

{% trans "You don't have any reading activity for this book." %}

{% endif %} {% for readthrough in readthroughs %} {% include 'book/readthrough.html' with readthrough=readthrough %} {% endfor %}
{% with 0|uuid as controls_uid %} {% include 'snippets/create_status.html' with book=book hide_cover=True %} {% endwith %}
{% endif %}
{% if request.user.is_authenticated %} {% if user_statuses.review_count or user_statuses.comment_count or user_statuses.quotation_count %} {% endif %} {% endif %} {% for status in statuses %}
{% include 'snippets/status/status.html' with status=status hide_book=True depth=1 %}
{% endfor %} {% if ratings %}
{% for rating in ratings %} {% include 'book/rating.html' with user=rating.user rating=rating %} {% endfor %}
{% endif %}
{% include 'snippets/pagination.html' with page=statuses path=request.path anchor="#reviews" %}
{% if book.subjects %}

{% trans "Subjects" %}

    {% for subject in book.subjects %}
  • {{ subject }}
  • {% endfor %}
{% endif %} {% if book.subject_places %}

{% trans "Places" %}

    {% for place in book.subject_places %}
  • {{ place }}
  • {% endfor %}
{% endif %} {% if lists.exists or request.user.list_set.exists %}

{% trans "Lists" %}

{% if request.user.list_set.exists %}
{% csrf_token %}
{% endif %}
{% endif %}
{% include "book/links.html" %}
{% endwith %} {% endblock %} {% block scripts %} {% endblock %}