Enhance case search results display to include series modalities and examinations

This commit is contained in:
Ross
2025-11-05 22:08:54 +00:00
parent 4f6e9fae9d
commit b12a45275c
2 changed files with 58 additions and 0 deletions
@@ -7,6 +7,25 @@
<h6 class="mb-1">{{ case.title }}</h6>
<small class="text-muted">{{ case.created_date|date:"Y-m-d" }}</small>
</div>
<div class="mb-1">
<small class="text-muted me-2">{% if case.author.all %}By {{ case.author.all|join:", " }}{% endif %}</small>
{% if case.condition %}<span class="badge bg-secondary me-1">{{ case.condition.name }}</span>{% endif %}
{% if case.presentation %}<span class="badge bg-secondary me-1">{{ case.presentation.name }}</span>{% endif %}
{% if case.subspecialty %}<span class="badge bg-secondary">{{ case.subspecialty.name }}</span>{% endif %}
</div>
<div class="mb-1">
{# show up to three series modalities/examinations if present #}
{% for s in case.series.all|slice:":3" %}
<span class="badge bg-light text-dark me-1">
{% if s.modality %}{{ s.modality.modality }}{% endif %}
{% if s.examination %} / {{ s.examination.examination }}{% endif %}
</span>
{% empty %}
<small class="text-muted">No series</small>
{% endfor %}
</div>
<p class="mb-1 text-truncate">{{ case.description }}</p>
</a>
{% endfor %}