{% extends 'admin/base.html' %} {% block title %}{{ t('plugins.title') }}{% endblock %} {% block content %} {% if not core_licensed %}

🔑 {{ t('plugins.core_license_note') }}

{% endif %} {% if restart_in_progress %}

⏳ {{ t('plugins.restart_in_progress') }}

{% elif restart_pending %}

🔄 {{ t('plugins.restart_required') }}

{% endif %} {# ── Install from ZIP ──────────────────────────────────────────────── #}

⬆️ {{ t('plugins.upload_title') }}

{{ t('plugins.upload_help') }}

⚠️ {{ t('plugins.third_party_warning') }}

{# ── Available plugins (from the update server) ────────────────────── #}

🧩 {{ t('plugins.available_title') }}{% if catalog %} ({{ catalog|length }}){% endif %}

{% if catalog|length > 3 %} {% endif %}

{{ t('plugins.available_help') }}

{% if not catalog %}

{{ t('plugins.catalog_empty') }}

{% endif %}
{% for c in catalog %}
6 %}data-catalog-overflow="1"{% endif %}>
{% if c.icon and update_server_url %} {% endif %} {{ c.name }} v{{ c.version }} {% if c.requires_plugin_license %} 🔑 {{ t('plugins.catalog_license') }} {% else %} {{ t('plugins.catalog_free') }} {% endif %}
{% if c.description %}

{{ c.description }}

{% endif %} {% if c.min_cms_version %}

{{ t('plugins.catalog_requires_cms', version=c.min_cms_version) }}

{% endif %}
{% if c.requires_plugin_license %} {% endif %}
{% endfor %}
{% if catalog|length > 6 %} {% endif %}
{# ── Installed plugins ─────────────────────────────────────────────── #}

📦 {{ t('plugins.installed') }}{% if plugins_total %} ({{ plugins_total }}){% endif %}

{% if plugins %}
{% endif %}
{% if not plugins %}

{{ t('plugins.no_plugins') }}

{% endif %} {% for p in plugins %} {% set m = p.manifest %}
{% if p.has_icon %} {% endif %} {{ m.name }} v{{ m.version }} {% if m.author %} — {% if m.author_url %}{{ m.author }}{% else %}{{ m.author }}{% endif %} {% endif %} {% if p.status == 'active' %} {{ t('plugins.status_active') }} {% elif p.status == 'disabled' %} {{ t('plugins.status_disabled') }} {% elif p.status == 'needs_license' %} {{ t('plugins.status_needs_license') }} {% elif p.status == 'needs_core_license' %} {{ t('plugins.status_needs_core_license') }} {% elif p.status == 'pending_restart' %} {{ t('plugins.status_pending_restart') }} {% else %} {{ t('plugins.status_error') }} {% endif %}
{# Description: a loaded plugin may translate it via the i18n key ".description" (same convention as themes.desc_*); the manifest's static description is the fallback. #} {% set _desc_key = m.id ~ '.description' %} {% set _desc = t(_desc_key) %} {% if _desc != _desc_key %}

{{ _desc }}

{% elif m.description %}

{{ m.description }}

{% endif %} {% if p.load_error %}

⚠️ {{ p.load_error }}

{% endif %} {# Available update from the update server #} {% if p.update_info %}
⬆️ {{ t('plugins.update_available', version=p.update_info.latest_version) }} {% if p.update_info.release_date %} {{ p.update_info.release_date }} {% endif %}
{% if p.update_info.changelog %}

{{ t('plugins.changelog') }}: {{ p.update_info.changelog }}

{% endif %}
{% endif %} {# License block — only for plugins sold with their own key #} {% if m.license_required and not p.load_error %}
{% if p.licensed %} 🔑 {{ t('plugins.license_valid') }} {% else %}
{% endif %}
{% endif %}
{% if not p.load_error %}
{% if p.enabled %} {% else %} {% endif %}
{% endif %}
{% endfor %} {% if plugins_pages and plugins_pages > 1 %} {% endif %}
{% endblock %}