Merge branch 'develop' of bitbucket.org:rockettheme/grav-plugin-admin into develop

# By Gert
# Via Andy Miller (1) and Gert (1)
* 'develop' of bitbucket.org:rockettheme/grav-plugin-admin:
  fix for admin plugin toggle showing in admin (issue #9)
This commit is contained in:
Andy Miller
2015-02-27 16:25:09 -07:00
2 changed files with 5 additions and 14 deletions

View File

@@ -11,17 +11,6 @@ keywords: admin, plugin, manager, panel
form:
validation: strict
fields:
enabled:
type: toggle
label: Plugin status
highlight: 1
default: 1
options:
1: Enabled
0: Disabled
validate:
type: bool
route:
type: text
label: Administrator path

View File

@@ -21,9 +21,11 @@
<span class="gpm-version">v{{ plugin.version }}</span>
</td>
<td class="gpm-actions">
<a class="{{ data.get('enabled') ? 'enabled' : 'disabled' }}" href="{{ base_url_relative }}/plugins/{{ slug }}/task:{{ data.get('enabled') ? 'disable' : 'enable' }}">
<i class="fa fa-fw fa-toggle-{{ data.get('enabled') ? 'on' : 'off' }}"></i>
</a>
{% if (plugin.form.fields.enabled) %}
<a class="{{ data.get('enabled') ? 'enabled' : 'disabled' }}" href="{{ base_url_relative }}/plugins/{{ slug }}/task:{{ data.get('enabled') ? 'disable' : 'enable' }}">
<i class="fa fa-fw fa-toggle-{{ data.get('enabled') ? 'on' : 'off' }}"></i>
</a>
{% endif %}
</td>
</tr>
{% endfor %}