Commit 1a7c87b99720aa3f32be1c9cf7cce56fd6f7173c
1 parent
ab395fa0
-Image manager in process, need to add css
Showing
6 changed files
with
407 additions
and
374 deletions
Show diff stats
backend/views/layouts/main.php
| @@ -39,207 +39,226 @@ | @@ -39,207 +39,226 @@ | ||
| 39 | <?php $this->beginPage(); ?> | 39 | <?php $this->beginPage(); ?> |
| 40 | <!DOCTYPE html> | 40 | <!DOCTYPE html> |
| 41 | <html lang="<?= Yii::$app->language ?>"> | 41 | <html lang="<?= Yii::$app->language ?>"> |
| 42 | - <head> | ||
| 43 | - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | ||
| 44 | - <meta charset="<?= Yii::$app->charset ?>"/> | ||
| 45 | - <meta http-equiv="X-UA-Compatible" content="IE=edge"/> | ||
| 46 | - <meta name="viewport" content="width=device-width, initial-scale=1"/> | ||
| 47 | - <?= Html::csrfMetaTags() ?> | ||
| 48 | - <title><?= Html::encode($this->title) ?></title> | ||
| 49 | - <?php $this->head() ?> | ||
| 50 | - </head> | ||
| 51 | - <body class="nav-md"> | ||
| 52 | - <?php $this->beginBody(); ?> | ||
| 53 | - <div class="container body"> | 42 | + <head> |
| 43 | + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | ||
| 44 | + <meta charset="<?= Yii::$app->charset ?>"/> | ||
| 45 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"/> | ||
| 46 | + <meta name="viewport" content="width=device-width, initial-scale=1"/> | ||
| 47 | + <?= Html::csrfMetaTags() ?> | ||
| 48 | + <title><?= Html::encode($this->title) ?></title> | ||
| 49 | + <?php $this->head() ?> | ||
| 50 | + </head> | ||
| 51 | + <body class="nav-md"> | ||
| 52 | + <?php $this->beginBody(); ?> | ||
| 53 | + <div class="container body"> | ||
| 54 | + | ||
| 55 | + <div class="main_container"> | ||
| 56 | + | ||
| 57 | + <div class="col-md-3 left_col"> | ||
| 58 | + <div class="left_col scroll-view"> | ||
| 54 | 59 | ||
| 55 | - <div class="main_container"> | ||
| 56 | - | ||
| 57 | - <div class="col-md-3 left_col"> | ||
| 58 | - <div class="left_col scroll-view"> | ||
| 59 | - | ||
| 60 | - <div class="navbar nav_title" style="border: 0;"> | ||
| 61 | - <?php | ||
| 62 | - echo Html::a( | ||
| 63 | - Html::icon( | ||
| 64 | - 'rocket', | ||
| 65 | - [ | ||
| 66 | - 'prefix' => 'fa fa-', | ||
| 67 | - ] | ||
| 68 | - ) . Html::tag('span', 'Artbox!'), | ||
| 69 | - [ 'site/index' ], | ||
| 70 | - [ | ||
| 71 | - 'class' => 'site_title', | ||
| 72 | - ] | ||
| 73 | - ); | ||
| 74 | - ?> | ||
| 75 | - </div> | ||
| 76 | - <div class="clearfix"></div> | ||
| 77 | - | ||
| 78 | - <!-- menu prile quick info --> | ||
| 79 | - <div class="profile"> | ||
| 80 | - <div class="profile_pic"> | ||
| 81 | - <?php | ||
| 82 | - echo Html::a( | ||
| 83 | - Html::img( | ||
| 84 | - ( empty( $avatar ) ? 'http://placehold.it/128x128' : $avatar ), | ||
| 85 | - [ | ||
| 86 | - 'alt' => $userData->fullname, | ||
| 87 | - 'title' => \Yii::t('core', 'Change image'), | ||
| 88 | - 'class' => 'img-circle profile_img', | ||
| 89 | - ] | ||
| 90 | - ), | ||
| 91 | - [ 'profile/index' ] | ||
| 92 | - ) | ||
| 93 | - ?> | ||
| 94 | - </div> | ||
| 95 | - <div class="profile_info"> | ||
| 96 | - <span><?= \Yii::t('core', 'Welcome,'); ?></span> | ||
| 97 | - <h2> | ||
| 98 | - <?php | ||
| 99 | - echo Html::a( | ||
| 100 | - $userData->fullname, | ||
| 101 | - [ 'profile/index' ], | ||
| 102 | - [ | ||
| 103 | - 'title' => \Yii::t('core', 'Change name'), | ||
| 104 | - ] | ||
| 105 | - ); | ||
| 106 | - ?> | ||
| 107 | - </h2> | ||
| 108 | - </div> | ||
| 109 | - <div class="clearfix"></div> | ||
| 110 | - </div> | ||
| 111 | - <!-- /menu prile quick info --> | ||
| 112 | - | ||
| 113 | - <br/> | ||
| 114 | - | ||
| 115 | - <!-- sidebar menu --> | ||
| 116 | - <div id="sidebar-menu" class="main_menu_side hidden-print main_menu"> | ||
| 117 | - | ||
| 118 | - <div class="menu_section"> | ||
| 119 | - <?php | ||
| 120 | - echo Menu::widget( | ||
| 121 | - [ | ||
| 122 | - "items" => require( 'menu_items.php' ), | ||
| 123 | - ] | ||
| 124 | - ); ?> | ||
| 125 | - </div> | ||
| 126 | - | ||
| 127 | - </div> | ||
| 128 | - <!-- /sidebar menu --> | ||
| 129 | - | ||
| 130 | - </div> | ||
| 131 | - </div> | ||
| 132 | - | ||
| 133 | - <!-- top navigation --> | ||
| 134 | - <div class="top_nav"> | ||
| 135 | - | ||
| 136 | - <div class="nav_menu"> | ||
| 137 | - <nav class="" role="navigation"> | ||
| 138 | - <div class="nav toggle"> | ||
| 139 | - <a id="menu_toggle"><i class="fa fa-bars"></i></a> | ||
| 140 | - </div> | ||
| 141 | - | ||
| 142 | - <ul class="nav navbar-nav navbar-right"> | ||
| 143 | - <li class=""> | ||
| 144 | - <a href="" class="user-profile dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> | ||
| 145 | - <?php | ||
| 146 | - echo Html::img( | ||
| 147 | - ( empty( $avatar ) ? 'http://placehold.it/128x128' : $avatar ) | ||
| 148 | - ); | ||
| 149 | - echo $user->username; | ||
| 150 | - ?> | ||
| 151 | - <span class=" fa fa-angle-down"></span> | ||
| 152 | - </a> | ||
| 153 | - <ul class="dropdown-menu dropdown-usermenu pull-right"> | ||
| 154 | - <li> | ||
| 155 | - <?= Html::a( | ||
| 156 | - Html::tag( | ||
| 157 | - 'i', | ||
| 158 | - '', | ||
| 159 | - [ 'class' => 'fa fa-user pull-right' ] | ||
| 160 | - ) . ' Профиль', | ||
| 161 | - [ '/profile' ] | ||
| 162 | - ) ?> | ||
| 163 | - </li> | ||
| 164 | - <li> | ||
| 165 | - <?= Html::a( | ||
| 166 | - Html::tag( | ||
| 167 | - 'i', | ||
| 168 | - '', | ||
| 169 | - [ 'class' => 'fa fa-cogs pull-right' ] | ||
| 170 | - ) . ' Настройки', | ||
| 171 | - [ '/settings' ] | ||
| 172 | - ) ?> | ||
| 173 | - </li> | ||
| 174 | - <li> | ||
| 175 | - <?= Html::a( | ||
| 176 | - Html::tag( | ||
| 177 | - 'i', | ||
| 178 | - '', | ||
| 179 | - [ 'class' => 'fa fa-sign-out pull-right' ] | ||
| 180 | - ) . ' Выйти', | ||
| 181 | - [ '/site/logout' ], | ||
| 182 | - [ | ||
| 183 | - 'data-method' => 'POST', | ||
| 184 | - ] | ||
| 185 | - ) ?> | ||
| 186 | - </li> | ||
| 187 | - </ul> | ||
| 188 | - </li> | ||
| 189 | - <li role="presentation"> | ||
| 190 | - <?= FeedbackWidget::widget(); ?> | ||
| 191 | - </li> | ||
| 192 | - </ul> | ||
| 193 | - </nav> | ||
| 194 | - </div> | ||
| 195 | - | ||
| 196 | - </div> | ||
| 197 | - <!-- /top navigation --> | ||
| 198 | - | ||
| 199 | - <!-- page content --> | ||
| 200 | - <div class="right_col" role="main"> | ||
| 201 | - <?php if (isset( $this->params[ 'h1' ] )): ?> | ||
| 202 | - <div class="page-title"> | ||
| 203 | - <div class="title_left"> | ||
| 204 | - <h1><?= $this->params[ 'h1' ] ?></h1> | ||
| 205 | - </div> | ||
| 206 | - <div class="title_right"> | ||
| 207 | - <div class="col-md-5 col-sm-5 col-xs-12 form-group pull-right top_search"> | ||
| 208 | - <div class="input-group"> | ||
| 209 | - <input type="text" class="form-control" placeholder="Поиск..."> | ||
| 210 | - <span class="input-group-btn"> | ||
| 211 | - <button class="btn btn-default" type="button">Найти</button> | ||
| 212 | - </span> | ||
| 213 | - </div> | ||
| 214 | - </div> | ||
| 215 | - </div> | ||
| 216 | - </div> | ||
| 217 | - <?php endif; ?> | ||
| 218 | - <div class="clearfix"></div> | ||
| 219 | - | ||
| 220 | - <?= Breadcrumbs::widget( | 60 | + <div class="navbar nav_title" style="border: 0;"> |
| 61 | + <?php | ||
| 62 | + echo Html::a( | ||
| 63 | + Html::icon( | ||
| 64 | + 'rocket', | ||
| 65 | + [ | ||
| 66 | + 'prefix' => 'fa fa-', | ||
| 67 | + ] | ||
| 68 | + ) . Html::tag('span', 'Artbox!'), | ||
| 69 | + [ 'site/index' ], | ||
| 221 | [ | 70 | [ |
| 222 | - 'links' => isset( $this->params[ 'breadcrumbs' ] ) ? $this->params[ 'breadcrumbs' ] : [], | 71 | + 'class' => 'site_title', |
| 223 | ] | 72 | ] |
| 224 | - ) ?> | ||
| 225 | - | ||
| 226 | - <?= $content ?> | ||
| 227 | - </div> | ||
| 228 | - <!-- /page content --> | ||
| 229 | - <!-- footer content --> | ||
| 230 | - <footer> | ||
| 231 | - | ||
| 232 | - </footer> | ||
| 233 | - <!-- /footer content --> | 73 | + ); |
| 74 | + ?> | ||
| 75 | + </div> | ||
| 76 | + <div class="clearfix"></div> | ||
| 77 | + | ||
| 78 | + <!-- menu prile quick info --> | ||
| 79 | + <div class="profile"> | ||
| 80 | + <div class="profile_pic"> | ||
| 81 | + <?php | ||
| 82 | + echo Html::a( | ||
| 83 | + Html::img( | ||
| 84 | + ( empty($avatar) ? 'http://placehold.it/128x128' : $avatar ), | ||
| 85 | + [ | ||
| 86 | + 'alt' => $userData->fullname, | ||
| 87 | + 'title' => \Yii::t('core', 'Change image'), | ||
| 88 | + 'class' => 'img-circle profile_img', | ||
| 89 | + ] | ||
| 90 | + ), | ||
| 91 | + [ 'profile/index' ] | ||
| 92 | + ) | ||
| 93 | + ?> | ||
| 94 | + </div> | ||
| 95 | + <div class="profile_info"> | ||
| 96 | + <span><?= \Yii::t('core', 'Welcome,'); ?></span> | ||
| 97 | + <h2> | ||
| 98 | + <?php | ||
| 99 | + echo Html::a( | ||
| 100 | + $userData->fullname, | ||
| 101 | + [ 'profile/index' ], | ||
| 102 | + [ | ||
| 103 | + 'title' => \Yii::t('core', 'Change name'), | ||
| 104 | + ] | ||
| 105 | + ); | ||
| 106 | + ?> | ||
| 107 | + </h2> | ||
| 108 | + </div> | ||
| 109 | + <div class="clearfix"></div> | ||
| 110 | + </div> | ||
| 111 | + <!-- /menu prile quick info --> | ||
| 112 | + | ||
| 113 | + <br/> | ||
| 114 | + | ||
| 115 | + <!-- sidebar menu --> | ||
| 116 | + <div id="sidebar-menu" class="main_menu_side hidden-print main_menu"> | ||
| 117 | + | ||
| 118 | + <div class="menu_section"> | ||
| 119 | + <h3><?= \Yii::t('app', 'Main') ?></h3> | ||
| 120 | + <?php | ||
| 121 | + echo Menu::widget( | ||
| 122 | + [ | ||
| 123 | + "items" => require( 'menu_main.php' ), | ||
| 124 | + ] | ||
| 125 | + ); ?> | ||
| 126 | + </div> | ||
| 127 | + <div class="menu_section"> | ||
| 128 | + <h3><?= \Yii::t('app', 'Shop') ?></h3> | ||
| 129 | + <?php | ||
| 130 | + echo Menu::widget( | ||
| 131 | + [ | ||
| 132 | + "items" => require( 'menu_shop.php' ), | ||
| 133 | + ] | ||
| 134 | + ); ?> | ||
| 135 | + </div> | ||
| 136 | + <div class="menu_section"> | ||
| 137 | + <h3><?= \Yii::t('app', 'Blog') ?></h3> | ||
| 138 | + <?php | ||
| 139 | + echo Menu::widget( | ||
| 140 | + [ | ||
| 141 | + "items" => require( 'menu_blog.php' ), | ||
| 142 | + ] | ||
| 143 | + ); ?> | ||
| 144 | + </div> | ||
| 145 | + | ||
| 234 | </div> | 146 | </div> |
| 147 | + <!-- /sidebar menu --> | ||
| 148 | + | ||
| 149 | + </div> | ||
| 150 | + </div> | ||
| 151 | + | ||
| 152 | + <!-- top navigation --> | ||
| 153 | + <div class="top_nav"> | ||
| 154 | + | ||
| 155 | + <div class="nav_menu"> | ||
| 156 | + <nav class="" role="navigation"> | ||
| 157 | + <div class="nav toggle"> | ||
| 158 | + <a id="menu_toggle"><i class="fa fa-bars"></i></a> | ||
| 159 | + </div> | ||
| 160 | + | ||
| 161 | + <ul class="nav navbar-nav navbar-right"> | ||
| 162 | + <li class=""> | ||
| 163 | + <a href="" class="user-profile dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> | ||
| 164 | + <?php | ||
| 165 | + echo Html::img( | ||
| 166 | + ( empty($avatar) ? 'http://placehold.it/128x128' : $avatar ) | ||
| 167 | + ); | ||
| 168 | + echo $user->username; | ||
| 169 | + ?> | ||
| 170 | + <span class=" fa fa-angle-down"></span> | ||
| 171 | + </a> | ||
| 172 | + <ul class="dropdown-menu dropdown-usermenu pull-right"> | ||
| 173 | + <li> | ||
| 174 | + <?= Html::a( | ||
| 175 | + Html::tag( | ||
| 176 | + 'i', | ||
| 177 | + '', | ||
| 178 | + [ 'class' => 'fa fa-user pull-right' ] | ||
| 179 | + ) . ' Профиль', | ||
| 180 | + [ '/profile' ] | ||
| 181 | + ) ?> | ||
| 182 | + </li> | ||
| 183 | + <li> | ||
| 184 | + <?= Html::a( | ||
| 185 | + Html::tag( | ||
| 186 | + 'i', | ||
| 187 | + '', | ||
| 188 | + [ 'class' => 'fa fa-cogs pull-right' ] | ||
| 189 | + ) . ' Настройки', | ||
| 190 | + [ '/settings' ] | ||
| 191 | + ) ?> | ||
| 192 | + </li> | ||
| 193 | + <li> | ||
| 194 | + <?= Html::a( | ||
| 195 | + Html::tag( | ||
| 196 | + 'i', | ||
| 197 | + '', | ||
| 198 | + [ 'class' => 'fa fa-sign-out pull-right' ] | ||
| 199 | + ) . ' Выйти', | ||
| 200 | + [ '/site/logout' ], | ||
| 201 | + [ | ||
| 202 | + 'data-method' => 'POST', | ||
| 203 | + ] | ||
| 204 | + ) ?> | ||
| 205 | + </li> | ||
| 206 | + </ul> | ||
| 207 | + </li> | ||
| 208 | + <li role="presentation"> | ||
| 209 | + <?= FeedbackWidget::widget(); ?> | ||
| 210 | + </li> | ||
| 211 | + </ul> | ||
| 212 | + </nav> | ||
| 213 | + </div> | ||
| 235 | 214 | ||
| 236 | </div> | 215 | </div> |
| 216 | + <!-- /top navigation --> | ||
| 237 | 217 | ||
| 238 | - <?php | ||
| 239 | - echo FlashWidget::widget(); | ||
| 240 | - ?> | 218 | + <!-- page content --> |
| 219 | + <div class="right_col" role="main"> | ||
| 220 | + <?php if (isset($this->params[ 'h1' ])): ?> | ||
| 221 | + <div class="page-title"> | ||
| 222 | + <div class="title_left"> | ||
| 223 | + <h1><?= $this->params[ 'h1' ] ?></h1> | ||
| 224 | + </div> | ||
| 225 | + <div class="title_right"> | ||
| 226 | + <div class="col-md-5 col-sm-5 col-xs-12 form-group pull-right top_search"> | ||
| 227 | + <div class="input-group"> | ||
| 228 | + <input type="text" class="form-control" placeholder="Поиск..."> | ||
| 229 | + <span class="input-group-btn"> | ||
| 230 | + <button class="btn btn-default" type="button">Найти</button> | ||
| 231 | + </span> | ||
| 232 | + </div> | ||
| 233 | + </div> | ||
| 234 | + </div> | ||
| 235 | + </div> | ||
| 236 | + <?php endif; ?> | ||
| 237 | + <div class="clearfix"></div> | ||
| 238 | + | ||
| 239 | + <?= Breadcrumbs::widget( | ||
| 240 | + [ | ||
| 241 | + 'links' => isset($this->params[ 'breadcrumbs' ]) ? $this->params[ 'breadcrumbs' ] : [], | ||
| 242 | + ] | ||
| 243 | + ) ?> | ||
| 244 | + | ||
| 245 | + <?= $content ?> | ||
| 246 | + </div> | ||
| 247 | + <!-- /page content --> | ||
| 248 | + <!-- footer content --> | ||
| 249 | + <footer> | ||
| 250 | + | ||
| 251 | + </footer> | ||
| 241 | <!-- /footer content --> | 252 | <!-- /footer content --> |
| 242 | - <?php $this->endBody(); ?> | ||
| 243 | - </body> | 253 | + </div> |
| 254 | + | ||
| 255 | + </div> | ||
| 256 | + | ||
| 257 | + <?php | ||
| 258 | + echo FlashWidget::widget(); | ||
| 259 | + ?> | ||
| 260 | + <!-- /footer content --> | ||
| 261 | + <?php $this->endBody(); ?> | ||
| 262 | + </body> | ||
| 244 | </html> | 263 | </html> |
| 245 | <?php $this->endPage(); ?> | 264 | <?php $this->endPage(); ?> |
| 1 | +<?php | ||
| 2 | + | ||
| 3 | + return [ | ||
| 4 | + [ | ||
| 5 | + 'label' => \Yii::t('app', 'Blog'), | ||
| 6 | + 'url' => '#', | ||
| 7 | + 'icon' => 'pencil-square', | ||
| 8 | + 'items' => [ | ||
| 9 | + [ | ||
| 10 | + 'label' => \Yii::t('catalog', 'Articles'), | ||
| 11 | + 'url' => [ 'blog-article/index' ], | ||
| 12 | + 'icon' => 'file-text', | ||
| 13 | + ], | ||
| 14 | + [ | ||
| 15 | + 'label' => \Yii::t('catalog', 'Categories'), | ||
| 16 | + 'url' => [ 'blog-category/index' ], | ||
| 17 | + 'icon' => 'book', | ||
| 18 | + ], | ||
| 19 | + [ | ||
| 20 | + 'label' => \Yii::t('catalog', 'Tags'), | ||
| 21 | + 'url' => [ 'blog-tag/index' ], | ||
| 22 | + 'icon' => 'tag', | ||
| 23 | + ], | ||
| 24 | + ], | ||
| 25 | + ], | ||
| 26 | + [ | ||
| 27 | + 'label' => \Yii::t('catalog', 'Comments'), | ||
| 28 | + 'url' => [ 'comment/index' ], | ||
| 29 | + 'icon' => 'comment-o', | ||
| 30 | + 'active' => function () { | ||
| 31 | + return \Yii::$app->controller->id === 'comment'; | ||
| 32 | + }, | ||
| 33 | + ], | ||
| 34 | + ]; | ||
| 0 | \ No newline at end of file | 35 | \ No newline at end of file |
| 1 | +<?php | ||
| 2 | + use yii\web\UrlManager; | ||
| 3 | + | ||
| 4 | + $homeLink = []; | ||
| 5 | + /** | ||
| 6 | + * @var UrlManager $urlManagerFrontend | ||
| 7 | + */ | ||
| 8 | + if ($urlManagerFrontend = \Yii::$app->get('urlManagerFrontend', false)) { | ||
| 9 | + $homeLink = [ | ||
| 10 | + [ | ||
| 11 | + 'label' => \Yii::t('core', 'My website'), | ||
| 12 | + 'url' => $urlManagerFrontend->createUrl([ 'site/index' ]), | ||
| 13 | + 'icon' => 'home', | ||
| 14 | + 'template' => '<a href="{url}" target="_blank">{icon}<span>{label}</span>{badge}</a>', | ||
| 15 | + 'options' => [ | ||
| 16 | + 'class' => 'homepage_link', | ||
| 17 | + ], | ||
| 18 | + ], | ||
| 19 | + ]; | ||
| 20 | + } | ||
| 21 | + return array_merge( | ||
| 22 | + $homeLink, | ||
| 23 | + [ | ||
| 24 | + [ | ||
| 25 | + 'label' => \Yii::t('core', 'Main'), | ||
| 26 | + 'url' => [ '/site/index' ], | ||
| 27 | + 'icon' => ( \Yii::$app->controller->id === 'site' ) ? 'check' : 'undo', | ||
| 28 | + 'active' => function () { | ||
| 29 | + return \Yii::$app->controller->id === 'site'; | ||
| 30 | + }, | ||
| 31 | + ], | ||
| 32 | + [ | ||
| 33 | + 'label' => \Yii::t('core', 'Static pages'), | ||
| 34 | + 'url' => [ 'page/index' ], | ||
| 35 | + 'icon' => 'file-text', | ||
| 36 | + 'active' => function () { | ||
| 37 | + return \Yii::$app->controller->id === 'page'; | ||
| 38 | + }, | ||
| 39 | + ], | ||
| 40 | + [ | ||
| 41 | + 'label' => \Yii::t('core', 'SEO'), | ||
| 42 | + 'url' => '#', | ||
| 43 | + 'icon' => 'bolt', | ||
| 44 | + 'items' => [ | ||
| 45 | + [ | ||
| 46 | + 'label' => \Yii::t('core', 'Seo pages'), | ||
| 47 | + 'url' => [ 'alias/index' ], | ||
| 48 | + 'icon' => 'file-text', | ||
| 49 | + ], | ||
| 50 | + [ | ||
| 51 | + 'label' => \Yii::t('core', 'Robots'), | ||
| 52 | + 'url' => [ 'settings/robots' ], | ||
| 53 | + 'icon' => 'android', | ||
| 54 | + ], | ||
| 55 | + [ | ||
| 56 | + 'label' => \Yii::t('core', 'Codes'), | ||
| 57 | + 'url' => [ 'settings/codes' ], | ||
| 58 | + 'icon' => 'code', | ||
| 59 | + ], | ||
| 60 | + [ | ||
| 61 | + 'label' => \Yii::t('core', 'Sitemap'), | ||
| 62 | + 'url' => [ '/sitemap/index' ], | ||
| 63 | + 'icon' => 'map-signs', | ||
| 64 | + ], | ||
| 65 | + ], | ||
| 66 | + ], | ||
| 67 | + ] | ||
| 68 | + ); | ||
| 0 | \ No newline at end of file | 69 | \ No newline at end of file |
backend/views/layouts/menu_items.php renamed to backend/views/layouts/menu_shop.php
100755 → 100644
| 1 | <?php | 1 | <?php |
| 2 | - use yii\web\UrlManager; | ||
| 3 | 2 | ||
| 4 | - $homeLink = []; | ||
| 5 | - /** | ||
| 6 | - * @var UrlManager $urlManagerFrontend | ||
| 7 | - */ | ||
| 8 | - if ($urlManagerFrontend = \Yii::$app->get('urlManagerFrontend', false)) { | ||
| 9 | - $homeLink = [ | ||
| 10 | - [ | ||
| 11 | - 'label' => \Yii::t('core', 'My website'), | ||
| 12 | - 'url' => $urlManagerFrontend->createUrl([ 'site/index' ]), | ||
| 13 | - 'icon' => 'home', | ||
| 14 | - 'template' => '<a href="{url}" target="_blank">{icon}<span>{label}</span>{badge}</a>', | ||
| 15 | - 'options' => [ | ||
| 16 | - 'class' => 'homepage_link', | ||
| 17 | - ], | ||
| 18 | - ], | ||
| 19 | - ]; | ||
| 20 | - } | ||
| 21 | - return array_merge( | ||
| 22 | - $homeLink, | 3 | + return [ |
| 4 | + | ||
| 23 | [ | 5 | [ |
| 24 | - [ | ||
| 25 | - 'label' => \Yii::t('core', 'Main'), | ||
| 26 | - 'url' => [ '/site/index' ], | ||
| 27 | - 'icon' => ( \Yii::$app->controller->id === 'site' ) ? 'check' : 'undo', | ||
| 28 | - 'active' => function () { | ||
| 29 | - return \Yii::$app->controller->id === 'site'; | ||
| 30 | - }, | ||
| 31 | - ], | ||
| 32 | - [ | ||
| 33 | - 'label' => \Yii::t('core', 'Static pages'), | ||
| 34 | - 'url' => [ 'page/index' ], | ||
| 35 | - 'icon' => 'file-text', | ||
| 36 | - 'active' => function () { | ||
| 37 | - return \Yii::$app->controller->id === 'page'; | ||
| 38 | - }, | ||
| 39 | - ], | ||
| 40 | - [ | ||
| 41 | - 'label' => \Yii::t('core', 'SEO'), | ||
| 42 | - 'url' => '#', | ||
| 43 | - 'icon' => 'bolt', | ||
| 44 | - 'items' => [ | ||
| 45 | - [ | ||
| 46 | - 'label' => \Yii::t('core', 'Seo pages'), | ||
| 47 | - 'url' => [ 'alias/index' ], | ||
| 48 | - 'icon' => 'file-text', | ||
| 49 | - ], | ||
| 50 | - [ | ||
| 51 | - 'label' => \Yii::t('core', 'Robots'), | ||
| 52 | - 'url' => [ 'settings/robots' ], | ||
| 53 | - 'icon' => 'android', | ||
| 54 | - ], | ||
| 55 | - [ | ||
| 56 | - 'label' => \Yii::t('core', 'Codes'), | ||
| 57 | - 'url' => [ 'settings/codes' ], | ||
| 58 | - 'icon' => 'code', | ||
| 59 | - ], | ||
| 60 | - [ | ||
| 61 | - 'label' => \Yii::t('core', 'Sitemap'), | ||
| 62 | - 'url' => [ '/sitemap/index' ], | ||
| 63 | - 'icon' => 'map-signs', | ||
| 64 | - ], | 6 | + 'label' => \Yii::t('app', 'Catalog'), |
| 7 | + 'url' => '#', | ||
| 8 | + 'icon' => 'tags', | ||
| 9 | + 'items' => [ | ||
| 10 | + [ | ||
| 11 | + 'label' => \Yii::t('catalog', 'Categories'), | ||
| 12 | + 'url' => [ 'category/index' ], | ||
| 13 | + 'icon' => 'file-text', | ||
| 65 | ], | 14 | ], |
| 66 | - ], | ||
| 67 | - [ | ||
| 68 | - 'label' => \Yii::t('app', 'Catalog'), | ||
| 69 | - 'url' => '#', | ||
| 70 | - 'icon' => 'tags', | ||
| 71 | - 'items' => [ | ||
| 72 | - [ | ||
| 73 | - 'label' => \Yii::t('catalog', 'Categories'), | ||
| 74 | - 'url' => [ 'category/index' ], | ||
| 75 | - 'icon' => 'file-text', | ||
| 76 | - ], | ||
| 77 | - [ | ||
| 78 | - 'label' => \Yii::t('catalog', 'Brands'), | ||
| 79 | - 'url' => [ 'brand/index' ], | ||
| 80 | - 'icon' => 'file-text', | ||
| 81 | - ], | ||
| 82 | - [ | ||
| 83 | - 'label' => \Yii::t('catalog', 'Products'), | ||
| 84 | - 'url' => [ 'product/index' ], | ||
| 85 | - 'icon' => 'gift', | ||
| 86 | - ], | ||
| 87 | - [ | ||
| 88 | - 'label' => \Yii::t('catalog', 'Import'), | ||
| 89 | - 'url' => [ 'import/index' ], | ||
| 90 | - 'icon' => 'download', | ||
| 91 | - ], | ||
| 92 | - [ | ||
| 93 | - 'label' => \Yii::t('catalog', 'Export'), | ||
| 94 | - 'url' => [ 'export/index' ], | ||
| 95 | - 'icon' => 'upload', | ||
| 96 | - ], | 15 | + [ |
| 16 | + 'label' => \Yii::t('catalog', 'Brands'), | ||
| 17 | + 'url' => [ 'brand/index' ], | ||
| 18 | + 'icon' => 'file-text', | ||
| 19 | + ], | ||
| 20 | + [ | ||
| 21 | + 'label' => \Yii::t('catalog', 'Products'), | ||
| 22 | + 'url' => [ 'product/index' ], | ||
| 23 | + 'icon' => 'gift', | ||
| 24 | + ], | ||
| 25 | + [ | ||
| 26 | + 'label' => \Yii::t('catalog', 'Import'), | ||
| 27 | + 'url' => [ 'import/index' ], | ||
| 28 | + 'icon' => 'download', | ||
| 29 | + ], | ||
| 30 | + [ | ||
| 31 | + 'label' => \Yii::t('catalog', 'Export'), | ||
| 32 | + 'url' => [ 'export/index' ], | ||
| 33 | + 'icon' => 'upload', | ||
| 97 | ], | 34 | ], |
| 98 | ], | 35 | ], |
| 99 | - [ | ||
| 100 | - 'label' => \Yii::t('app', 'Options'), | ||
| 101 | - 'url' => '#', | ||
| 102 | - 'icon' => 'filter', | ||
| 103 | - 'items' => [ | ||
| 104 | - [ | ||
| 105 | - 'label' => \Yii::t('app', 'Options for products'), | ||
| 106 | - 'url' => '#', | ||
| 107 | - 'items' => [ | ||
| 108 | - [ | ||
| 109 | - 'label' => \Yii::t('app', 'Complementary'), | ||
| 110 | - 'url' => [ 'product-option-group-complementary/index' ], | ||
| 111 | - ], | ||
| 112 | - [ | ||
| 113 | - 'label' => \Yii::t('app', 'Exclusion'), | ||
| 114 | - 'url' => [ 'product-option-group-exclusion/index' ], | ||
| 115 | - ], | 36 | + ], |
| 37 | + [ | ||
| 38 | + 'label' => \Yii::t('app', 'Options'), | ||
| 39 | + 'url' => '#', | ||
| 40 | + 'icon' => 'filter', | ||
| 41 | + 'items' => [ | ||
| 42 | + [ | ||
| 43 | + 'label' => \Yii::t('app', 'Options for products'), | ||
| 44 | + 'url' => '#', | ||
| 45 | + 'items' => [ | ||
| 46 | + [ | ||
| 47 | + 'label' => \Yii::t('app', 'Complementary'), | ||
| 48 | + 'url' => [ 'product-option-group-complementary/index' ], | ||
| 116 | ], | 49 | ], |
| 117 | - ], | ||
| 118 | - [ | ||
| 119 | - 'label' => \Yii::t('app', 'Options for variants'), | ||
| 120 | - 'url' => '#', | ||
| 121 | - 'items' => [ | ||
| 122 | - [ | ||
| 123 | - 'label' => \Yii::t('app', 'Complementary'), | ||
| 124 | - 'url' => [ 'variant-option-group-complementary/index' ], | ||
| 125 | - ], | ||
| 126 | - [ | ||
| 127 | - 'label' => \Yii::t('app', 'Exclusion'), | ||
| 128 | - 'url' => [ 'variant-option-group-exclusion/index' ], | ||
| 129 | - ], | 50 | + [ |
| 51 | + 'label' => \Yii::t('app', 'Exclusion'), | ||
| 52 | + 'url' => [ 'product-option-group-exclusion/index' ], | ||
| 130 | ], | 53 | ], |
| 131 | ], | 54 | ], |
| 132 | ], | 55 | ], |
| 133 | - ], | ||
| 134 | - [ | ||
| 135 | - 'label' => \Yii::t('app', 'Blog'), | ||
| 136 | - 'url' => '#', | ||
| 137 | - 'icon' => 'pencil-square', | ||
| 138 | - 'items' => [ | ||
| 139 | - [ | ||
| 140 | - 'label' => \Yii::t('catalog', 'Articles'), | ||
| 141 | - 'url' => [ 'blog-article/index' ], | ||
| 142 | - 'icon' => 'file-text', | ||
| 143 | - ], | ||
| 144 | - [ | ||
| 145 | - 'label' => \Yii::t('catalog', 'Categories'), | ||
| 146 | - 'url' => [ 'blog-category/index' ], | ||
| 147 | - 'icon' => 'book', | ||
| 148 | - ], | ||
| 149 | - [ | ||
| 150 | - 'label' => \Yii::t('catalog', 'Tags'), | ||
| 151 | - 'url' => [ 'blog-tag/index' ], | ||
| 152 | - 'icon' => 'tag', | 56 | + [ |
| 57 | + 'label' => \Yii::t('app', 'Options for variants'), | ||
| 58 | + 'url' => '#', | ||
| 59 | + 'items' => [ | ||
| 60 | + [ | ||
| 61 | + 'label' => \Yii::t('app', 'Complementary'), | ||
| 62 | + 'url' => [ 'variant-option-group-complementary/index' ], | ||
| 63 | + ], | ||
| 64 | + [ | ||
| 65 | + 'label' => \Yii::t('app', 'Exclusion'), | ||
| 66 | + 'url' => [ 'variant-option-group-exclusion/index' ], | ||
| 67 | + ], | ||
| 153 | ], | 68 | ], |
| 154 | ], | 69 | ], |
| 155 | ], | 70 | ], |
| 156 | - [ | ||
| 157 | - 'label' => \Yii::t('order', 'Order'), | ||
| 158 | - 'url' => '#', | ||
| 159 | - 'icon' => 'archive', | ||
| 160 | - 'items' => [ | ||
| 161 | - [ | ||
| 162 | - 'label' => \Yii::t('order', 'Orders'), | ||
| 163 | - 'url' => [ 'order/index' ], | ||
| 164 | - 'icon' => 'first-order', | ||
| 165 | - ], | ||
| 166 | - [ | ||
| 167 | - 'label' => \Yii::t('order', 'Label'), | ||
| 168 | - 'url' => [ 'label/index' ], | ||
| 169 | - 'icon' => 'tag', | ||
| 170 | - ], | ||
| 171 | - [ | ||
| 172 | - 'label' => \Yii::t('order', 'Delivery'), | ||
| 173 | - 'url' => [ 'delivery/index' ], | ||
| 174 | - 'icon' => 'truck', | ||
| 175 | - ], | ||
| 176 | - [ | ||
| 177 | - 'label' => \Yii::t('order', 'Payment'), | ||
| 178 | - 'url' => [ 'payment/index' ], | ||
| 179 | - 'icon' => 'money', | ||
| 180 | - ], | 71 | + ], |
| 72 | + [ | ||
| 73 | + 'label' => \Yii::t('order', 'Order'), | ||
| 74 | + 'url' => '#', | ||
| 75 | + 'icon' => 'archive', | ||
| 76 | + 'items' => [ | ||
| 77 | + [ | ||
| 78 | + 'label' => \Yii::t('order', 'Orders'), | ||
| 79 | + 'url' => [ 'order/index' ], | ||
| 80 | + 'icon' => 'first-order', | ||
| 81 | + ], | ||
| 82 | + [ | ||
| 83 | + 'label' => \Yii::t('order', 'Label'), | ||
| 84 | + 'url' => [ 'label/index' ], | ||
| 85 | + 'icon' => 'tag', | ||
| 86 | + ], | ||
| 87 | + [ | ||
| 88 | + 'label' => \Yii::t('order', 'Delivery'), | ||
| 89 | + 'url' => [ 'delivery/index' ], | ||
| 90 | + 'icon' => 'truck', | ||
| 91 | + ], | ||
| 92 | + [ | ||
| 93 | + 'label' => \Yii::t('order', 'Payment'), | ||
| 94 | + 'url' => [ 'payment/index' ], | ||
| 95 | + 'icon' => 'money', | ||
| 181 | ], | 96 | ], |
| 182 | ], | 97 | ], |
| 183 | - [ | ||
| 184 | - 'label' => \Yii::t('catalog', 'Comments'), | ||
| 185 | - 'url' => [ 'comment/index' ], | ||
| 186 | - 'icon' => 'comment-o', | ||
| 187 | - 'active' => function () { | ||
| 188 | - return \Yii::$app->controller->id === 'comment'; | ||
| 189 | - }, | ||
| 190 | - ], | ||
| 191 | - ] | ||
| 192 | - ); | ||
| 193 | \ No newline at end of file | 98 | \ No newline at end of file |
| 99 | + ], | ||
| 100 | + ]; | ||
| 194 | \ No newline at end of file | 101 | \ No newline at end of file |
backend/views/site/index.php
| @@ -83,8 +83,8 @@ | @@ -83,8 +83,8 @@ | ||
| 83 | 'header' => 'Диаграмма', | 83 | 'header' => 'Диаграмма', |
| 84 | ] | 84 | ] |
| 85 | ) ?> | 85 | ) ?> |
| 86 | - | ||
| 87 | - <div id="piediv" style="width: 100%;height: 400px"></div> | 86 | + |
| 87 | + <div id="piediv" style="width: 100%;height: 470px"></div> | ||
| 88 | 88 | ||
| 89 | <?php $panel::end(); ?> | 89 | <?php $panel::end(); ?> |
| 90 | </div> | 90 | </div> |
backend/web/js/analytics.js
| @@ -86,7 +86,12 @@ $( | @@ -86,7 +86,12 @@ $( | ||
| 86 | 'colors': [ | 86 | 'colors': [ |
| 87 | "#A8E3D6", | 87 | "#A8E3D6", |
| 88 | "#9ABCC3" | 88 | "#9ABCC3" |
| 89 | - ] | 89 | + ], |
| 90 | + "labelRadius": 5, | ||
| 91 | + | ||
| 92 | + "radius": "42%", | ||
| 93 | + "innerRadius": "60%", | ||
| 94 | + "labelText": "[[title]]", | ||
| 90 | } | 95 | } |
| 91 | ); | 96 | ); |
| 92 | // Replacing table stabs | 97 | // Replacing table stabs |