{% extends 'layout.html' %} {% load i18n %} {% load humanize %} {% load utilities %} {% 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 }}" one of these authors?{% endblocktrans %} {% with forloop.counter0 as counter %} {% if author.isni_matches %} {% for isni_match in author.isni_matches %}

{{ isni_match.description }}

{% endfor %} {% endif %} {% for match in author.matches %}

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

{{ author.existing_isnis|get_isni_bio:match }}

{{ author.existing_isnis|get_isni:match }} {% 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 %}
{% if book %} {% trans "Cancel" %} {% else %} {% trans "Cancel" %} {% endif %}
{% endif %}
{% endblock %}