diff --git a/bookwyrm/templates/book/edit_book.html b/bookwyrm/templates/book/edit_book.html index eb4b1c53..e706dea8 100644 --- a/bookwyrm/templates/book/edit_book.html +++ b/bookwyrm/templates/book/edit_book.html @@ -36,12 +36,6 @@ {% endif %} -{% if form.non_field_errors %} -
-

{{ form.non_field_errors }}

-
-{% 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.languages }} - {% trans "Separate multiple values with commas." %} - {% for error in form.languages.errors %} -

{{ error | escape }}

- {% endfor %} -
- -
- - {{ form.publishers }} - {% trans "Separate multiple values 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 %} -
+
+

{% 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 name=author.name %}Author page for {{ name }}{% endblocktrans %} + {% blocktrans with book_title=match.book_set.first.title %}Author of {{ book_title }}{% endblocktrans %}

-
- {% endfor %} -
- {% endif %} -
- - - {% trans "Separate multiple values with commas." %} -
-
-
- -
-

{% trans "Cover" %}

-
- {% if book.cover %} -
- {% include 'snippets/book_cover.html' with book=book cover_class='is-h-xl-mobile is-w-auto-tablet' size_mobile='xlarge' size='large' %} -
- {% endif %} - -
-
-
- - {{ form.cover }} -
-
- - -
- {% for error in form.cover.errors %} -

{{ error | escape }}

{% 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 "Physical Properties" %}

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

{{ error | escape }}

- {% endfor %} -
-
-
-
- - {{ form.physical_format_detail }} - {% for error in form.physical_format_detail.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.inventaire_id }} - {% for error in form.inventaire_id.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 "Back" %} +
-
+ +
+ {% endif %} + + {% include "book/edit_book_form.html" %} {% if not confirm_mode %}
diff --git a/bookwyrm/templates/book/edit_book_form.html b/bookwyrm/templates/book/edit_book_form.html new file mode 100644 index 00000000..982bb56d --- /dev/null +++ b/bookwyrm/templates/book/edit_book_form.html @@ -0,0 +1,249 @@ +{% load i18n %} + +{% if form.non_field_errors %} +
+

{{ form.non_field_errors }}

+
+{% endif %} + +{% csrf_token %} + + +
+
+
+

{% 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.languages }} + {% trans "Separate multiple values with commas." %} + {% for error in form.languages.errors %} +

{{ error | escape }}

+ {% endfor %} +
+
+
+ +
+

{% trans "Publication" %}

+
+
+ + {{ form.publishers }} + {% trans "Separate multiple values 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 %} +
+ +

+ {% blocktrans with name=author.name %}Author page for {{ name }}{% endblocktrans %} +

+
+ {% endfor %} +
+ {% endif %} +
+ + + {% trans "Separate multiple values with commas." %} +
+
+
+
+ +
+
+

{% trans "Cover" %}

+
+
+ {% if book.cover %} +
+ {% include 'snippets/book_cover.html' with book=book cover_class='is-h-xl-mobile is-w-auto-tablet' size_mobile='xlarge' size='large' %} +
+ {% endif %} + +
+
+ + {{ 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 %} +
+
+
+
+ + {{ form.physical_format_detail }} + {% for error in form.physical_format_detail.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.inventaire_id }} + {% for error in form.inventaire_id.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 %} +
+
+
+
+