Compare View
Commits (2)
-
delete bootstrap
Showing
2 changed files
Show diff stats
frontend/assets/AppAsset.php
@@ -20,8 +20,6 @@ | @@ -20,8 +20,6 @@ | ||
20 | ]; | 20 | ]; |
21 | public $depends = [ | 21 | public $depends = [ |
22 | 'yii\web\YiiAsset', | 22 | 'yii\web\YiiAsset', |
23 | - 'rmrevin\yii\fontawesome\AssetBundle', | ||
24 | - 'yii\bootstrap\BootstrapPluginAsset', | ||
25 | ]; | 23 | ]; |
26 | } | 24 | } |
27 | 25 | ||
28 | \ No newline at end of file | 26 | \ No newline at end of file |
frontend/views/layouts/main.php
@@ -15,6 +15,7 @@ | @@ -15,6 +15,7 @@ | ||
15 | use artbox\core\models\PageCategory; | 15 | use artbox\core\models\PageCategory; |
16 | use artbox\core\models\User; | 16 | use artbox\core\models\User; |
17 | use common\models\page\Category; | 17 | use common\models\page\Category; |
18 | + use common\models\page\Page; | ||
18 | use common\models\Settings; | 19 | use common\models\Settings; |
19 | use frontend\assets\AppAsset; | 20 | use frontend\assets\AppAsset; |
20 | use artbox\core\components\imagemanager\models\ImageManager; | 21 | use artbox\core\components\imagemanager\models\ImageManager; |
@@ -24,6 +25,7 @@ | @@ -24,6 +25,7 @@ | ||
24 | use yii\bootstrap\Html; | 25 | use yii\bootstrap\Html; |
25 | use yii\db\ActiveQuery; | 26 | use yii\db\ActiveQuery; |
26 | use artbox\core\helpers\Url; | 27 | use artbox\core\helpers\Url; |
28 | + use yii\db\Query; | ||
27 | use yii\web\View; | 29 | use yii\web\View; |
28 | use yii\widgets\Breadcrumbs; | 30 | use yii\widgets\Breadcrumbs; |
29 | 31 | ||
@@ -41,7 +43,7 @@ | @@ -41,7 +43,7 @@ | ||
41 | [ | 43 | [ |
42 | 'language', | 44 | 'language', |
43 | 'pages' => function (ActiveQuery $query) { | 45 | 'pages' => function (ActiveQuery $query) { |
44 | - $query->with('language.alias') | 46 | + $query->with(['language', 'alias']) |
45 | ->where(['in_menu' => true]) | 47 | ->where(['in_menu' => true]) |
46 | ->orderBy([ 'sort' => SORT_ASC ]); | 48 | ->orderBy([ 'sort' => SORT_ASC ]); |
47 | }, | 49 | }, |
@@ -50,6 +52,7 @@ | @@ -50,6 +52,7 @@ | ||
50 | ->where([ 'status' => true ]) | 52 | ->where([ 'status' => true ]) |
51 | ->orderBy([ 'sort' => SORT_ASC ]) | 53 | ->orderBy([ 'sort' => SORT_ASC ]) |
52 | ->all(); | 54 | ->all(); |
55 | + $pages = Page::find()->with(['language', 'alias'])->where(['NOT IN', 'id', (new Query())->select('page_id')->from('page_to_category')->column()])->all(); | ||
53 | $logo = null; | 56 | $logo = null; |
54 | if ($settings->logo) { | 57 | if ($settings->logo) { |
55 | $logo_img = ImageManager::findOne($settings->logo); | 58 | $logo_img = ImageManager::findOne($settings->logo); |
@@ -150,7 +153,10 @@ JS; | @@ -150,7 +153,10 @@ JS; | ||
150 | </li> | 153 | </li> |
151 | <?php }?> | 154 | <?php }?> |
152 | <li><a href="<?=Url::to(['site/register'])?>"><?=Yii::t('app', 'РЕЄСТРАЦІЯ')?></a></li> | 155 | <li><a href="<?=Url::to(['site/register'])?>"><?=Yii::t('app', 'РЕЄСТРАЦІЯ')?></a></li> |
153 | - <li><a href="<?=Url::to(['site/contacts'])?>"><?=Yii::t('app', 'КОНТАКТИ')?></a></li> | 156 | + <?php foreach ($pages as $page){?> |
157 | + <li><a href="<?=Url::to(['alias' => $page->alias])?>"><?=$page->language->title?></a></li> | ||
158 | + | ||
159 | + <?php }?> | ||
154 | </ul> | 160 | </ul> |
155 | </nav> | 161 | </nav> |
156 | </div> | 162 | </div> |
@@ -190,7 +196,10 @@ JS; | @@ -190,7 +196,10 @@ JS; | ||
190 | </li> | 196 | </li> |
191 | <?php }?> | 197 | <?php }?> |
192 | <li><a href="<?=Url::to(['site/register'])?>"><?=Yii::t('app', 'РЕЄСТРАЦІЯ')?></a></li> | 198 | <li><a href="<?=Url::to(['site/register'])?>"><?=Yii::t('app', 'РЕЄСТРАЦІЯ')?></a></li> |
193 | - <li><a href="<?=Url::to(['site/contacts'])?>"><?=Yii::t('app', 'КОНТАКТИ')?></a></li> | 199 | + <?php foreach ($pages as $page){?> |
200 | + <li><a href="<?=Url::to(['alias' => $page->alias])?>"><?=$page->language->title?></a></li> | ||
201 | + | ||
202 | + <?php }?> | ||
194 | </ul> | 203 | </ul> |
195 | </div> | 204 | </div> |
196 | </div> | 205 | </div> |