diff --git a/blueprints.yaml b/blueprints.yaml index ec79b12..091fd05 100644 --- a/blueprints.yaml +++ b/blueprints.yaml @@ -48,3 +48,15 @@ form: 0: PLUGIN_ADMIN.DISABLED validate: type: bool + + admin_active: + type: toggle + label: PLUGIN_PAGINATION.ADMIN_ACTIVE + help: PLUGIN_PAGINATION.ADMIN_ACTIVE_HELP + highlight: 1 + default: 0 + options: + 1: PLUGIN_ADMIN.ENABLED + 0: PLUGIN_ADMIN.DISABLED + validate: + type: bool diff --git a/languages.yaml b/languages.yaml index c8c32f4..272691b 100644 --- a/languages.yaml +++ b/languages.yaml @@ -4,6 +4,8 @@ en: DELTA_HELP: 'How many pages to show left and right of the current page' BUILTIN_CSS: 'Use built in CSS' BUILTIN_CSS_HELP: 'Include the CSS provided by the Pagination plugin' + ADMIN_ACTIVE: 'Active in admin' + ADMIN_ACTIVE_HELP: 'Activate pagination functionality in admin' ru: PLUGIN_PAGINATION: diff --git a/pagination.php b/pagination.php index a460ac7..4562e6a 100644 --- a/pagination.php +++ b/pagination.php @@ -45,7 +45,7 @@ public function autoload() */ public function onPluginsInitialized() { - if ($this->isAdmin()) { + if ($this->isAdmin() && !$this->config->get('plugins.pagination.admin_active', false)) { $this->active = false; return; } diff --git a/pagination.yaml b/pagination.yaml index c83c903..a4baa68 100644 --- a/pagination.yaml +++ b/pagination.yaml @@ -1,3 +1,4 @@ enabled: true built_in_css: true delta: 0 +admin_active: 0