diff --git a/themes/grav/templates/config.html.twig b/themes/grav/templates/config.html.twig index 5d30c736..5e0d439d 100644 --- a/themes/grav/templates/config.html.twig +++ b/themes/grav/templates/config.html.twig @@ -1,74 +1,72 @@ {% extends 'partials/base.html.twig' %} -{% if authorize(['admin.configuration', 'admin.super']) %} +{% set config_slug = uri.basename %} +{% set isInfo = (config_slug == 'info') %} - {% set config_slug = uri.basename %} - {% set isInfo = (config_slug == 'info') %} +{% set title = "PLUGIN_ADMIN.CONFIGURATION"|tu ~ ": " ~ ("PLUGIN_ADMIN." ~ config_slug|upper)|tu %} - {% set title = "PLUGIN_ADMIN.CONFIGURATION"|tu ~ ": " ~ ("PLUGIN_ADMIN." ~ config_slug|upper)|tu %} - - {% if not isInfo %} - {% set data = admin.data('config/' ~ config_slug) %} - {% endif %} - - {% block stylesheets %} - {% do assets.addCss(theme_url~'/css/codemirror/codemirror.css') %} - {{ parent() }} - {% endblock %} - - {% block javascripts %} - {% do assets.addJs(theme_url~'/js/codemirror-compressed.js') %} - {% do assets.addJs(theme_url~'/js/mdeditor.js') %} - {{ parent() }} - {% endblock %} - - {% block titlebar %} -
- {{ "PLUGIN_ADMIN.BACK"|tu }} - -
-

{{ "PLUGIN_ADMIN.CONFIGURATION"|tu }} - {{ ("PLUGIN_ADMIN." ~ config_slug|upper)|tu }}

- {% endblock %} - - {% block content_top %} -
{{ "PLUGIN_ADMIN.SAVE_LOCATION"|tu }}: {{ data.file.filename|replace({(base_path):''}) }}
- - {% endblock %} - - {% block content %} - {% if isInfo %} -
- {{ admin.phpinfo }} -
- {% else %} - {% include 'partials/blueprints.html.twig' with { blueprints: data.blueprints, data: data } %} - {% endif %} - {% endblock %} +{% if not isInfo %} + {% set data = admin.data('config/' ~ config_slug) %} {% endif %} + +{% block stylesheets %} + {% do assets.addCss(theme_url~'/css/codemirror/codemirror.css') %} + {{ parent() }} +{% endblock %} + +{% block javascripts %} + {% do assets.addJs(theme_url~'/js/codemirror-compressed.js') %} + {% do assets.addJs(theme_url~'/js/mdeditor.js') %} + {{ parent() }} +{% endblock %} + +{% block titlebar %} +
+ {{ "PLUGIN_ADMIN.BACK"|tu }} + +
+

{{ "PLUGIN_ADMIN.CONFIGURATION"|tu }} - {{ ("PLUGIN_ADMIN." ~ config_slug|upper)|tu }}

+{% endblock %} + +{% block content_top %} +
{{ "PLUGIN_ADMIN.SAVE_LOCATION"|tu }}: {{ data.file.filename|replace({(base_path):''}) }}
+ +{% endblock %} + +{% block content %} + {% if isInfo %} +
+ {{ admin.phpinfo }} +
+ {% else %} + {% include 'partials/blueprints.html.twig' with { blueprints: data.blueprints, data: data } %} + {% endif %} +{% endblock %} +