diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f1d079d..7716f1e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# v1.10.0-rc.20 +## mm/dd/2020 + +1. [](#bugfix) + * Fixed Plugins references in Themes details page. + * Fixed issue preventing purchase of Themes within Admin and redirecting instead. + # v1.10.0-rc.19 ## 12/02/2020 diff --git a/themes/grav/templates/partials/themes-details.html.twig b/themes/grav/templates/partials/themes-details.html.twig index 28190c36..be01e31e 100644 --- a/themes/grav/templates/partials/themes-details.html.twig +++ b/themes/grav/templates/partials/themes-details.html.twig @@ -1,6 +1,7 @@ {% set gpm = admin.gpm() %} {% set installed = gpm.isThemeInstalled(admin.route) %} -{% set isTestingRelease = gpm.isTestingRelease(plugin.slug) %} +{% set isTestingRelease = gpm.isTestingRelease(theme.slug) %} +{% set gumroad_loaded = false %}
@@ -91,7 +92,7 @@ {% if theme.readme or theme.homepage %} {% set readme_link = theme.readme ?: theme.docs|default(theme.homepage ~ '/blob/master/README.md') %} - {{ plugin.readme ? "PLUGIN_ADMIN.README"|tu : "PLUGIN_ADMIN.DOCS"|tu }}: + {{ theme.readme ? "PLUGIN_ADMIN.README"|tu : "PLUGIN_ADMIN.DOCS"|tu }}: {{ readme_link }} {% endif %} @@ -120,13 +121,21 @@ {% endif %} {% else %}
- {{ "PLUGIN_ADMIN.INSTALL_THEME"|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_THEME"|tu }} + {% endif %}
{% endif %} {% include 'partials/modal-changes-detected.html.twig' %} -{% include 'partials/modal-remove-package.html.twig' with { type: 'theme', package: theme } %} {% include 'partials/modal-add-package.html.twig' with { type: 'theme' } %} {% include 'partials/modal-update-packages.html.twig' with { type: 'theme' } %} +{% include 'partials/modal-remove-package.html.twig' with { type: 'theme', package: theme } %} {% include 'partials/modal-reinstall-package.html.twig' with { type: 'theme', package: theme } %} {% include 'partials/modal-changelog.html.twig' with { package: theme} %} diff --git a/themes/grav/templates/partials/themes-list.html.twig b/themes/grav/templates/partials/themes-list.html.twig index 82b03c14..8f9a1610 100644 --- a/themes/grav/templates/partials/themes-list.html.twig +++ b/themes/grav/templates/partials/themes-list.html.twig @@ -1,3 +1,4 @@ +{% set gumroad_loaded = false %}
{% if installing %} {% include 'partials/release-toggle.html.twig' %} @@ -28,6 +29,10 @@ {% endif %} {% if admin.isPremiumProduct(theme) %} + {% if not gumroad_loaded %} + {% set gumroad_loaded = true %} + + {% endif %} {{ "PLUGIN_ADMIN.PREMIUM_PRODUCT"|tu }} {% endif %} {% if theme.symlink %}