{% 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 %}

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

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

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

{% if form.non_field_errors %}

{{ form.non_field_errors }}

{% endif %}
{% csrf_token %} {% if confirm_mode %}

{% trans "Confirm Book Info" %}

{% if author_matches.exists %}
{% blocktrans with name=add_author %}Is "{{ name }}" an existing author?{% endblocktrans %} {% for match in author_matches %}

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

{% endfor %}
{% else %}

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

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

{% endif %}

{% trans "Metadata" %}

{{ form.title }}

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

{{ error | escape }}

{% endfor %}

{{ form.subtitle }}

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

{{ error | escape }}

{% endfor %}

{{ form.description }}

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

{{ error | escape }}

{% endfor %}

{{ form.series }}

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

{{ error | escape }}

{% endfor %}

{{ form.series_number }}

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

{{ error | escape }}

{% endfor %}

{{ form.first_published_date }}

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

{{ error | escape }}

{% endfor %}

{{ form.published_date }}

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

{{ error | escape }}

{% endfor %}

{% trans "Authors" %}

{% for author in book.authors.all %}

{{ author.name }} {% endfor %} {% if confirm_mode %} {% else %} {% endif %}

{% include 'snippets/book_cover.html' with book=book size="small" %}

{% trans "Cover" %}

{{ form.cover }}

{% 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 %}
{% trans "Cancel" %}
{% endblock %}