{% extends 'partials/base.html.twig' %} {% set slug = uri.basename %} {% set base_route = location %} {% block stylesheets %} {{ parent() }} {% do assets.addInlineCss('[data-grav-array-name="data[licenses]"] [name^="data[licenses]"] { font-family: monospace; font-size: 1.1rem; }') %} {% endblock %} {% block titlebar %}
{{ "PLUGIN_ADMIN.BACK"|tu }}

{{ "PLUGIN_LICENSE_MANAGER.TITLE"|tu }}

{% endblock %} {% block content %} {% include 'partials/blueprints.html.twig' with { data: license_data, blueprints: license_data.blueprints.init() } %}

{{ "PLUGIN_LICENSE_MANAGER.IMPORT_TITLE"|tu }}

{{ nonce_field('admin-form', 'admin-nonce')|raw }}

Products Installation State

{% set plugins = { remote: admin.plugins(false), local: admin.plugins(true) } %} {% set themes = { remote: admin.themes(false), local: admin.themes(true) } %} {% for slug, license in license_data.toArray.licenses %} {% set isTheme = attribute(themes.remote, slug) or attribute(themes.local, slug) %} {% set isPlugin = attribute(plugins.remote, slug) or attribute(plugins.local, slug) %} {% set label = isTheme ? 'theme' : 'plugin' %} {% set data = admin.data((isTheme ? 'themes/' : 'plugins/') ~ slug).toArray %} {% if data == null %} {{ "PLUGIN_ADMIN.INSTALL"|tu }} {{ slug }} {{ label }} {% elseif data.enabled == true %}
{{ label|title }} {{ slug }} is installed and enabled
{% elseif data.enabled == false %}
{{ label|title }} {{ slug }} is installed but not enabled
{% else %}
{{ slug }} not found in GPM or GPM is out-of-date.
{% endif %} {% endfor %}
{% include 'partials/modal-changes-detected.html.twig' %} {% include 'partials/modal-add-package.html.twig' with { type: 'plugin' } %} {% endblock %}