{% extends 'administration/base.html.twig' %} {% block title %}{{ 'admin.dashboard'|trans }}{% endblock %} {% block body %} {% set canUserCreate = has_permission('ALLOW_USER_CREATE', app.user) %} {% set canPageCreate = has_permission('ALLOW_PAGE_CREATE', app.user) %} {% set canCategoryCreate = has_permission('ALLOW_CATEGORY_CREATE', app.user) %} {% set canMediaView = has_permission('ALLOW_MEDIA_VIEW', app.user) %} {% set canUserView = has_permission('ALLOW_USER_VIEW', app.user) %} {% set canPageView = has_permission('ALLOW_PAGE_VIEW', app.user) %} {% set canCategoryView = has_permission('ALLOW_CATEGORY_VIEW', app.user) %} {% set canCacheManage = has_permission('ALLOW_CACHE_MANAGE', app.user) %} {% set canLicenseView = has_permission('ALLOW_LICENSE_VIEW', app.user) %} {% set canSettingsView = has_permission('ALLOW_SETTINGS_VIEW', app.user) %} {% set canExtensionsView = has_permission('ALLOW_EXTENSIONS_VIEW', app.user) %} {% set canPluginsView = has_permission('ALLOW_PLUGINS_VIEW', app.user) %}
{# — Hero — #}
{# — Schnellaktionen — #}

{{ 'admin.quick_actions'|trans }}

{% if canUserCreate %} {{ 'admin.create_user'|trans }} {% endif %} {% if canPageCreate %} {{ 'admin.create_page'|trans }} {% endif %} {% if canCategoryCreate %} {{ 'admin.create_category'|trans }} {% endif %} {% if canMediaView %} {{ 'admin.upload_media'|trans }} {% endif %} {% if canCacheManage %}
{% endif %} {% if canLicenseView %} {{ 'admin.license_management'|trans }} {% endif %}
{# — System & Aktivität — #}

{{ 'admin.system_health'|trans }}

{{ 'admin.system_health_description'|trans }}

{% set _oh = systemHealth.overall_status|default('unknown') %} {% if _oh == 'healthy' %} {{ 'admin.healthy'|trans }} {% elseif _oh == 'warning' %} {{ 'admin.warning'|trans }} {% elseif _oh == 'unknown' %} {{ 'admin.dashboard_status_unknown'|trans }} {% else %} {{ 'admin.critical'|trans }} {% endif %}
{% for component in systemHealth.components %}
{{ component.name }} {{ component.value }}
{% if component.percent is defined %}
{{ component.percent }}% {% if component.limit is defined %} · {{ component.limit }}{% endif %} {% if component.free is defined %} · {{ component.free }} {{ 'admin.dashboard_free_suffix'|trans }}{% endif %} {% elseif component.limit_label is defined %} {{ component.limit_label }} {% endif %} {% if component.missing is defined and component.missing is not empty %} {{ 'admin.dashboard_missing_extensions'|trans }}: {{ component.missing|join(', ') }} {% endif %} {% if component.details is defined and component.details is not empty %}
    {% for key, value in component.details %}
  • {{ key|title }}: {{ value }}
  • {% endfor %}
{% endif %}
{% endfor %}

{{ 'admin.recent_activity'|trans }}

{% for activity in recentActivity %}
{{ activity.title }}
{% if activity.type == 'plugin_installed' %} Plugin installiert {% elseif activity.type == 'plugin_uninstalled' %} Plugin deinstalliert {% elseif activity.type == 'plugin_activated' %} Plugin aktiviert {% elseif activity.type == 'plugin_deactivated' %} Plugin deaktiviert {% elseif activity.type == 'plugin_updated' %} Plugin-Update {% elseif activity.type == 'user_created' %} Benutzer {% elseif activity.type == 'category_created' %} Kategorie erstellt {% elseif activity.type == 'category_updated' %} Kategorie bearbeitet {% elseif activity.type == 'category_deleted' %} Kategorie gelöscht {% elseif activity.type == 'media_uploaded' %} Media hochgeladen {% elseif activity.type == 'media_deleted' %} Media gelöscht {% elseif activity.type == 'page_created' %} Seite erstellt {% elseif activity.type == 'page_updated' %} Seite bearbeitet {% elseif activity.type == 'page_deleted' %} Seite gelöscht {% else %} {{ activity.type }} {% endif %}
{% else %}

{{ 'admin.no_recent_activity'|trans }}

{% endfor %}
{# — System & Module — #} {% if canExtensionsView or canSettingsView or canPluginsView %}

{{ 'admin.system_modules'|trans }}

{{ 'admin.system_modules_description'|trans }}

{% if canExtensionsView %} {% endif %} {% if canSettingsView %} {% endif %} {% if canPluginsView %} {% endif %}
{% endif %}
{% set dashboard_cache_confirm_html %} {{- 'admin.cache.clear_confirm_message'|trans -}}
{{ 'admin.cache.clear_confirm_description'|trans }} {% endset %} {% endblock %}