{# ПРИМЕР ИСПОЛЬЗОВАНИЯ: employees_list.html С НОВЫМ КОМПОНЕНТОМ #} {% extends 'base.html' %} {% load static django_bootstrap5 %} {% block title %}Сотрудники{% endblock %} {% block extra_css %} {% endblock %} {% block content %}
{# ===== НОВАЯ ШАПКА С КОМПОНЕНТОМ ===== #} {% include "includes/components/page_header.html" with icon="bi-people" title="Сотрудники" count=employees|length count_label="Всего:" search_id="empFilter" search_placeholder="Поиск по ФИО, должности или отделу" create_url=create_url create_text="Создать профиль" create_icon="bi-person-plus" has_filters=True filters_target="empFilters" %} {# ===== НОВЫЙ БЛОК ФИЛЬТРОВ (опционально) ===== #}
Сбросить
{# ===== СПИСОК СОТРУДНИКОВ ===== #}
{% if employees %} {% for emp in employees %}
{% if emp.avatar %} {{ emp.last_name }} {{ emp.first_name }} {% else %} {% endif %}
{% if emp.id %} {{ emp.last_name }} {{ emp.first_name }}{% if emp.patronymic %} {{ emp.patronymic }}{% endif %} {% else %} {{ emp.last_name }} {{ emp.first_name }}{% if emp.patronymic %} {{ emp.patronymic }}{% endif %} {% endif %} {% if emp.position and emp.position.name %} — {{ emp.position.name }} {% elif emp.position_label %} — {{ emp.position_label }} {% endif %}
{% if emp.departments %} {% for d in emp.departments %} {% if d.name %}{{ d.name }}{% if not forloop.last %}, {% endif %}{% endif %} {% endfor %} {% elif is_filtered_by_department and current_department %} {{ current_department.name }} {% endif %}
{% if emp.id %} {% endif %}
{% endfor %} {% else %}
Сотрудники не найдены.
{% endif %}
{% endblock %}