Commit d612f67009a4406077d0fc5fefc4ae19d327a3f2

Authored by Anastasia
1 parent b39813cd

- menu

- translations
backend/controllers/SlideController.php
@@ -142,18 +142,6 @@ @@ -142,18 +142,6 @@
142 ] 142 ]
143 ) 143 )
144 ->one(); 144 ->one();
145 - $langs = call_user_func(  
146 - [  
147 - $page,  
148 - 'getVariationModels',  
149 - ]  
150 - );  
151 - foreach ($langs as $lang) {  
152 - if ($lang->alias !== null) {  
153 - $lang->alias->delete();  
154 - }  
155 - }  
156 -  
157 return $page->delete(); 145 return $page->delete();
158 } 146 }
159 147
common/messages/ru/app.php
@@ -13,5 +13,7 @@ return [ @@ -13,5 +13,7 @@ return [
13 'Contact us!' => 'Свяжитесь с нами', 13 'Contact us!' => 'Свяжитесь с нами',
14 'Go to contact page' => 'Перейти на страницу контактов', 14 'Go to contact page' => 'Перейти на страницу контактов',
15 'Send message' => 'Отправить сообщение', 15 'Send message' => 'Отправить сообщение',
16 - 'Contact form' => "Форма для связи" 16 + 'Contact form' => "Форма для связи",
  17 + 'News' => 'Новости',
  18 + 'Media' => 'Медиа(фотогалерея)'
17 ]; 19 ];
18 \ No newline at end of file 20 \ No newline at end of file
common/messages/ua/app.php
@@ -14,5 +14,7 @@ return [ @@ -14,5 +14,7 @@ return [
14 'Go to contact page' => 'Перейти до сторінки контактів', 14 'Go to contact page' => 'Перейти до сторінки контактів',
15 'Читать далее' => 'Читати далі', 15 'Читать далее' => 'Читати далі',
16 "Send message" => 'Надіслати повідомлення', 16 "Send message" => 'Надіслати повідомлення',
17 - "Contact form" => 'Форма для зв\'язку' 17 + "Contact form" => 'Форма для зв\'язку',
  18 + 'News' => 'Новини',
  19 + 'Media' => 'Медіа(фотогалерея)'
18 ]; 20 ];
19 \ No newline at end of file 21 \ No newline at end of file
frontend/components/UrlManager.php
@@ -135,6 +135,7 @@ @@ -135,6 +135,7 @@
135 $split = explode('/', $request->pathInfo); 135 $split = explode('/', $request->pathInfo);
136 if (in_array($split[ 0 ], array_keys($this->languages->getActive()))) { 136 if (in_array($split[ 0 ], array_keys($this->languages->getActive()))) {
137 if ($this->hideDefaultLanguagePrefix && ( $split[ 0 ] == $this->languages->getDefault()->url )) { 137 if ($this->hideDefaultLanguagePrefix && ( $split[ 0 ] == $this->languages->getDefault()->url )) {
  138 +
138 unset($split[ 0 ]); 139 unset($split[ 0 ]);
139 140
140 \Yii::$app->response->redirect('/' . implode('/', $split), 301) 141 \Yii::$app->response->redirect('/' . implode('/', $split), 301)
frontend/views/layouts/main.php
@@ -283,6 +283,26 @@ _________________________________________________________ --> @@ -283,6 +283,26 @@ _________________________________________________________ -->
283 'label' => \Yii::t('app', 'Home'), 283 'label' => \Yii::t('app', 'Home'),
284 'url' => [ 'site/index' ], 284 'url' => [ 'site/index' ],
285 ]; 285 ];
  286 + $items[] = [
  287 + 'label' => \Yii::t('app', 'News'),
  288 + 'url' => [ 'blog/index' ],
  289 + ];
  290 + $items[] = [
  291 + 'label' => \Yii::t('app', 'About'),
  292 + 'url' => [ 'site/about' ],
  293 + ];
  294 + $items[] = [
  295 + 'label' => \Yii::t('app', 'Events'),
  296 + 'url' => [ 'event/index' ],
  297 + ];
  298 + $items[] = [
  299 + 'label' => \Yii::t('app', 'Media'),
  300 + 'url' => [ 'gallery/index' ],
  301 + ];
  302 + $items[] = [
  303 + 'label' => \Yii::t('app', 'Contacts'),
  304 + 'url' => [ 'site/contact' ],
  305 + ];
286 foreach ($pageCategories as $category) { 306 foreach ($pageCategories as $category) {
287 307
288 if (empty($category->pages)) { 308 if (empty($category->pages)) {
@@ -300,22 +320,10 @@ _________________________________________________________ --> @@ -300,22 +320,10 @@ _________________________________________________________ -->
300 'items' => $pages, 320 'items' => $pages,
301 ]; 321 ];
302 } 322 }
303 - $items[] = [  
304 - 'label' => \Yii::t('app', 'Contacts'),  
305 - 'url' => [ 'site/contact' ],  
306 - ];  
307 - $items[] = [  
308 - 'label' => \Yii::t('app', 'About'),  
309 - 'url' => [ 'site/about' ],  
310 - ];  
311 - $items[] = [  
312 - 'label' => \Yii::t('app', 'Blog'),  
313 - 'url' => [ 'blog/index' ],  
314 - ];  
315 - $items[] = [  
316 - 'label' => \Yii::t('app', 'Events'),  
317 - 'url' => [ 'event/index' ],  
318 - ]; 323 +
  324 +
  325 +
  326 +
319 echo Nav::widget( 327 echo Nav::widget(
320 [ 328 [
321 'items' => $items, 329 'items' => $items,