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:
parent
71e7491c91
commit
c00b1443be
@ -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">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user