{% load i18n document_viewer_tags short_name %} {% comment %} Reusable document thumbnail grid + carousel viewer. Rendered by: common/templatetags/document_viewer_tags.py → render_document_viewer Context variables: docs – list of doc dicts, sorted by (tag.order, tag.name, doc.title) modal_id – HTML id for the viewer modal carousel_id – derived id for Bootstrap carousel thumbs_id – derived id for bottom strip download_id – derived id for download button fullpage_id – derived id for open-in-new-tab button allow_delete – show delete-overlay buttons (edit-mode) show_tags – show tag badge on thumbnails and in carousel caption show_versions – show version number + history button on thumbnails location_id – context-object PK emitted as data-location-id on history buttons {% endcomment %} {% if docs %} {% if not modal_only %} {# ═══════════════════════════ Thumbnail Grid ═══════════════════════════ #} {% endif %} {% if not grid_only %} {# ═══════════════════════════ Viewer Modal ════════════════════════════ #} {# /modal #} {% endif %} {# ═══════════════════════════ Inline JS ══════════════════════════════ #} {% else %} {% endif %}