Merge branch '1.10' of github.com:getgrav/grav-plugin-admin into 1.10

This commit is contained in:
Matias Griese
2020-12-10 14:49:47 +02:00
3 changed files with 25 additions and 4 deletions

View File

@@ -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

View File

@@ -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 %}
<div class="grav-update theme" data-gpm-theme="{{ admin.route }}">
</div>
@@ -91,7 +92,7 @@
{% if theme.readme or theme.homepage %}
{% set readme_link = theme.readme ?: theme.docs|default(theme.homepage ~ '/blob/master/README.md') %}
<tr>
<td>{{ plugin.readme ? "PLUGIN_ADMIN.README"|tu : "PLUGIN_ADMIN.DOCS"|tu }}:</td>
<td>{{ theme.readme ? "PLUGIN_ADMIN.README"|tu : "PLUGIN_ADMIN.DOCS"|tu }}:</td>
<td class="double"><a href="{{ readme_link }}" target="_blank" rel="noopener noreferrer">{{ readme_link }}</a></td>
</tr>
{% endif %}
@@ -120,13 +121,21 @@
{% endif %}
{% else %}
<div class="button-bar success">
<a class="button" href="#" data-remodal-target="add-package" data-packages-slugs="{{ theme.slug }}" data-theme-action="start-package-installation"><i class="fa fa-plus"></i> {{ "PLUGIN_ADMIN.INSTALL_THEME"|tu }}</a>
{% if (theme.premium and not admin.license(theme.slug)) %}
{% if not gumroad_loaded %}
{% set gumroad_loaded = true %}
<script src="//gumroad.com/js/gumroad.js"></script>
{% endif %}
<a class="gumroad-button button" href="https://gum.co/{{ theme.premium.permalink }}" target="_blank" data-gumroad-single-product="true"><i class="fa fa-shopping-cart"></i> {{ theme.premium.button|default('Purchase') }}</a>
{% else %}
<a class="button" href="#" data-remodal-target="add-package" data-packages-slugs="{{ theme.slug }}" data-theme-action="start-package-installation"><i class="fa fa-plus"></i> {{ "PLUGIN_ADMIN.INSTALL_THEME"|tu }}</a>
{% endif %}
</div>
{% 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} %}

View File

@@ -1,3 +1,4 @@
{% set gumroad_loaded = false %}
<div class="grav-update themes"></div>
{% if installing %}
{% include 'partials/release-toggle.html.twig' %}
@@ -28,6 +29,10 @@
<small><span class="info-reverse"><i class="fa fa-check-circle" title="{{ "PLUGIN_ADMIN.GRAV_OFFICIAL_THEME"|tu }}"></i></span></small>
{% endif %}
{% if admin.isPremiumProduct(theme) %}
{% if not gumroad_loaded %}
{% set gumroad_loaded = true %}
<script src="//gumroad.com/js/gumroad.js"></script>
{% endif %}
<small><span class="badge warning premium"><i class="fa fa-star-o"></i> {{ "PLUGIN_ADMIN.PREMIUM_PRODUCT"|tu }}</span></small>
{% endif %}
{% if theme.symlink %}