{% load document_viewer_tags i18n %}

{% translate "Documents & Photos" %}{% if total_documents_count %}{{ total_documents_count }}{% endif %}{% if photos_required %}{% translate "Photos obligatoires" %}{% endif %}

{% if 'documents' in allowed_update_fields %} {% endif %}
{% if total_documents_count == 0 %}

{% translate "Aucun document ou photo pour cette intervention." %}

{% else %} {% for block in document_blocks %} {% if block.count > 0 %}
{{ block.title }} {{ block.count }} {% if block.count > 1 %}{% translate "fichiers" %}{% else %}{% translate "fichier" %}{% endif %}
{% if block.period_display %} {{ block.period_display }} {% endif %}
{% render_document_viewer block.documents modal_id=block.modal_id allow_delete=can_delete_documents delete_always_visible=can_delete_documents allow_copy=can_copy_documents %}
{% endif %} {% endfor %} {% endif %}
{% if 'documents' in allowed_update_fields %} {# ── Copy-document modal ── #} {# Copy-targets JSON for JS #} {% endif %}