Add shorts exam count to collection annotations and update display logic
This commit is contained in:
@@ -38,12 +38,13 @@
|
||||
{# Use annotated counts provided by the view to avoid per-card COUNT queries #}
|
||||
<span class="badge bg-info text-dark ms-1" title="Total exams">{{ collection.total_count }} exams</span>
|
||||
{# Per-type badges (only show non-zero) #}
|
||||
{% with a=collection.anatomy_count l=collection.longs_count p=collection.physics_count r=collection.rapids_count s=collection.sbas_count %}
|
||||
{% with a=collection.anatomy_count l=collection.longs_count p=collection.physics_count r=collection.rapids_count s=collection.sbas_count sh=collection.shorts_count %}
|
||||
{% if a %}<span class="badge bg-primary ms-1">Anatomy {{ a }}</span>{% endif %}
|
||||
{% if l %}<span class="badge bg-primary ms-1">Longs {{ l }}</span>{% endif %}
|
||||
{% if p %}<span class="badge bg-primary ms-1">Physics {{ p }}</span>{% endif %}
|
||||
{% if r %}<span class="badge bg-primary ms-1">Rapids {{ r }}</span>{% endif %}
|
||||
{% if s %}<span class="badge bg-primary ms-1">SBAs {{ s }}</span>{% endif %}
|
||||
{% if sh %}<span class="badge bg-primary ms-1">Shorts {{ sh }}</span>{% endif %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user