{% extends 'layout.html' %} {% load i18n %} {% load humanize %} {% block title %}{% if book %}{% blocktrans with book_title=book.title %}Edit "{{ book_title }}"{% endblocktrans %}{% else %}{% trans "Add Book" %}{% endif %}{% endblock %} {% block content %}

{% if book %} {% blocktrans with book_title=book.title %}Edit "{{ book_title }}"{% endblocktrans %} {% else %} {% trans "Add Book" %} {% endif %}

{% if book %}

{% trans "Added:" %} {{ book.created_date | naturaltime }}

{% trans "Updated:" %} {{ book.updated_date | naturaltime }}

{% trans "Last edited by:" %} {{ book.last_edited_by.display_name }}

{% endif %}
{% if form.non_field_errors %}

{{ form.non_field_errors }}

{% endif %} {% if book %}
{% else %} {% endif %} {% csrf_token %} {% if confirm_mode %}

{% trans "Confirm Book Info" %}

{% if author_matches %}
{% for author in author_matches %}
{% blocktrans with name=author.name %}Is "{{ name }}" an existing author?{% endblocktrans %} {% with forloop.counter0 as counter %} {% for match in author.matches %}

{% blocktrans with book_title=match.book_set.first.title %}Author of {{ book_title }}{% endblocktrans %}

{% endfor %} {% endwith %}
{% endfor %}
{% else %}

{% blocktrans with name=add_author %}Creating a new author: {{ name }}{% endblocktrans %}

{% endif %} {% if not book %}
{% trans "Is this an edition of an existing work?" %} {% for match in book_matches %} {% endfor %}
{% endif %}
{% trans "Back" %}

{% endif %}

{% trans "Metadata" %}

{% for error in form.title.errors %}

{{ error | escape }}

{% endfor %}

{% for error in form.subtitle.errors %}

{{ error | escape }}

{% endfor %}

{{ form.description }}

{% for error in form.description.errors %}

{{ error | escape }}

{% endfor %}

{% for error in form.series.errors %}

{{ error | escape }}

{% endfor %}

{{ form.series_number }}

{% for error in form.series_number.errors %}

{{ error | escape }}

{% endfor %}

{{ form.publishers }} {% trans "Separate multiple publishers with commas." %}

{% for error in form.publishers.errors %}

{{ error | escape }}

{% endfor %}

{% for error in form.first_published_date.errors %}

{{ error | escape }}

{% endfor %}

{% for error in form.published_date.errors %}

{{ error | escape }}

{% endfor %}

{% trans "Authors" %}

{% if book.authors.exists %}
{% for author in book.authors.all %} {% endfor %}
{% endif %}

Separate multiple author names with commas.

{% trans "Cover" %}

{% include 'snippets/book_cover.html' with book=book cover_class='is-h-xl-mobile is-w-auto-tablet' %}

{{ form.cover }}

{% if book %}

{% endif %} {% for error in form.cover.errors %}

{{ error | escape }}

{% endfor %}

{% trans "Physical Properties" %}

{{ form.physical_format }}

{% for error in form.physical_format.errors %}

{{ error | escape }}

{% endfor %} {% for error in form.physical_format.errors %}

{{ error | escape }}

{% endfor %}

{{ form.pages }}

{% for error in form.pages.errors %}

{{ error | escape }}

{% endfor %}

{% trans "Book Identifiers" %}

{{ form.isbn_13 }}

{% for error in form.isbn_13.errors %}

{{ error | escape }}

{% endfor %}

{{ form.isbn_10 }}

{% for error in form.isbn_10.errors %}

{{ error | escape }}

{% endfor %}

{{ form.openlibrary_key }}

{% for error in form.openlibrary_key.errors %}

{{ error | escape }}

{% endfor %}

{{ form.oclc_number }}

{% for error in form.oclc_number.errors %}

{{ error | escape }}

{% endfor %}

{{ form.asin }}

{% for error in form.ASIN.errors %}

{{ error | escape }}

{% endfor %}
{% if not confirm_mode %}
{% trans "Cancel" %}
{% endif %}
{% endblock %} {% block scripts %} {% include 'snippets/datepicker_js.html' %} {% endblock %}