This commit is contained in:
Билай Станислав 2025-01-19 21:22:27 +03:00
parent a943b960ad
commit b733a49738
3 changed files with 6 additions and 0 deletions

View File

@ -3,6 +3,7 @@
namespace app\modules\module_shop\controllers; namespace app\modules\module_shop\controllers;
use app\modules\module_shop\models\forms\CreateAdminThemeShopForm; use app\modules\module_shop\models\forms\CreateAdminThemeShopForm;
use app\modules\module_shop\models\forms\CreateThemeShopForm;
use app\modules\module_shop\services\ModuleShopService; use app\modules\module_shop\services\ModuleShopService;
use JetBrains\PhpStorm\NoReturn; use JetBrains\PhpStorm\NoReturn;
use kernel\AdminController; use kernel\AdminController;

View File

@ -27,6 +27,10 @@ App::$collector->group(["prefix" => "admin"], function (CgRouteCollector $router
App::$collector->get('/create', [\app\modules\module_shop\controllers\AdminThemeShopController::class, 'actionCreate']); App::$collector->get('/create', [\app\modules\module_shop\controllers\AdminThemeShopController::class, 'actionCreate']);
App::$collector->post("/", [\app\modules\module_shop\controllers\AdminThemeShopController::class, 'actionAdd']); App::$collector->post("/", [\app\modules\module_shop\controllers\AdminThemeShopController::class, 'actionAdd']);
}); });
App::$collector->group(["prefix" => "theme"], function (CgRouteCollector $router) {
App::$collector->get('/create', [\app\modules\module_shop\controllers\ThemeShopController::class, 'actionCreate']);
App::$collector->post("/", [\app\modules\module_shop\controllers\ThemeShopController::class, 'actionAdd']);
});
}); });
}); });

View File

@ -27,6 +27,7 @@ $table->beforePrint(function () {
$btn = PrimaryBtn::create("Добавить модуль", "/admin/module_shop/module/create", width: '250px')->fetch(); $btn = PrimaryBtn::create("Добавить модуль", "/admin/module_shop/module/create", width: '250px')->fetch();
$btn .= PrimaryBtn::create("Добавить ядро", "/admin/module_shop/kernel/create", '250px')->fetch(); $btn .= PrimaryBtn::create("Добавить ядро", "/admin/module_shop/kernel/create", '250px')->fetch();
$btn .= PrimaryBtn::create("Добавить тему админ-панели", "/admin/module_shop/admin_theme/create", '250px')->fetch(); $btn .= PrimaryBtn::create("Добавить тему админ-панели", "/admin/module_shop/admin_theme/create", '250px')->fetch();
$btn .= PrimaryBtn::create("Добавить тему сайта", "/admin/module_shop/theme/create", '250px')->fetch();
return $btn; return $btn;
}); });
$table->addAction(ViewActionColumn::class); $table->addAction(ViewActionColumn::class);