From bc90837c3255cd18328d684e39f8c72e1afd0368 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Thu, 3 Sep 2020 18:14:05 -0600 Subject: [PATCH] added support for theme purchase --- themes/grav/templates/partials/themes-list.html.twig | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/themes/grav/templates/partials/themes-list.html.twig b/themes/grav/templates/partials/themes-list.html.twig index 407e393e..82b03c14 100644 --- a/themes/grav/templates/partials/themes-list.html.twig +++ b/themes/grav/templates/partials/themes-list.html.twig @@ -44,7 +44,16 @@ {% if (state == 'installing') %}
- {{ "PLUGIN_ADMIN.INSTALL"|tu }} + {% 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"|tu }} + {% endif %} +
{% elseif state == 'active' %}