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

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

{% if book.created_date %}
{% 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 %} {% for match in author.matches %}

{% with book_title=match.book_set.first.title alt_title=match.bio %} {% if book_title %} {% blocktrans trimmed %} Author of {{ book_title }} {% endblocktrans %} {% else %} {% if alt_title %}{% blocktrans trimmed %} Author of {{ alt_title }} {% endblocktrans %}{% else %}{% trans "Find more information at isni.org" %}{% endif %} {% endif %} {% endwith %}

{{ 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.id %} {% trans "Cancel" %} {% else %} {% trans "Cancel" %} {% endif %}
{% endif %}
{% endblock %}