From 7a3809d2f1e0b9258b84deae1d3b74f37500dbdd Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Fri, 21 Aug 2015 15:33:04 -0600 Subject: [PATCH] added a save location notice to configuration/site editing pages --- admin.php | 1 + languages.yaml | 1 + themes/grav/templates/site.html.twig | 2 ++ themes/grav/templates/system.html.twig | 4 ++++ 4 files changed, 8 insertions(+) diff --git a/admin.php b/admin.php index 39cb83c8..03f73f12 100644 --- a/admin.php +++ b/admin.php @@ -213,6 +213,7 @@ class AdminPlugin extends Plugin ($twig->twig_vars['base_url_relative'] != '/' ? '/' : '') . $twig->twig_vars['admin_route']; $twig->twig_vars['theme_url'] = '/user/plugins/admin/themes/' . $this->theme; $twig->twig_vars['base_url'] = $twig->twig_vars['base_url_relative']; + $twig->twig_vars['base_path'] = GRAV_ROOT; $twig->twig_vars['admin'] = $this->admin; switch ($this->template) { diff --git a/languages.yaml b/languages.yaml index 3b04f59d..3ae92dcd 100644 --- a/languages.yaml +++ b/languages.yaml @@ -417,6 +417,7 @@ en: OF_YOUR: of your HAVE_AN_UPDATE_AVAILABLE: have an update available SAVE_AS: Save as + SAVE_LOCATION: Save location MODAL_DELETE_PAGE_CONFIRMATION_REQUIRED_DESC: Are you sure you want to delete this page and all it's children? If the page is translated in other languages, those translations will be kept and must be deleted separately. Otherwise the page folder will be deleted along with its subpages. This action cannot be undone. es: diff --git a/themes/grav/templates/site.html.twig b/themes/grav/templates/site.html.twig index f8fada2a..1ecdb791 100644 --- a/themes/grav/templates/site.html.twig +++ b/themes/grav/templates/site.html.twig @@ -18,6 +18,8 @@ {% block content %} {% set data = admin.data('site') %} +
+
{{ "PLUGIN_ADMIN.SAVE_LOCATION"|tu }}: {{ data.file.filename|replace({(base_path):''}) }}
{% include 'partials/blueprints.html.twig' with { blueprints: data.blueprints, data: data } %} {% endblock %} diff --git a/themes/grav/templates/system.html.twig b/themes/grav/templates/system.html.twig index ac2b3b53..7c98b7d7 100644 --- a/themes/grav/templates/system.html.twig +++ b/themes/grav/templates/system.html.twig @@ -18,6 +18,10 @@ {% block content %} {% set data = admin.data('system') %} +
+ + {{ dump(base_path) }} +
{{ "PLUGIN_ADMIN.SAVE_LOCATION"|tu }}: {{ data.file.filename|replace({(base_path):''}) }}
{% include 'partials/blueprints.html.twig' with { blueprints: data.blueprints, data: data } %} {% endblock %}