From fcf796abe1de3ee0ae3499d9c64dc8644258c30f Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 14 Sep 2022 18:08:16 -0700 Subject: [PATCH] Null state for review view during imports Without this, it will show an empty progress bar and no info about why the table is empty. --- bookwyrm/templates/import/import_status.html | 11 +++++++++-- bookwyrm/views/imports/import_status.py | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/bookwyrm/templates/import/import_status.html b/bookwyrm/templates/import/import_status.html index d0ad7b7e7..03d7601c4 100644 --- a/bookwyrm/templates/import/import_status.html +++ b/bookwyrm/templates/import/import_status.html @@ -41,7 +41,7 @@ - {% if not job.complete %} + {% if not job.complete and show_progress %}
@@ -94,7 +94,7 @@
{% block actions %}{% endblock %}
- +
{% else %} + {% if not items %} + + + + {% endif %} {% for item in items %} {% block index_col %} diff --git a/bookwyrm/views/imports/import_status.py b/bookwyrm/views/imports/import_status.py index 26ff8cdec..ffad36774 100644 --- a/bookwyrm/views/imports/import_status.py +++ b/bookwyrm/views/imports/import_status.py @@ -47,6 +47,7 @@ class ImportStatus(View): "page_range": paginated.get_elided_page_range( page.number, on_each_side=2, on_ends=1 ), + "show_progress": True, "item_count": item_count, "complete_count": item_count - pending_item_count, "percent": math.floor( # pylint: disable=c-extension-no-member
{% trans "Row" %} @@ -137,6 +137,13 @@
+ {% trans "No items currently need review" %} +