{% include "includes/components/page_header.html" with icon="bi-search" title="Поиск" count=total count_label="Найдено:" search_id="globalSearch" search_placeholder="Фильтр по заголовкам" no_create=True has_filters=True filters_target="searchFilters" filters_template="search/_filters.html" %}
{% if total > 0 %}
{# ===== ПУБЛИКАЦИИ ===== #}
{% if counts.post %}
Публикации
{% for item in results %}
{% if item.model_name == 'post' %}
{% with post=item.object %}
{% for item in results %}
{% if item.model_name == 'chat' %}
{% with chat=item.object %}
{% firstof chat.name chat.department.name chat.pk as chat_label %}
{% endif %}
{# ===== СООБЩЕНИЯ ===== #}
{% if counts.message %}
Сообщения
{% for item in results %}
{% if item.model_name == 'message' %}
{% with msg=item.object %}
{% firstof msg.chat.name msg.chat.department.name msg.chat.pk as msg_chat_label %}