{# --- Инфо-блок отдела (под командой) --- #} {% if dept.description or dept.head %}
{% if dept.description %}
{{ dept.description }}
{% endif %} {% if dept.head %}
Руководитель: {% url 'employees:employee_detail' dept.head.id as head_url %} {% if head_url %} {{ dept.head.last_name }}{% if dept.head.first_name %} {{ dept.head.first_name }}{% endif %} {% else %} {{ dept.head.last_name }}{% if dept.head.first_name %} {{ dept.head.first_name }}{% endif %} {% endif %}
{% endif %} {% if user.is_staff or dept.head.id == user.id or can_manage or can_assign_roles or can_change_head %} {% endif %}
{% endif %}