{% extends "base.html" %} {% from 'macros/help.html' import help_icon %} {% from 'macros/badges.html' import badge_warning, badge_secondary %} {% block title %}{{ user.name }} — MedCover{% endblock %} {% block content %}
← Zpět na uživatele
{% if current_user.has_permission('report.view') %} Přehled akcí {% endif %} {% if not user.is_archived %} {% if not user.is_active and current_user.has_permission('user.activate') %}
{% endif %} {% if user.is_active and current_user.has_permission('user.deactivate') and user.id != current_user.id %}
{% endif %} {% if current_user.has_permission('user.archive') and user.id != current_user.id %}
{% endif %} {% else %} {% if current_user.has_permission('user.archive') %}
{% endif %} {% endif %}
{# ── Left column: info + password ── #}
Základní údaje {% if user.is_archived %} {{ badge_secondary('Archivován') }} {% elif user.is_active %} Aktivní {% else %} {{ badge_warning('Neaktivní') }} {% endif %}
{% if current_user.has_permission('user.edit_any') %}
Neplatný formát. Povolené formáty: +420 123 456 789, 00420 123 456 789, 123 456 789 (mezery jsou volitelné).
{% else %}
Jméno
{{ user.name }}
E-mail
{{ user.email }}
Telefon
{{ user.phone or '—' }}
Registrace
{{ user.created_at | localdt }}
{% endif %}
{% if current_user.has_permission('user.edit_any') %}
Nastavit heslo (volitelné)
Heslo musí mít alespoň {{ min_password_length }} znaků.
{% endif %}
{# ── Right column: roles + qualifications ── #}
{% if current_user.has_permission('user.assign_role') %}
Role {{ help_icon("Role určují, co uživatel v systému smí dělat — jaké stránky vidí a jaké akce může provádět.") }}
{% for role in all_roles %}
{% endfor %}
{% endif %} {% if current_user.has_permission('user.assign_qualification') %}
Kvalifikace {{ help_icon("Kvalifikace určují, na jaké pozice může uživatel nastoupit. Přiřazení zde ovlivňuje, které pozice si může uživatel vybrat při přihlašování na akci.") }}
{% for cred in all_qualifications %}
{% endfor %}
{% endif %}
{% if current_user.has_permission('user.edit_any') %}
Zrušit
{% endif %}
{% endblock %} {% block extra_scripts %} {% endblock %}