Add prior cases information to collection case view template
This commit is contained in:
@@ -71,8 +71,15 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if show_history %}
|
{% if show_history %}
|
||||||
|
<div class="d-flex justify-content-between align-items-start">
|
||||||
<div>
|
<div>
|
||||||
History: {{casedetail.get_history_pre|linebreaks}}
|
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>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -3842,6 +3842,10 @@ def collection_case_view_take(
|
|||||||
case _:
|
case _:
|
||||||
continue
|
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(
|
return render(
|
||||||
request,
|
request,
|
||||||
"atlas/collection_case_view_take.html",
|
"atlas/collection_case_view_take.html",
|
||||||
@@ -3852,6 +3856,8 @@ def collection_case_view_take(
|
|||||||
"casedetail": casedetail,
|
"casedetail": casedetail,
|
||||||
"series_list": series_list,
|
"series_list": series_list,
|
||||||
"series_to_load": series_to_load,
|
"series_to_load": series_to_load,
|
||||||
|
"has_priors": has_priors,
|
||||||
|
"prior_count": prior_count,
|
||||||
"case_number": case_number,
|
"case_number": case_number,
|
||||||
"previous": previous,
|
"previous": previous,
|
||||||
"next": next,
|
"next": next,
|
||||||
|
|||||||
Reference in New Issue
Block a user