12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- {% 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.plugins(true)[admin.route] %}
- {% if (not package) %}
- {% set package = admin.plugins(false)[admin.route] %}
- {% set installed = false %}
- {% endif %}
- {% set plugin = package.toArray() %}
- {% set title = "PLUGIN_ADMIN.PLUGIN"|tu ~ ": " ~ plugin.name|e %}
- {% endif %}
- {% block titlebar %}
- {% if not admin.route or installing %}
- <div class="button-bar">
- {% if (installing) %}
- <a class="button" href="{{ base_url_relative }}/plugins"><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 }}/plugins/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-plug"></i> {{ "PLUGIN_ADMIN.PLUGINS"|tu }}</h1>
- {% else %}
- {% if (installed) %}
- <div class="button-bar">
- <a class="button" href="{{ base_url_relative }}/plugins"><i class="fa fa-arrow-left"></i> {{ "PLUGIN_ADMIN.BACK_TO_PLUGINS"|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 }}/plugins/install"><i class="fa fa-arrow-left"></i> {{ "PLUGIN_ADMIN.BACK_TO_PLUGINS"|tu }}</a>
- </div>
- {% endif %}
- <h1><i class="fa fa-fw fa-plug"></i> {{ "PLUGIN_ADMIN.PLUGIN"|tu }}: {{ plugin.name|e }}</h1>
- {% endif %}
- {% endblock %}
- {% block content %}
- <div class="gpm gpm-plugins">
- {% include 'partials/messages.html.twig' %}
- {% if not admin.route or installing %}
- {% include 'partials/plugins-list.html.twig' %}
- {% else %}
- {% include 'partials/plugins-details.html.twig' %}
- {% endif %}
- </div>
- {% endblock %}
|