From 0c412dfff6e46807932541f7377fe3a2e146ef1d Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 24 Nov 2025 12:19:56 +0000 Subject: [PATCH] Add prior cases information to collection case view template --- atlas/templates/atlas/collection_case_view_take.html | 11 +++++++++-- atlas/views.py | 6 ++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/atlas/templates/atlas/collection_case_view_take.html b/atlas/templates/atlas/collection_case_view_take.html index 24748203..dfa1147e 100644 --- a/atlas/templates/atlas/collection_case_view_take.html +++ b/atlas/templates/atlas/collection_case_view_take.html @@ -71,8 +71,15 @@ {% endif %} {% if show_history %} -
- History: {{casedetail.get_history_pre|linebreaks}} +
+
+ History: {{casedetail.get_history_pre|linebreaks}} +
+ {% if has_priors %} +
+ Priors{% if prior_count %} ({{ prior_count }}){% endif %} +
+ {% endif %}
{% endif %} diff --git a/atlas/views.py b/atlas/views.py index c17001de..7d03c3d6 100755 --- a/atlas/views.py +++ b/atlas/views.py @@ -3842,6 +3842,10 @@ def collection_case_view_take( case _: continue + # Determine whether any prior series will be shown to the candidate. + has_priors = any(prior_flag for (_, prior_flag, _) in series_to_load) + prior_count = prior_cases.count() + return render( request, "atlas/collection_case_view_take.html", @@ -3852,6 +3856,8 @@ def collection_case_view_take( "casedetail": casedetail, "series_list": series_list, "series_to_load": series_to_load, + "has_priors": has_priors, + "prior_count": prior_count, "case_number": case_number, "previous": previous, "next": next,