Blame view

backend/views/layouts/menu_items.php 4.32 KB
a0e8d4e0   Alexey Boroda   first commit
1
2
3
4
5
6
7
8
9
10
  <?php
      use yii\web\UrlManager;
      
      $homeLink = [];
      /**
       * @var UrlManager $urlManagerFrontend
       */
      if ($urlManagerFrontend = \Yii::$app->get('urlManagerFrontend', false)) {
          $homeLink = [
              [
809b0ee3   Eugeny Galkovskiy   Переводы 1
11
                  'label'    => \Yii::t('core', 'Мой сайт'),
a0e8d4e0   Alexey Boroda   first commit
12
13
14
15
16
17
18
19
20
21
22
23
24
                  'url'      => $urlManagerFrontend->createUrl([ 'site/index' ]),
                  'icon'     => 'home',
                  'template' => '<a href="{url}" target="_blank">{icon}<span>{label}</span>{badge}</a>',
                  'options'  => [
                      'class' => 'homepage_link',
                  ],
              ],
          ];
      }
      return array_merge(
          $homeLink,
          [
              [
809b0ee3   Eugeny Galkovskiy   Переводы 1
25
                  'label'  => \Yii::t('core', 'Главная'),
a0e8d4e0   Alexey Boroda   first commit
26
27
28
29
30
31
32
                  'url'    => [ '/site/index' ],
                  'icon'   => ( \Yii::$app->controller->id === 'site' ) ? 'check' : 'undo',
                  'active' => function () {
                      return \Yii::$app->controller->id === 'site';
                  },
              ],
              [
809b0ee3   Eugeny Galkovskiy   Переводы 1
33
                  'label' => \Yii::t('core', 'Статические страницы'),
575afef8   Alexey Boroda   -Blog half way done
34
35
                  'url'   => '#',
                  'icon'  => 'file-text',
a0e8d4e0   Alexey Boroda   first commit
36
37
                  'items' => [
                      [
809b0ee3   Eugeny Galkovskiy   Переводы 1
38
                          'label' => \Yii::t('core', 'Страницы'),
575afef8   Alexey Boroda   -Blog half way done
39
40
                          'url'   => [ '/page/index' ],
                          'icon'  => 'file-text',
a0e8d4e0   Alexey Boroda   first commit
41
42
                      ],
                      [
809b0ee3   Eugeny Galkovskiy   Переводы 1
43
                          'label' => \Yii::t('core', 'Категории'),
575afef8   Alexey Boroda   -Blog half way done
44
45
46
                          'url'   => [ '/page-category/index' ],
                          'icon'  => 'archive',
                      ],
a0e8d4e0   Alexey Boroda   first commit
47
48
49
50
51
52
53
54
                  ],
              ],
              [
                  'label' => \Yii::t('core', 'SEO'),
                  'url'   => '#',
                  'icon'  => 'leaf',
                  'items' => [
                      [
809b0ee3   Eugeny Galkovskiy   Переводы 1
55
                          'label' => \Yii::t('core', 'Seo страницы'),
a0e8d4e0   Alexey Boroda   first commit
56
57
58
59
60
61
62
63
64
                          'url'   => [ '/alias/index' ],
                          'icon'  => 'file-text',
                      ],
                      [
                          'label' => \Yii::t('core', 'Robots'),
                          'url'   => [ '/settings/robots' ],
                          'icon'  => 'android',
                      ],
                      [
809b0ee3   Eugeny Galkovskiy   Переводы 1
65
                          'label' => \Yii::t('core', 'Коды'),
a0e8d4e0   Alexey Boroda   first commit
66
67
68
69
                          'url'   => [ '/settings/codes' ],
                          'icon'  => 'code',
                      ],
                      [
809b0ee3   Eugeny Galkovskiy   Переводы 1
70
                          'label' => \Yii::t('core', 'Карта сайта'),
a0e8d4e0   Alexey Boroda   first commit
71
72
73
74
75
76
                          'url'   => [ '/sitemap/index' ],
                          'icon'  => 'map-signs',
                      ],
                  ],
              ],
              [
809b0ee3   Eugeny Galkovskiy   Переводы 1
77
                  'label' => \Yii::t('core', 'Блог'),
9ceb5beb   Alexey Boroda   -Blog started
78
79
80
81
                  'url'   => '#',
                  'icon'  => 'pencil',
                  'items' => [
                      [
809b0ee3   Eugeny Galkovskiy   Переводы 1
82
                          'label' => \Yii::t('blog', 'Статьи'),
9ceb5beb   Alexey Boroda   -Blog started
83
84
85
86
                          'url'   => [ '/blog-article/index' ],
                          'icon'  => 'file-text',
                      ],
                      [
809b0ee3   Eugeny Galkovskiy   Переводы 1
87
                          'label' => \Yii::t('blog', 'Категории'),
9ceb5beb   Alexey Boroda   -Blog started
88
89
90
91
                          'url'   => [ '/blog-category/index' ],
                          'icon'  => 'list',
                      ],
                      [
809b0ee3   Eugeny Galkovskiy   Переводы 1
92
                          'label' => \Yii::t('blog', 'Теги'),
9ceb5beb   Alexey Boroda   -Blog started
93
94
95
96
97
98
                          'url'   => [ '/blog-tag/index' ],
                          'icon'  => 'code',
                      ],
                  ],
              ],
              [
809b0ee3   Eugeny Galkovskiy   Переводы 1
99
                  'label' => \Yii::t('app', 'Персонал'),
8ccb8fe5   Alexey Boroda   -Persones ready
100
101
102
103
                  'url'   => [ 'persone/index' ],
                  'icon'  => 'users',
              ],
              [
809b0ee3   Eugeny Galkovskiy   Переводы 1
104
                  'label' => \Yii::t('core', 'Менеджер изображений'),
575afef8   Alexey Boroda   -Blog half way done
105
106
107
108
                  'url'   => [ '/imagemanager' ],
                  'icon'  => 'image',
              ],
              [
809b0ee3   Eugeny Galkovskiy   Переводы 1
109
                  'label' => \Yii::t('artbox-comment', 'Комментарии'),
575afef8   Alexey Boroda   -Blog half way done
110
111
                  'url'   => [ '/comment' ],
                  'icon'  => 'comment',
a0e8d4e0   Alexey Boroda   first commit
112
              ],
6af5dbe3   Alexey Boroda   -Admin gallery ready
113
              [
809b0ee3   Eugeny Galkovskiy   Переводы 1
114
                  'label' => \Yii::t('app', 'Галерея'),
6af5dbe3   Alexey Boroda   -Admin gallery ready
115
116
117
                  'url'   => [ 'site/gallery' ],
                  'icon'  => 'camera',
              ],
a0e8d4e0   Alexey Boroda   first commit
118
119
          ]
      );