From 8cefad49b81930b0b22092f685182bb5f4179c95 Mon Sep 17 00:00:00 2001 From: Nikolay Beketov Date: Tue, 17 Sep 2024 15:22:39 +0800 Subject: [PATCH] showModuleStatusToggle on modules pages doesn't work --- src/AdminCabinet/Controllers/BaseController.php | 1 + src/AdminCabinet/Views/layouts/main.volt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/AdminCabinet/Controllers/BaseController.php b/src/AdminCabinet/Controllers/BaseController.php index 6bd2aac49..e1f6a40dc 100644 --- a/src/AdminCabinet/Controllers/BaseController.php +++ b/src/AdminCabinet/Controllers/BaseController.php @@ -139,6 +139,7 @@ protected function prepareView(): void } $this->view->module = $module->toArray(); $this->view->globalModuleUniqueId = $module->uniqid; + $this->view->showModuleStatusToggle = $this->showModuleStatusToggle??true; } } diff --git a/src/AdminCabinet/Views/layouts/main.volt b/src/AdminCabinet/Views/layouts/main.volt index 14acf476c..a1be4724d 100644 --- a/src/AdminCabinet/Views/layouts/main.volt +++ b/src/AdminCabinet/Views/layouts/main.volt @@ -30,7 +30,7 @@ {%set contentClass='grey' %} {% endif %}
- {% if (isExternalModuleController) %} + {% if (isExternalModuleController AND showModuleStatusToggle) %} {{ partial("partials/modulesStatusToggle") }} {% endif %}