Add prior cases information to collection case view template

This commit is contained in:
Ross
2025-11-24 12:19:56 +00:00
parent 3f00311136
commit 0c412dfff6
2 changed files with 15 additions and 2 deletions
@@ -71,8 +71,15 @@
</div>
{% endif %}
{% if show_history %}
<div>
History: {{casedetail.get_history_pre|linebreaks}}
<div class="d-flex justify-content-between align-items-start">
<div>
History: {{casedetail.get_history_pre|linebreaks}}
</div>
{% if has_priors %}
<div class="ms-2">
<span title="This case has priors available for comparison" class="badge bg-info text-dark small">Priors{% if prior_count %} ({{ prior_count }}){% endif %}</span>
</div>
{% endif %}
</div>
{% endif %}
+6
View File
@@ -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,