Enhance case search results display with additional information and tooltips for condition, presentation, and subspecialty
This commit is contained in:
@@ -9,15 +9,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="mb-1">
|
<div class="mb-1">
|
||||||
<small class="text-muted me-2">{% if case.author.all %}By {{ case.author.all|join:", " }}{% endif %}</small>
|
<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.condition %}<span class="badge bg-secondary me-1" title="Condition: {{ case.condition.name }}">{{ case.condition.name }}</span>{% endif %}
|
||||||
{% if case.presentation %}<span class="badge bg-secondary me-1">{{ case.presentation.name }}</span>{% endif %}
|
{% if case.presentation %}<span class="badge bg-secondary me-1" title="Presentation: {{ case.presentation.name }}">{{ case.presentation.name }}</span>{% endif %}
|
||||||
{% if case.subspecialty %}<span class="badge bg-secondary">{{ case.subspecialty.name }}</span>{% endif %}
|
{% if case.subspecialty %}<span class="badge bg-secondary" title="Subspecialty: {{ case.subspecialty.name }}">{{ case.subspecialty.name }}</span>{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-1">
|
<div class="mb-1">
|
||||||
{# show up to three series modalities/examinations if present #}
|
{# show up to three series modalities/examinations if present #}
|
||||||
{% for s in case.series.all|slice:":3" %}
|
{% for s in case.series.all|slice:":3" %}
|
||||||
<span class="badge bg-light text-dark me-1">
|
<span class="badge bg-light text-dark me-1" title="Series: {% if s.modality %}{{ s.modality.modality }}{% endif %}{% if s.examination %} / {{ s.examination.examination }}{% endif %}">
|
||||||
{% if s.modality %}{{ s.modality.modality }}{% endif %}
|
{% if s.modality %}{{ s.modality.modality }}{% endif %}
|
||||||
{% if s.examination %} / {{ s.examination.examination }}{% endif %}
|
{% if s.examination %} / {{ s.examination.examination }}{% endif %}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -1,29 +1,24 @@
|
|||||||
{# Search results #}
|
{# Search results #}
|
||||||
{% if q %}
|
{% if cases and cases|length > 0 %}
|
||||||
{% if cases and cases.exists %}
|
<div class="list-group mb-2">
|
||||||
<div class="list-group mb-2">
|
{% for case in cases %}
|
||||||
{% for case in cases %}
|
<a href="{% url 'atlas:case_detail' case.pk %}" class="list-group-item list-group-item-action">
|
||||||
<div class="list-group-item d-flex justify-content-between align-items-center" data-case-pk="{{ case.pk }}">
|
<div class="d-flex w-100 justify-content-between">
|
||||||
<div class="flex-fill me-3">
|
<h6 class="mb-1">{{ case.title }}</h6>
|
||||||
<div class="fw-semibold">{{ case.title }}</div>
|
<small class="text-muted">{{ case.created_date|date:"Y-m-d" }}</small>
|
||||||
<div class="small text-muted">{% if case.description %}{{ case.description|truncatechars:100 }}{% endif %}</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% if collection %}
|
|
||||||
<form class="m-0" hx-post="{% url 'atlas:add_case_to_collection' collection.pk %}" hx-target="#full-question-list" hx-swap="beforeend">
|
|
||||||
{% csrf_token %}
|
|
||||||
<input type="hidden" name="case" value="{{ case.pk }}">
|
|
||||||
<button type="submit" class="btn btn-sm btn-primary">Add</button>
|
|
||||||
</form>
|
|
||||||
{% else %}
|
|
||||||
<a class="btn btn-sm btn-outline-secondary" href="{% url 'atlas:case_displaysets' case.pk %}">View</a>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
<div class="mb-1">
|
||||||
</div>
|
<small class="text-muted me-2">{% if case.author.all %}By {{ case.author.all|join:", " }}{% endif %}</small>
|
||||||
{% else %}
|
{% if case.condition %}<span class="badge bg-secondary me-1" title="Condition: {{ case.condition.name }}">{{ case.condition.name }}</span>{% endif %}
|
||||||
<div class="text-muted small mb-2">No cases found.</div>
|
{% if case.presentation %}<span class="badge bg-secondary me-1" title="Presentation: {{ case.presentation.name }}">{{ case.presentation.name }}</span>{% endif %}
|
||||||
{% endif %}
|
{% if case.subspecialty %}<span class="badge bg-secondary" title="Subspecialty: {{ case.subspecialty.name }}">{{ case.subspecialty.name }}</span>{% endif %}
|
||||||
|
</div>
|
||||||
|
<p class="mb-1 text-truncate">{% if case.description %}{{ case.description|truncatechars:140 }}{% endif %}</p>
|
||||||
|
</a>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<div class="text-muted small mb-2">No cases found.</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{# Recent cases quick-add (rendered below search results) #}
|
{# Recent cases quick-add (rendered below search results) #}
|
||||||
|
|||||||
Reference in New Issue
Block a user