From 2ad3760b71ed7de16d9c77551f7beac20b529ab8 Mon Sep 17 00:00:00 2001 From: Rajit Sarkar Date: Wed, 10 Jul 2024 12:42:59 -0400 Subject: [PATCH] CONCD-878 when there is nothing to work on, message should display --- concordia/templates/transcriptions/campaign_detail.html | 4 +++- concordia/templates/transcriptions/item_detail.html | 4 +++- concordia/templates/transcriptions/project_detail.html | 4 +++- concordia/views.py | 3 --- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/concordia/templates/transcriptions/campaign_detail.html b/concordia/templates/transcriptions/campaign_detail.html index 818cf811f..5fbd5ef1e 100644 --- a/concordia/templates/transcriptions/campaign_detail.html +++ b/concordia/templates/transcriptions/campaign_detail.html @@ -121,7 +121,7 @@

Helpful Links

Filter pages:

- {% if user.is_authenticated and user.is_staff and show_radio %} + {% if user.is_authenticated and user.is_staff %}
@@ -166,6 +166,8 @@
{% endif %}
+ {% empty %} +
There are no pages you can review. Click show all to see pages you can read or edit.
{% endfor %} diff --git a/concordia/templates/transcriptions/item_detail.html b/concordia/templates/transcriptions/item_detail.html index 1705d37c2..5ce529857 100644 --- a/concordia/templates/transcriptions/item_detail.html +++ b/concordia/templates/transcriptions/item_detail.html @@ -41,7 +41,7 @@

{{ item.title }}

Filter pages:

- {% if user.is_authenticated and user.is_staff and show_radio %} + {% if user.is_authenticated and user.is_staff %}
@@ -82,6 +82,8 @@

Filter pages:

+ {% empty %} +
There are no pages you can review. Click show all to see pages you can read or edit.
{% endfor %}
diff --git a/concordia/templates/transcriptions/project_detail.html b/concordia/templates/transcriptions/project_detail.html index e162d8748..738ac4257 100644 --- a/concordia/templates/transcriptions/project_detail.html +++ b/concordia/templates/transcriptions/project_detail.html @@ -38,7 +38,7 @@

{{ project.title }}

Filter pages:

- {% if user.is_authenticated and user.is_staff and show_radio %} + {% if user.is_authenticated and user.is_staff %}
@@ -82,6 +82,8 @@
{% endif %}
+ {% empty %} +
There are no pages you can review. Click show all to see pages you can read or edit.
{% endfor %}
diff --git a/concordia/views.py b/concordia/views.py index e822b61d8..9fa2f65b2 100644 --- a/concordia/views.py +++ b/concordia/views.py @@ -856,7 +856,6 @@ def calculate_asset_stats(asset_qs, ctx): ctx["transcription_status_counts"] = labeled_status_counts = [] - ctx["show_radio"] = False for status_key, status_label in TranscriptionStatus.CHOICES: value = status_counts_by_key.get(status_key, 0) if value: @@ -867,8 +866,6 @@ def calculate_asset_stats(asset_qs, ctx): ctx[f"{status_key}_percent"] = pct ctx[f"{status_key}_count"] = value labeled_status_counts.append((status_key, status_label, value)) - if status_key == "submitted" and value > 0: - ctx["show_radio"] = True def annotate_children_with_progress_stats(children):