Skip to content

Commit

Permalink
Added clear cache permanently to quick-tray [#1353
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Mar 9, 2018
1 parent 35b31c1 commit 5dbfecc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

1. [](#new)
* Added styling and lang for **Route Overrides** in the default page blueprint
* Added clear cache permanently to quick-tray [#1353](https://github.com/getgrav/grav-plugin-admin/issues/1353)
1. [](#improved)
* Added option to toggle between `line-awesome` and `font-awesome` icon sets [#1334](https://github.com/getgrav/grav-plugin-admin/issues/1334)
* Added preview from page list view [#1250](https://github.com/getgrav/grav-plugin-admin/pull/1250)
Expand Down
21 changes: 17 additions & 4 deletions themes/grav/templates/partials/nav-quick-tray.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{% if grav.twig.plugins_quick_tray %}
<ul id="admin-nav-quick-tray">
{% set clear_cache_url = base_url_relative ~ '/cache.json/task' ~ config.system.param_sep ~ 'clearCache'|e('html_attr') %}
<ul id="admin-nav-quick-tray">
<li class="hint--bottom" data-hint="{{ "PLUGIN_ADMIN.CLEAR_CACHE"|tu }}">
<a data-clear-cache-type="" data-clear-cache="{{ uri.addNonce(clear_cache_url, 'admin-form', 'admin-nonce') }}">
<i class="fa fa-trash"></i>
</a>
</li>
{% if grav.twig.plugins_quick_tray %}
{% for label, item in grav.twig.plugins_quick_tray %}
{% if authorize((item.authorize is defined and item.authorize is iterable) ? item.authorize : [item.authorize ?: ('admin.' ~ (item.location ?: item.route)), 'admin.super']) %}
{% set data_tags = '' %}
Expand All @@ -19,5 +25,12 @@
</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
{% else %}
<li class="hint--bottom" data-hint="Add the 'quick-tray' plugin for more...">
<a href="{{ base_url_relative ~ '/plugins/install' }}">
<i class="fa fa-plus"></i>
</a>
</li>
{% endif %}
</ul>

0 comments on commit 5dbfecc

Please sign in to comment.