Add dismissible performance warning for large collections in collection_detail template

This commit is contained in:
Ross
2026-02-09 12:44:19 +00:00
parent 65f08cce6c
commit add7a1cf38
+2 -1
View File
@@ -20,8 +20,9 @@
{% include 'exam_notes.html' %} {% include 'exam_notes.html' %}
{% if casesdetails|length > 20 %} {% if casesdetails|length > 20 %}
<div class="alert alert-warning" role="alert"> <div class="alert alert-warning alert-dismissible fade show" role="alert">
<strong>Performance warning:</strong> This collection contains {{ casesdetails|length }} cases — in some situations this may adversely affect performance, all features will still work but page loading may be slower. Consider splitting into smaller collections if performance is an issue. <strong>Performance warning:</strong> This collection contains {{ casesdetails|length }} cases — in some situations this may adversely affect performance, all features will still work but page loading may be slower. Consider splitting into smaller collections if performance is an issue.
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div> </div>
{% endif %} {% endif %}