diff --git a/kernel/admin_themes/default/layout/main.php b/kernel/admin_themes/default/layout/main.php index 704683f..5864fb1 100644 --- a/kernel/admin_themes/default/layout/main.php +++ b/kernel/admin_themes/default/layout/main.php @@ -14,7 +14,7 @@ - + diff --git a/kernel/controllers/ModuleController.php b/kernel/controllers/ModuleController.php index fab7bd3..18262cb 100644 --- a/kernel/controllers/ModuleController.php +++ b/kernel/controllers/ModuleController.php @@ -122,8 +122,6 @@ class ModuleController extends AdminController $this->redirect("/admin/module_shop_client/update/?slug=" . $slug, 302); } - - $this->cgView->render("view.php", ['data' => $mod_info]); } diff --git a/kernel/views/module/index.php b/kernel/views/module/index.php index 3cbf641..f615734 100644 --- a/kernel/views/module/index.php +++ b/kernel/views/module/index.php @@ -34,9 +34,9 @@ $table->addAction(function ($row, $url) use ($moduleService) { $btn = "$label"; } else { - $label = "Активировать"; + $label = ""; $btn_type = "success"; - $btn = "$label"; + $btn = "$label"; } return $btn; diff --git a/kernel/widgets/ActionButtonWidget.php b/kernel/widgets/ActionButtonWidget.php new file mode 100644 index 0000000..adea90f --- /dev/null +++ b/kernel/widgets/ActionButtonWidget.php @@ -0,0 +1,16 @@ +data['icon']; + $btn = $this->data['btn']; + $url = $this->data['url']; + $this->cgView->render('/admin/action_button.php', ['icon' => $icon, 'btn' => $btn, 'url' => $url]); + } +} \ No newline at end of file diff --git a/views/widgets/admin/action_button.php b/views/widgets/admin/action_button.php new file mode 100644 index 0000000..f04355c --- /dev/null +++ b/views/widgets/admin/action_button.php @@ -0,0 +1,9 @@ + + +"$label"; \ No newline at end of file