{% set gumroad_loaded = false %}
{% if installing %} {% include 'partials/release-toggle.html.twig' %} {% endif %} {% include 'partials/list-sort.html.twig' with { list_view: 'themes' } %}

{{ installing ? "PLUGIN_ADMIN.AVAILABLE_THEMES"|t : "PLUGIN_ADMIN.INSTALLED_THEMES"|t }}

{% for slug, theme in admin.themes(not installing).toArray|ksort %} {% set state = 'inactive' %} {% if (installing) %}{% set state = 'installing' %}{% endif %} {% if (config.get('system.pages.theme') == slug) %}{% set state = 'active' %}{% endif %} {% set isTestingRelease = admin.gpm.isTestingRelease(slug) %} {% set isPremium = admin.isPremiumProduct(theme) %} {% set releaseDate = theme.date ?: admin.gpm.findPackage(slug, true).date %}
{{ theme.name }} {% if admin.isTeamGrav(theme) %} {% endif %} {% if isPremium %} {% if not gumroad_loaded %} {% set gumroad_loaded = true %} {% endif %} {{ "PLUGIN_ADMIN.PREMIUM_PRODUCT"|t }} {% endif %} {% if theme.symlink %} {% endif %} v{{ theme.version }} {% if isTestingRelease %}test release{% endif %}
{% set thumb = installing ? '//getgrav.org/images/' ~ theme.screenshot : theme.thumbnail %}
{% if (state == 'installing') %}
{% if (theme.premium and not admin.license(theme.slug)) %} {% if not gumroad_loaded %} {% set gumroad_loaded = true %} {% endif %} {{ theme.premium.button|default('Purchase') }} {% else %} {{ "PLUGIN_ADMIN.INSTALL"|t }} {% endif %}
{% elseif state == 'active' %}
{{ "PLUGIN_ADMIN.ACTIVE_THEME"|t }}
{% else %} {{ "PLUGIN_ADMIN.ACTIVATE"|t }} {% endif %}
{% else %} {{ "PLUGIN_ADMIN.OFFLINE_WARNING"|t }} {% endfor %}
{% include 'partials/modal-switch-theme.html.twig' %} {% include 'partials/modal-add-package.html.twig' with { type: 'theme' } %} {% include 'partials/modal-update-packages.html.twig' with { type: 'theme' } %}