From c00b1443bebcb9ba7122d76c7b448eca01a1ca40 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:33:58 +0300 Subject: [PATCH] Fix feed_list.html template syntax error - Fix incorrect nesting of {% with %} and {% if %} blocks - Move {% include %} inside both if/else branches to properly close with blocks - Each branch now has its own include with appropriate create_url value --- backend/templates/feed/feed_list.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/templates/feed/feed_list.html b/backend/templates/feed/feed_list.html index 8c0ed365..d9c8ef5e 100644 --- a/backend/templates/feed/feed_list.html +++ b/backend/templates/feed/feed_list.html @@ -16,13 +16,13 @@ {# ===== НОВАЯ ШАПКА С КОМПОНЕНТОМ ===== #} {% if user.is_authenticated and user.is_staff %} - {% url 'feed:post_create' as post_create_url %} - {% with post_create_url=post_create_url|add:"?type=company" %} + {% url 'feed:post_create' as post_create_url_base %} + {% with post_create_url=post_create_url_base|add:"?type=company" %} + {% include "includes/components/page_header.html" with icon="bi-megaphone" title="Лента" no_search=True create_url=post_create_url create_text="Новая публикация" create_icon="bi-plus-circle" %} + {% endwith %} {% else %} - {% with post_create_url='' %} + {% include "includes/components/page_header.html" with icon="bi-megaphone" title="Лента" no_search=True create_url='' create_text="Новая публикация" create_icon="bi-plus-circle" %} {% endif %} - {% include "includes/components/page_header.html" with icon="bi-megaphone" title="Лента" no_search=True create_url=post_create_url create_text="Новая публикация" create_icon="bi-plus-circle" %} - {% endwith %} {% if new_employees %}