mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-06 13:25:46 +01:00
Added new Admin cache_enabled option independent of main site.
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
# v1.2.x
|
# v1.2.x
|
||||||
## 09/xx/2016
|
## 09/xx/2016
|
||||||
|
|
||||||
|
1. [](#new)
|
||||||
|
* Added a new independent `cache_enabled` option for admin plugin (default is `false`). Should fix various sync issues.
|
||||||
1. [](#improved)
|
1. [](#improved)
|
||||||
* Handle errors when a resource fails to install
|
* Handle errors when a resource fails to install
|
||||||
1. [](#bugfix)
|
1. [](#bugfix)
|
||||||
|
|||||||
@@ -120,6 +120,11 @@ class AdminPlugin extends Plugin
|
|||||||
// Only activate admin if we're inside the admin path.
|
// Only activate admin if we're inside the admin path.
|
||||||
if ($this->isAdminPath()) {
|
if ($this->isAdminPath()) {
|
||||||
$this->active = true;
|
$this->active = true;
|
||||||
|
|
||||||
|
// Set cache based on admin_cache option
|
||||||
|
if (method_exists($this->grav['cache'], 'setEnabled')) {
|
||||||
|
$this->grav['cache']->setEnabled($this->config->get('plugins.admin.cache_enabled'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
enabled: true
|
enabled: true
|
||||||
route: '/admin'
|
route: '/admin'
|
||||||
|
cache_enabled: false
|
||||||
theme: grav
|
theme: grav
|
||||||
logo_text: ''
|
logo_text: ''
|
||||||
body_classes: ''
|
body_classes: ''
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ docs: https://github.com/getgrav/grav-plugin-admin/blob/develop/README.md
|
|||||||
license: MIT
|
license: MIT
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- { name: grav, version: '>=1.1.4' }
|
- { name: grav, version: '>=1.1.6' }
|
||||||
- { name: form, version: '~2.0' }
|
- { name: form, version: '~2.0' }
|
||||||
- { name: email, version: '~2.0' }
|
- { name: email, version: '~2.0' }
|
||||||
- { name: login, version: '~2.0' }
|
- { name: login, version: '~2.0' }
|
||||||
@@ -37,6 +37,17 @@ form:
|
|||||||
validate:
|
validate:
|
||||||
type: bool
|
type: bool
|
||||||
|
|
||||||
|
cache_enabled:
|
||||||
|
type: toggle
|
||||||
|
label: PLUGIN_ADMIN.ADMIN_CACHING
|
||||||
|
help: PLUGIN_ADMIN.ADMIN_CACHING_HELP
|
||||||
|
highlight: 0
|
||||||
|
options:
|
||||||
|
1: PLUGIN_ADMIN.YES
|
||||||
|
0: PLUGIN_ADMIN.NO
|
||||||
|
validate:
|
||||||
|
type: bool
|
||||||
|
|
||||||
route:
|
route:
|
||||||
type: text
|
type: text
|
||||||
label: Administrator path
|
label: Administrator path
|
||||||
|
|||||||
@@ -610,3 +610,5 @@ PLUGIN_ADMIN:
|
|||||||
DROPZONE_MAX_FILES_EXCEEDED: "You can not upload any more files."
|
DROPZONE_MAX_FILES_EXCEEDED: "You can not upload any more files."
|
||||||
DROPZONE_REMOVE_FILE: "Remove file"
|
DROPZONE_REMOVE_FILE: "Remove file"
|
||||||
DROPZONE_RESPONSE_ERROR: "Server responded with {{statusCode}} code."
|
DROPZONE_RESPONSE_ERROR: "Server responded with {{statusCode}} code."
|
||||||
|
ADMIN_CACHING: "Enable Admin Caching"
|
||||||
|
ADMIN_CACHING_HELP: "Caching in the admin can be controlled independently from the front-end site"
|
||||||
|
|||||||
Reference in New Issue
Block a user