From 60fb1ac2e6fd09da622de64cbecbc87126455408 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sat, 13 Nov 2021 09:34:10 -0800 Subject: [PATCH] More flexible templates --- bookwyrm/templates/import/import_status.html | 17 ++++++-- bookwyrm/templates/import/manual_review.html | 44 ++++---------------- 2 files changed, 22 insertions(+), 39 deletions(-) diff --git a/bookwyrm/templates/import/import_status.html b/bookwyrm/templates/import/import_status.html index 0a3c9b47..6c5560dc 100644 --- a/bookwyrm/templates/import/import_status.html +++ b/bookwyrm/templates/import/import_status.html @@ -70,7 +70,6 @@ {% block actions %}{% endblock %} - {% block table_headers %} + + {% block import_cols_headers %} + {% endblock %} - {% endblock %} {% for item in items %} - {% block table_row %} + {% block index_col %} + {% endblock %} @@ -110,10 +114,14 @@ + + {% block import_cols %} + {% endblock %} - {% endblock %} + {% block action_row %}{% endblock %} {% endfor %}
{% trans "Row" %} @@ -84,23 +83,28 @@ {% trans "Author" %} + {% trans "Shelf" %} + {% trans "Review" %} {% trans "Book" %} {% trans "Status" %}
{{ item.index }} {{ item.normalized_data.title }} {{ item.normalized_data.authors }} + {{ item.normalized_data.shelf }} +

{% include 'snippets/stars.html' with rating=item.rating %}

{{ item.review|truncatechars:100 }}

{% if item.book %} @@ -136,8 +144,9 @@ {% trans "Pending" %} {% endif %}
diff --git a/bookwyrm/templates/import/manual_review.html b/bookwyrm/templates/import/manual_review.html index b7c8e3b9..833e9d7f 100644 --- a/bookwyrm/templates/import/manual_review.html +++ b/bookwyrm/templates/import/manual_review.html @@ -18,47 +18,19 @@ {% endblock %} -{% block table_headers %} - - - {% trans "Row" %} - - - {% trans "Title" %} - - - {% trans "ISBN" %} - - - {% trans "Author" %} - - - {% trans "Review" %} - +{% block import_cols_headers %} {% trans "Actions" %} - {% endblock %} -{% block table_row %} - +{% block index_col %} {{ item.index }} - - {{ item.normalized_data.title }} - - - {{ item.isbn }} - - - {{ item.normalized_data.authors }} - - -

{% include 'snippets/stars.html' with rating=item.rating %}

-

{{ item.review|truncatechars:100 }}

- +{% endblock %} + +{% block import_cols %}
@@ -78,9 +50,11 @@
- +{% endblock %} + +{% block action_row %} - +
{% with guess=item.book_guess %}