{# ===== MODERNE ADMINISTRATION NAVIGATION ===== #} {% set canDashboard = has_permission('ALLOW_DASHBOARD_ACCESS', app.user) %} {% set canUserView = has_permission('ALLOW_USER_VIEW', app.user) %} {% set canRoleView = has_permission('ALLOW_ROLE_VIEW', app.user) %} {% set canPageView = has_permission('ALLOW_PAGE_VIEW', app.user) %} {% set canCategoryView = has_permission('ALLOW_CATEGORY_VIEW', app.user) %} {% set canMediaView = has_permission('ALLOW_MEDIA_VIEW', app.user) %} {% set canCustomFields = has_permission('ALLOW_CUSTOM_FIELDS', app.user) %} {% set canPlugins = has_permission('ALLOW_PLUGINS_VIEW', app.user) %} {% set canModules = has_permission('ALLOW_EXTENSIONS_VIEW', app.user) %} {% set canSettings = has_permission('ALLOW_SETTINGS_VIEW', app.user) %} {% set canTwoFactor = has_permission('ALLOW_SYSTEM_ADMIN', app.user) or has_role(app.user, 'Admin') %} {% if canDashboard %} {{ 'admin.dashboard'|trans }} {% endif %} {% if canUserView or canRoleView or canPageView or canCategoryView or canMediaView or canCustomFields %} {{ 'admin.administration'|trans }} {% if canUserView %}{{ 'admin.users_management'|trans }}{% endif %} {% if canRoleView %}{{ 'admin.role_management'|trans }}{% endif %} {% if (canUserView or canRoleView) and (canPageView or canCategoryView or canMediaView) %}{% endif %} {% if canPageView %}{{ 'admin.pages_management'|trans }}{% endif %} {% if canCategoryView %}{{ 'admin.categories'|trans }}{% endif %} {% if canMediaView %}{{ 'admin.media_management'|trans }}{% endif %} {% if canCustomFields and (canPageView or canCategoryView or canMediaView) %}{% endif %} {% if canCustomFields %}{{ 'admin.custom_fields.title'|trans }}{% endif %} {% endif %} {% if canPlugins or canModules or canSettings %} {{ 'admin.tools'|trans }} {% if canPlugins %}{{ 'admin.plugins'|trans }}{% endif %} {% if canModules %}{{ 'admin.modules'|trans }}{% endif %} {% if canSettings and (canPlugins or canModules) %}{% endif %} {% if canSettings %}{{ 'admin.settings'|trans }}{% endif %} {% endif %} {% if app.user %} {% endif %} {% if app.user %} {% if app.user.profileImageUrl %} {% else %} {{ app.user.username|upper|slice(0, 2) }} {% endif %} {{ app.user.username }} {{ 'admin.administrator'|trans }} {{ 'admin.profile'|trans }} {% if canTwoFactor %} {{ 'admin.two_factor.nav_link'|trans }} {% endif %} {{ 'admin.website'|trans }} {{ 'admin.help_guide.menu'|trans }} {{ 'admin.hotkeys.help'|trans }} (ALT+I) {{ 'menu.logout'|trans }} {% endif %} {% if canDashboard %} {{ 'admin.dashboard'|trans }} {% endif %} {% if canUserView or canRoleView or canPageView or canCategoryView or canMediaView or canCustomFields %} {{ 'admin.administration'|trans }} {% if canUserView %}{{ 'admin.users_management'|trans }}{% endif %} {% if canRoleView %}{{ 'admin.role_management'|trans }}{% endif %} {% if canPageView %}{{ 'admin.pages_management'|trans }}{% endif %} {% if canCategoryView %}{{ 'admin.categories'|trans }}{% endif %} {% if canMediaView %}{{ 'admin.media_management'|trans }}{% endif %} {% if canCustomFields %}{{ 'admin.custom_fields.title'|trans }}{% endif %} {% endif %} {% if canPlugins or canModules or canSettings %} {{ 'admin.modules'|trans }} {% if canPlugins %}{{ 'admin.plugins'|trans }}{% endif %} {% if canModules %}{{ 'admin.modules'|trans }}{% endif %} {% if canSettings %}{{ 'admin.settings'|trans }}{% endif %} {% endif %} {% if app.user %} {{ app.user.username }} {{ 'admin.profile'|trans }} {% if canTwoFactor %} {{ 'admin.two_factor.nav_link'|trans }} {% endif %} {{ 'admin.website'|trans }} {{ 'admin.help_guide.menu'|trans }} {{ 'menu.logout'|trans }} {% endif %} {# Navigation JavaScript #}