tools.html.twig 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. {% extends 'partials/base.html.twig' %}
  2. {% set tools_slug = uri.basename|e %}
  3. {% if tools_slug == 'tools' %}{% set tools_slug = 'direct-install' %}{% endif %}
  4. {% set title = "PLUGIN_ADMIN.TOOLS"|tu ~ ": " ~ ("PLUGIN_ADMIN." ~ tools_slug|underscorize|upper)|tu %}
  5. {% block titlebar %}
  6. <h1><i class="fa fa-fw fa-briefcase"></i> {{ "PLUGIN_ADMIN.TOOLS"|tu }} - {{ ("PLUGIN_ADMIN." ~ tools_slug|underscorize|upper)|tu }}</h1>
  7. {% endblock %}
  8. {% block content_top %}
  9. {% if admin.tools|length > 1 %}
  10. <div class="form-tabs">
  11. <div class="tabs-nav">
  12. {% for tool in admin.tools %}
  13. <a href="{{ base_url_relative }}/tools/{{tool|hyphenize}}" {% if tools_slug == tool|hyphenize %}class="active"{% endif %}>
  14. {{ tool|tu|capitalize }}
  15. </a>
  16. {% endfor %}
  17. </div>
  18. </div>
  19. {% endif %}
  20. {% endblock %}
  21. {% block content %}
  22. {% if authorize(['admin.tools', 'admin.super']) %}
  23. {% include 'partials/tools-' ~ tools_slug ~ '.html.twig' ignore missing %}
  24. {% endif %}
  25. {% endblock %}