{% extends 'layout.html' %} {% load i18n %} {% load bookwyrm_tags %} {% load humanize %} {% block title %}{{ book.title }}{% endblock %} {% block content %}

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

{% if book.authors %}

{% trans "by" %} {% include 'snippets/authors.html' with book=book %}

{% endif %}
{% if request.user.is_authenticated and perms.bookwyrm.edit_book %} {% endif %}
{% include 'snippets/book_cover.html' with book=book size=large %} {% include 'snippets/rate_action.html' with user=request.user book=book %} {% include 'snippets/shelve_button/shelve_button.html' %} {% if request.user.is_authenticated and not book.cover %}

{% trans "Add cover" %}

{% csrf_token %}
{% endif %}
{% if book.isbn_13 %}
{% trans "ISBN:" %}
{{ book.isbn_13 }}
{% endif %} {% if book.oclc_number %}
{% trans "OCLC Number:" %}
{{ book.oclc_number }}
{% endif %} {% if book.asin %}
{% trans "ASIN:" %}
{{ book.asin }}
{% endif %}

{% if book.physical_format and not book.pages %} {{ book.physical_format | title }} {% elif book.physical_format and book.pages %} {% blocktrans with format=book.physical_format|title pages=book.pages %}{{ format }}, {{ pages }} pages{% endblocktrans %} {% elif book.pages %} {% blocktrans with pages=book.pages %}{{ pages }} pages{% endblocktrans %} {% endif %}

{% if book.published_date and book.publishers %} {% blocktrans with date=book.published_date|date:'M jS Y' publisher=book.publishers|join:', ' %}Published {{ date }} by {{ publisher }}.{% endblocktrans %} {% elif book.published_date %} {% blocktrans with date=book.published_date|date:'M jS Y' %}Published {{ date }}{% endblocktrans %} {% elif book.publishers %} {% blocktrans with publisher=book.publishers|join:', ' %}Published by {{ publisher }}.{% endblocktrans %} {% endif %}

{% if book.openlibrary_key %}

{% trans "View on OpenLibrary" %}

{% endif %}

{% include 'snippets/stars.html' with rating=rating %} {% blocktrans count counter=review_count %}({{ review_count }} review){% plural %}({{ review_count }} reviews){% endblocktrans %}

{% include 'snippets/trimmed_text.html' with full=book|book_description %} {% if request.user.is_authenticated and perms.bookwyrm.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 #}
{% for shelf in user_shelves %}

{% blocktrans with path=shelf.shelf.local_path shelf_name=shelf.shelf.name %}This edition is on your {{ shelf_name }} shelf.{% endblocktrans %} {% include 'snippets/shelf_selector.html' with current=shelf.shelf %}

{% endfor %} {% 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 request.user.is_authenticated %}

{% trans "Your reading activity" %}

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

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

{% endif %} {% for readthrough in readthroughs %} {% include 'snippets/readthrough.html' with readthrough=readthrough %} {% endfor %}
{% endif %} {% if request.user.is_authenticated %}
{% include 'snippets/create_status.html' with book=book hide_cover=True %}
{% csrf_token %}
{% endif %}
{% for tag in tags %} {% include 'snippets/tag.html' with book=book tag=tag user_tags=user_tags %} {% endfor %}
{% 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 %}
{% for review in reviews %}
{% include 'snippets/status/status.html' with status=review hide_book=True depth=1 %}
{% endfor %}
{% for rating in ratings %}
{% include 'snippets/avatar.html' with user=rating.user %}

{% trans "rated it" %}

{% include 'snippets/stars.html' with rating=rating.rating %}
{% endfor %}
{% include 'snippets/pagination.html' with page=reviews path=book.local_path anchor="#reviews" %}
{% endblock %}