diff --git a/backend/config/main.php b/backend/config/main.php index 9f8f666..645b486 100755 --- a/backend/config/main.php +++ b/backend/config/main.php @@ -17,16 +17,24 @@ 'controllerNamespace' => 'backend\controllers', 'bootstrap' => [ 'log' ], 'controllerMap' => [ - 'profile' => 'artbox\core\controllers\ProfileController', - 'page' => 'artbox\core\controllers\PageController', - 'alias' => 'artbox\core\controllers\AliasController', - 'seo' => 'artbox\core\controllers\SeoController', - 'feedback' => 'artbox\core\controllers\FeedbackController', - 'weblog-article' => 'artbox\weblog\controllers\ArticleController', - 'category' => 'artbox\catalog\controllers\CategoryController', - 'brand' => 'artbox\catalog\controllers\BrandController', - 'product' => 'artbox\catalog\controllers\ProductController', - 'variant' => 'artbox\catalog\controllers\VariantController', + 'profile' => 'artbox\core\controllers\ProfileController', + 'page' => 'artbox\core\controllers\PageController', + 'alias' => 'artbox\core\controllers\AliasController', + 'seo' => 'artbox\core\controllers\SeoController', + 'feedback' => 'artbox\core\controllers\FeedbackController', + 'weblog-article' => 'artbox\weblog\controllers\ArticleController', + 'category' => 'artbox\catalog\controllers\CategoryController', + 'brand' => 'artbox\catalog\controllers\BrandController', + 'product' => 'artbox\catalog\controllers\ProductController', + 'variant' => 'artbox\catalog\controllers\VariantController', + 'variant-option-group-complementary' => 'artbox\catalog\controllers\VariantOptionGroupComplController', + 'variant-option-group-exclusion' => 'artbox\catalog\controllers\VariantOptionGroupExclController', + 'product-option-group-complementary' => 'artbox\catalog\controllers\ProductOptionGroupComplController', + 'product-option-group-exclusion' => 'artbox\catalog\controllers\ProductOptionGroupExclController', + 'variant-option-complementary' => 'artbox\catalog\controllers\VariantOptionComplController', + 'variant-option-exclusion' => 'artbox\catalog\controllers\VariantOptionExclController', + 'product-option-complementary' => 'artbox\catalog\controllers\ProductOptionComplController', + 'product-option-exclusion' => 'artbox\catalog\controllers\ProductOptionExclController', ], 'components' => [ 'assetManager' => [ diff --git a/backend/views/layouts/main.php b/backend/views/layouts/main.php index e5698a8..57f3331 100755 --- a/backend/views/layouts/main.php +++ b/backend/views/layouts/main.php @@ -12,7 +12,6 @@ use artbox\core\widgets\FlashWidget; use noam148\imagemanager\components\ImageManagerGetPath; use yii\bootstrap\Html; - use yii\web\UrlManager; use yii\web\View; use yii\widgets\Breadcrumbs; use yiister\gentelella\widgets\Menu; @@ -114,86 +113,9 @@
diff --git a/backend/views/layouts/menu_items.php b/backend/views/layouts/menu_items.php new file mode 100644 index 0000000..bb9f8dd --- /dev/null +++ b/backend/views/layouts/menu_items.php @@ -0,0 +1,115 @@ +get('urlManagerFrontend', false)) { + $homeLink = [ + [ + 'label' => \Yii::t('core', 'My website'), + 'url' => $urlManagerFrontend->createUrl([ 'site/index' ]), + 'icon' => 'home', + 'template' => '{icon}{label}{badge}', + 'options' => [ + 'class' => 'homepage_link', + ], + ], + ]; + } + return array_merge( + $homeLink, + [ + [ + 'label' => \Yii::t('core', 'Main'), + 'url' => [ '/site/index' ], + 'icon' => ( \Yii::$app->controller->id === 'site' ) ? 'check' : 'undo', + 'active' => function () { + return \Yii::$app->controller->id === 'site'; + }, + ], + [ + 'label' => \Yii::t('core', 'Static pages'), + 'url' => [ 'page/index' ], + 'icon' => 'file-text', + 'active' => function () { + return \Yii::$app->controller->id === 'page'; + }, + ], + [ + 'label' => \Yii::t('core', 'SEO'), + 'url' => '#', + 'icon' => 'bolt', + 'items' => [ + [ + 'label' => \Yii::t('core', 'Seo pages'), + 'url' => [ 'alias/index' ], + 'icon' => 'file-text', + ], + [ + 'label' => \Yii::t('core', 'Robots'), + 'url' => [ 'settings/robots' ], + 'icon' => 'android', + ], + [ + 'label' => \Yii::t('core', 'Codes'), + 'url' => [ 'settings/codes' ], + 'icon' => 'code', + ], + [ + 'label' => \Yii::t('core', 'Sitemap'), + 'url' => [ '/sitemap/index' ], + 'icon' => 'map-signs', + ], + ], + ], + [ + 'label' => \Yii::t('app', 'SEO'), + 'url' => '#', + 'icon' => 'bolt', + 'items' => [ + [ + 'label' => \Yii::t('core', 'Category'), + 'url' => [ 'category/index' ], + 'icon' => 'file-text', + ], + ], + ], + [ + 'label' => \Yii::t('app', 'Options'), + 'url' => '#', + 'icon' => 'filter', + 'items' => [ + [ + 'label' => \Yii::t('app', 'Options for products'), + 'url' => '#', + 'items' => [ + [ + 'label' => \Yii::t('app', 'Complementary'), + 'url' => [ 'product-option-group-complementary/index' ], + ], + [ + 'label' => \Yii::t('app', 'Exclusion'), + 'url' => [ 'product-option-group-exclusion/index' ], + ], + ], + ], + [ + 'label' => \Yii::t('app', 'Options for variants'), + 'url' => '#', + 'items' => [ + [ + 'label' => \Yii::t('app', 'Complementary'), + 'url' => [ 'variant-option-group-complementary/index' ], + ], + [ + 'label' => \Yii::t('app', 'Exclusion'), + 'url' => [ 'variant-option-group-exclusion/index' ], + ], + ], + ], + ], + ], + ] + ); \ No newline at end of file -- libgit2 0.21.4