{% 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 }}
{% if book.last_edited_by %}
{% trans "Last edited by:" %}
{{ book.last_edited_by.display_name }}
{% endif %}
{% endif %}
{% 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 %} {% include "book/edit/edit_book_form.html" %} {% if not confirm_mode %}
{% trans "Cancel" %}
{% endif %}
{% endblock %}