Enhance finding search functionality to support series findings and improve result display with badges
This commit is contained in:
@@ -1,16 +1,25 @@
|
||||
<div class="list-group">
|
||||
{% if findings %}
|
||||
{% for f in findings %}
|
||||
<div class="list-group-item d-flex justify-content-between align-items-center" data-finding-pk="{{ f.pk }}">
|
||||
<div class="list-group-item d-flex justify-content-between align-items-center" data-finding-pk="{{ f.pk }}" data-seriesfinding-pk="{{ f.pk }}">
|
||||
<div class="flex-fill">
|
||||
<div class="d-flex w-100 justify-content-between">
|
||||
<strong class="mb-1">{{ f.name }}</strong>
|
||||
<strong class="mb-1">{% if f.series %}{{ f.series.id }}{% else %}Series{% endif %}{% if f.description %}: {{ f.description|truncatechars:80 }}{% endif %}</strong>
|
||||
<small class="text-muted">{{ f.pk }}</small>
|
||||
</div>
|
||||
<p class="mb-1 text-truncate">{{ f.description }}</p>
|
||||
<p class="mb-1 text-truncate">
|
||||
{% if f.findings.all %}
|
||||
{% for sub in f.findings.all %}
|
||||
<span class="badge bg-light text-dark me-1">{{ sub.name }}</span>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{{ f.description }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="ms-2">
|
||||
<a class="btn btn-sm btn-outline-secondary" href="{% url 'atlas:finding_detail' f.pk %}">View</a>
|
||||
{% if f.series %}
|
||||
<a class="btn btn-sm btn-outline-secondary" href="{% url 'atlas:series_detail' pk=f.series.pk %}">View series</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user