From b9d66d0026fa25ce45166d35ab82bdee7adb090d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=B3=D0=BE=D1=80=D1=8C=20=D0=9D=D0=B0=D0=B4=D0=B5?= =?UTF-8?q?=D0=B8=D0=BD?= Date: Thu, 20 Nov 2025 09:34:43 +0300 Subject: [PATCH] Fix document_list.html template syntax error - Fix incorrect nesting of {% with %} and {% if %} blocks - Move {% include %} inside both if/else branches - Directly pass 'docCreateModal' or empty string without intermediate variable --- backend/templates/documents/document_list.html | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/backend/templates/documents/document_list.html b/backend/templates/documents/document_list.html index cd1fdb4f..65045649 100644 --- a/backend/templates/documents/document_list.html +++ b/backend/templates/documents/document_list.html @@ -16,12 +16,10 @@ {# ===== НОВАЯ ШАПКА С КОМПОНЕНТОМ ===== #} {% if perms.documents.add_document %} - {% with create_modal_id='docCreateModal' %} + {% include "includes/components/page_header.html" with icon="bi-file-earmark-text" title="Документы" no_search=True scope_urls=scope_urls scope=scope create_modal="docCreateModal" create_text="Создать документ" create_icon="bi-plus-lg" %} {% else %} - {% with create_modal_id='' %} + {% include "includes/components/page_header.html" with icon="bi-file-earmark-text" title="Документы" no_search=True scope_urls=scope_urls scope=scope create_modal='' create_text="Создать документ" create_icon="bi-plus-lg" %} {% endif %} - {% include "includes/components/page_header.html" with icon="bi-file-earmark-text" title="Документы" no_search=True scope_urls=scope_urls scope=scope create_modal=create_modal_id create_text="Создать документ" create_icon="bi-plus-lg" %} - {% endwith %} {# ===== Карточка со списком ===== #}