mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-10-26 07:46:31 +01:00
When listing installable themes/plugins, it is now possible to sort them by Premium flag
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
<option value="name" selected>{{ "PLUGIN_ADMIN.NAME"|t }}</option>
|
||||
<option value="author">{{ "PLUGIN_ADMIN.AUTHOR"|t }}</option>
|
||||
<option value="official">GravTeam</option>
|
||||
<option value="premium">Premium</option>
|
||||
<option value="release-date">{{ "PLUGIN_ADMIN.RELEASE_DATE"|t }}</option>
|
||||
{% if list_view == 'plugins' and not installing %}<option value="enabled">{{ "PLUGIN_ADMIN.ENABLED"|t }}</option>{% endif %}
|
||||
{% if not installing %}<option value="updatable">{{ "PLUGIN_ADMIN.UPDATES_AVAILABLE"|t }}</option>{% endif %}
|
||||
|
||||
@@ -17,16 +17,17 @@
|
||||
{% for slug, plugin in admin.plugins(not installing).toArray|ksort %}
|
||||
{% set data = admin.data('plugins/' ~ slug) %}
|
||||
{% set isTestingRelease = admin.gpm.isTestingRelease(slug) %}
|
||||
{% set isPremium = admin.isPremiumProduct(plugin) %}
|
||||
{% set releaseDate = plugin.date ?: admin.gpm.findPackage(slug, true).date %}
|
||||
|
||||
<tr data-gpm-plugin="{{ slug|url_encode }}" data-gpm-name="{{ plugin.name }}" data-gpm-release-date="{{ releaseDate }}" data-gpm-author="{{ plugin.author.name }}" data-gpm-official="{{ admin.isTeamGrav(plugin) ? '1' : '2' }}" data-gpm-updatable="{{ admin.gpm.isUpdatable(slug) ? '1' : '2' }}" data-gpm-enabled="{{ data.get('enabled') ? '1' : '2' }}" data-gpm-testing="{{ isTestingRelease ? '1' : '2' }}">
|
||||
<tr data-gpm-plugin="{{ slug|url_encode }}" data-gpm-name="{{ plugin.name }}" data-gpm-release-date="{{ releaseDate }}" data-gpm-author="{{ plugin.author.name }}" data-gpm-official="{{ admin.isTeamGrav(plugin) ? '1' : '2' }}" data-gpm-updatable="{{ admin.gpm.isUpdatable(slug) ? '1' : '2' }}" data-gpm-enabled="{{ data.get('enabled') ? '1' : '2' }}" data-gpm-testing="{{ isTestingRelease ? '1' : '2' }}" data-gpm-premium="{{ isPremium ? '1' : '2' }}">
|
||||
<td class="gpm-name quadruple">
|
||||
<i class="fa fa-fw fa-{{ plugin.icon }}"></i>
|
||||
<a href="{{ admin_route('/plugins/' ~ slug|url_encode) }}">{{ plugin.name }}</a>
|
||||
{% if admin.isTeamGrav(plugin) %}
|
||||
<small><span class="info-reverse"><i class="fa fa-check-circle" title="{{ "PLUGIN_ADMIN.GRAV_OFFICIAL_PLUGIN"|t }}"></i></span></small>
|
||||
{% endif %}
|
||||
{% if admin.isPremiumProduct(plugin) %}
|
||||
{% if isPremium %}
|
||||
{% if not gumroad_loaded %}
|
||||
{% set gumroad_loaded = true %}
|
||||
<script src="//gumroad.com/js/gumroad.js"></script>
|
||||
|
||||
@@ -19,16 +19,17 @@
|
||||
{% 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 %}
|
||||
|
||||
<div class="theme card-item pure-u-1-3 {{ state }}-theme" data-gpm-theme="{{ slug|url_encode }}" data-gpm-name="{{ theme.name }}" data-gpm-release-date="{{ releaseDate }}" data-gpm-author="{{ theme.author.name }}" data-gpm-official="{{ admin.isTeamGrav(theme) ? '1' : '2' }}" data-gpm-updatable="{{ admin.gpm.isUpdatable(slug) ? '1' : '2' }}" data-gpm-enabled="{{ data.get('enabled') ? '1' : '2' }}" data-gpm-testing="{{ isTestingRelease ? '1' : '2' }}">
|
||||
<div class="theme card-item pure-u-1-3 {{ state }}-theme" data-gpm-theme="{{ slug|url_encode }}" data-gpm-name="{{ theme.name }}" data-gpm-release-date="{{ releaseDate }}" data-gpm-author="{{ theme.author.name }}" data-gpm-official="{{ admin.isTeamGrav(theme) ? '1' : '2' }}" data-gpm-updatable="{{ admin.gpm.isUpdatable(slug) ? '1' : '2' }}" data-gpm-enabled="{{ data.get('enabled') ? '1' : '2' }}" data-gpm-testing="{{ isTestingRelease ? '1' : '2' }}" data-gpm-premium="{{ isPremium ? '1' : '2' }}">
|
||||
<div class="gpm-name">
|
||||
<i class="fa fa-fw fa-{{ theme.icon }}"></i>
|
||||
<a href="{{ admin_route('/themes/' ~ slug|url_encode) }}">{{ theme.name }}</a>
|
||||
{% if admin.isTeamGrav(theme) %}
|
||||
<small><span class="info-reverse"><i class="fa fa-check-circle" title="{{ "PLUGIN_ADMIN.GRAV_OFFICIAL_THEME"|t }}"></i></span></small>
|
||||
{% endif %}
|
||||
{% if admin.isPremiumProduct(theme) %}
|
||||
{% if isPremium %}
|
||||
{% if not gumroad_loaded %}
|
||||
{% set gumroad_loaded = true %}
|
||||
<script src="//gumroad.com/js/gumroad.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user