{% macro icon(name) -%} {%- endmacro %} {% set authentication_page = request.endpoint in ['enterprise.login', 'enterprise.setup', 'mfa.enroll', 'mfa.challenge', 'mfa.recover', 'mfa.replace', 'backup.restore', 'identity.oidc_callback'] %} {% macro nav_item(endpoint, label, glyph, prefix='') -%} {% set active = request.endpoint == endpoint or (prefix and (request.endpoint or '').startswith(prefix)) or (endpoint == 'index' and request.endpoint in ['authority_detail', 'renewal.detail', 'renewal.renew']) %} {{ icon(glyph) }}{{ label }}{% if active %}{% endif %} {%- endmacro %} {% macro theme_switcher() -%} {%- endmacro %} {{ title }} ยท PKIMaster {% if current_user and not authentication_page %}
Console/{{ title }}
{% if key_backend_label is defined %}{{ icon('key') }}{{ key_backend_label }}{% endif %}{{ theme_switcher() }}
{% else %}
{{ icon('shield') }}PKIMasterCertificate operations{{ theme_switcher() }}
{% endif %}
{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %}
    {% for category, message in messages %} {% set category = category if category in ['success', 'error', 'warning', 'info'] else 'info' %} {% set labels = {'success': 'Success', 'error': 'Error', 'warning': 'Warning', 'info': 'Information'} %}
  • {{ icon(category) }}{{ labels[category] }}: {{ message }}
  • {% endfor %}
{% endif %} {% endwith %} {% block content %}{% endblock %}