{% extends 'partials/base.html.twig' %} {% set plugin_slug = admin.route %} {% set enabled = true %} {% if plugin_slug %} {% set installing = plugin_slug starts with 'install' %} {% if installing %} {% set title = "PLUGIN_ADMIN.PLUGINS"|t %} {% else %} {% set installed = true %} {# Try installed packages first, then remote #} {% set package = admin.plugins(true)[admin.route] %} {% if (not package) %} {% set package = admin.plugins(false)[admin.route] %} {% set installed = false %} {% endif %} {% set plugin = package.toArray() %} {% set title = "PLUGIN_ADMIN.PLUGIN"|t ~ ": " ~ plugin.name %} {% set data = admin.data('plugins/' ~ admin.route) %} {% set enabled = data.get('enabled') %} {% endif %} {% else %} {% set title = "PLUGIN_ADMIN.PLUGINS"|t %} {% endif %} {% if admin.route or installing %} {% block stylesheets %} {% do assets.addCss(theme_url~'/css/codemirror/codemirror.css') %} {{ parent() }} {% endblock %} {% block javascripts %} {{ parent() }} {% endblock %} {% endif %} {% block titlebar %} {% if not admin.route or installing %}