From 8dad4a5a5c439fb1a8e71fcda9e75615ee078e00 Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 2 Feb 2026 10:59:05 +0000 Subject: [PATCH] Refactor case badges to support multiple conditions, presentations, and subspecialties in search results --- .../atlas/partials/_case_search_results.html | 12 +++++++++--- .../atlas/partials/case_search_results.html | 12 +++++++++--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/atlas/templates/atlas/partials/_case_search_results.html b/atlas/templates/atlas/partials/_case_search_results.html index 77ddc41f..9ada7633 100644 --- a/atlas/templates/atlas/partials/_case_search_results.html +++ b/atlas/templates/atlas/partials/_case_search_results.html @@ -9,9 +9,15 @@
{% if case.author.all %}By {{ case.author.all|join:", " }}{% endif %} - {% if case.condition and case.condition.name %}{{ case.condition.name }}{% endif %} - {% if case.presentation and case.presentation.name %}{{ case.presentation.name }}{% endif %} - {% if case.subspecialty and case.subspecialty.name %}{{ case.subspecialty.name }}{% endif %} + {% for cond in case.condition.all %} + {% if cond.name %}{{ cond.name }}{% endif %} + {% endfor %} + {% for pres in case.presentation.all %} + {% if pres.name %}{{ pres.name }}{% endif %} + {% endfor %} + {% for ss in case.subspecialty.all %} + {% if ss.name %}{{ ss.name }}{% endif %} + {% endfor %}
diff --git a/atlas/templates/atlas/partials/case_search_results.html b/atlas/templates/atlas/partials/case_search_results.html index 9758acf3..1fa078f1 100644 --- a/atlas/templates/atlas/partials/case_search_results.html +++ b/atlas/templates/atlas/partials/case_search_results.html @@ -9,9 +9,15 @@
{% if case.author.all %}By {{ case.author.all|join:", " }}{% endif %} - {% if case.condition and case.condition.name %}{{ case.condition.name }}{% endif %} - {% if case.presentation and case.presentation.name %}{{ case.presentation.name }}{% endif %} - {% if case.subspecialty and case.subspecialty.name %}{{ case.subspecialty.name }}{% endif %} + {% for cond in case.condition.all %} + {% if cond.name %}{{ cond.name }}{% endif %} + {% endfor %} + {% for pres in case.presentation.all %} + {% if pres.name %}{{ pres.name }}{% endif %} + {% endfor %} + {% for ss in case.subspecialty.all %} + {% if ss.name %}{{ ss.name }}{% endif %} + {% endfor %}

{% if case.description %}{{ case.description|truncatechars:140 }}{% endif %}