123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- {% extends 'partials/base.html.twig' %}
- {% if admin.route %}
- {% set installing = admin.route starts with 'install' %}
- {% set installed = true %}
- {# Try installed packages first, then remote #}
- {% set package = admin.themes(true)[admin.route] %}
- {% if (not package) %}
- {% set package = admin.themes(false)[admin.route] %}
- {% set installed = false %}
- {% endif %}
- {% set theme = package.toArray() %}
- {% set title = "PLUGIN_ADMIN.THEME"|tu ~ ": " ~ theme.name|e %}
- {% endif %}
- {% block titlebar %}
- {% if not admin.route or installing %}
- <div class="button-bar">
- {% if (installing) %}
- <a class="button" href="{{ base_url_relative }}/themes"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|tu }}</a>
- {% else %}
- <a class="button" href="{{ base_url }}/"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|tu }}</a>
- <a class="button" href="{{ base_url_relative }}/themes/install"><i class="fa fa-plus"></i> {{ "PLUGIN_ADMIN.ADD"|tu }}</a>
- {% if authorize(['admin.maintenance', 'admin.super']) %}
- <button data-gpm-checkupdates="" class="button"><i class="fa fa-refresh"></i> {{ "PLUGIN_ADMIN.CHECK_FOR_UPDATES"|tu }}</button>
- {% endif %}
- {% endif %}
- </div>
- <h1><i class="fa fa-fw fa-tint"></i> {{ "PLUGIN_ADMIN.THEMES"|tu }}</h1>
- {% else %}
- {% if (installed) %}
- <div class="button-bar">
- <a class="button" href="{{ base_url_relative }}/themes"><i class="fa fa-arrow-left"></i> {{ "PLUGIN_ADMIN.BACK_TO_THEMES"|tu }}</a>
- <button class="button" type="submit" name="task" value="save" form="blueprints"><i class="fa fa-check"></i> {{ "PLUGIN_ADMIN.SAVE"|tu }}</button>
- </div>
- {% else %}
- <div class="button-bar">
- <a class="button" href="{{ base_url_relative }}/themes/install"><i class="fa fa-arrow-left"></i> {{ "PLUGIN_ADMIN.BACK_TO_THEMES"|tu }}</a>
- </div>
- {% endif %}
- <h1><i class="fa fa-fw fa-tint"></i> {{ "PLUGIN_ADMIN.THEME"|tu }}: {{ theme.name|e }}</h1>
- {% endif %}
- {% endblock %}
- {% block content %}
- <div class="gpm gpm-themes">
- {% include 'partials/messages.html.twig' %}
- {% if not admin.route or installing %}
- {% include 'partials/themes-list.html.twig' %}
- {% else %}
- {% include 'partials/themes-details.html.twig' %}
- {% endif %}
- </div>
- {% endblock %}
|