{% extends 'partials/base.html.twig' %} {% set tools_slug = uri.basename|e %} {% if tools_slug == 'tools' %}{% set tools_slug = 'backups' %}{% endif %} {% set title = "PLUGIN_ADMIN.TOOLS"|tu ~ ": " ~ ("PLUGIN_ADMIN." ~ tools_slug|underscorize|upper)|tu %} {% set tools = admin.tools() %} {% set titlebar -%} {% include 'partials/tools-' ~ tools_slug ~ '-titlebar.html.twig' ignore missing %} {%- endset %} {% block titlebar %} {% if titlebar %} {{ titlebar }} {% else %}
{{ "PLUGIN_ADMIN.BACK"|tu }}

{{ "PLUGIN_ADMIN.TOOLS"|tu }} - {{ ("PLUGIN_ADMIN." ~ tools_slug|underscorize|upper)|tu }}

{% endif %} {% endblock %} {% block content_top %} {% if tools|length > 1 %}
{% for slug,tool in tools %} {% set perms = tool|first %} {% set name = tool|last %} {% if authorize(perms) %} {{ name|tu|capitalize }} {% endif %} {% endfor %}
{% endif %} {% endblock %} {% block content %} {% set perms = tools[tools_slug]|first %} {% if authorize(perms) %} {% include 'partials/tools-' ~ tools_slug ~ '.html.twig' ignore missing %} {% else %}

Unauthorized

{% endif %} {% endblock %}