Add display sets section to condition, finding, and structure detail templates; list associated cases for better context

This commit is contained in:
Ross
2026-02-02 11:59:28 +00:00
parent f362be43ef
commit 18aef751ca
3 changed files with 34 additions and 0 deletions
@@ -83,6 +83,20 @@
</div>
{% endif %}
{# Also include cases that reference this condition via CaseDisplaySet #}
{% if condition.casedisplayset_set.exists %}
<div class="card mb-3">
<div class="card-body">
<h5 class="card-title">Cases via Display Sets</h5>
<ul class="list-unstyled mb-0">
{% for ds in condition.casedisplayset_set.all %}
<li class="mb-1">{{ ds.case.get_link }} <small class="text-muted">[Display set: {{ ds.name }}]</small></li>
{% endfor %}
</ul>
</div>
</div>
{% endif %}
{% if condition.differential_set.exists %}
<div class="card mb-3">
<div class="card-body">
+10
View File
@@ -27,6 +27,16 @@
</ul>
{% endif %}
{# Also include cases referenced via CaseDisplaySet that list this finding #}
{% if finding.casedisplayset_set.all %}
<h4>Cases via Display Sets</h4>
<ul>
{% for ds in finding.casedisplayset_set.all %}
<li>Case: {{ ds.case.get_link }} (Display set: {{ ds.name }})</li>
{% endfor %}
</ul>
{% endif %}
{% if finding.sbas_questions.all %}
<h4>Related SBA Questions</h4>
<ul>
@@ -27,6 +27,16 @@
{% endfor %}
</ul>
{# Include cases referenced via CaseDisplaySet that list this structure #}
{% if structure.casedisplayset_set.all %}
<h4>Cases via Display Sets</h4>
<ul>
{% for ds in structure.casedisplayset_set.all %}
<li>Case: {{ ds.case.get_link }} (Display set: {{ ds.name }})</li>
{% endfor %}
</ul>
{% endif %}
{% if structure.sbas_questions.all %}
<h4>Related SBA Questions</h4>
<ul>