hide uninstall button for active theme

This commit is contained in:
Gert
2015-04-16 18:02:06 +02:00
parent 6ddf899e5e
commit d990e4d895

View File

@@ -88,10 +88,12 @@
{% set data = admin.data('themes/' ~ admin.route) %} {% set data = admin.data('themes/' ~ admin.route) %}
{% include 'partials/blueprints.html.twig' with { data: data, blueprints: data.blueprints } %} {% include 'partials/blueprints.html.twig' with { data: data, blueprints: data.blueprints } %}
{% if (config.get('system.pages.theme') != admin.route) %}
<div class="button-bar danger"> <div class="button-bar danger">
<span class="danger-zone"></span> <span class="danger-zone"></span>
<a class="button" href="{{ base_url_relative }}/themes/{{ theme.slug }}/task:uninstall"><i class="fa fa-fw fa-warning"></i>Remove Theme</a> <a class="button" href="{{ base_url_relative }}/themes/{{ theme.slug }}/task:uninstall"><i class="fa fa-fw fa-warning"></i>Remove Theme</a>
</div> </div>
{% endif %}
{% else %} {% else %}
<div class="button-bar success"> <div class="button-bar success">
<a class="button" href="{{ base_url_relative }}/themes/{{ theme.slug }}/task:install"><i class="fa fa-fw fa-plus"></i>Install Theme</a> <a class="button" href="{{ base_url_relative }}/themes/{{ theme.slug }}/task:install"><i class="fa fa-fw fa-plus"></i>Install Theme</a>