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
This commit is contained in:
admin i 2025-11-20 09:33:58 +03:00
parent e171d2fd59
commit df8a59dde5

View File

@ -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 %}
<div class="feed-new mb-3">