Commit 090dfe5bc45b196b6c4147660f593fe15e5089a5
1 parent
139312b6
image size
Showing
1 changed file
with
7 additions
and
2 deletions
Show diff stats
backend/views/layouts/main-sidebar.php
| @@ -54,14 +54,17 @@ use yii\widgets\Menu; | @@ -54,14 +54,17 @@ use yii\widgets\Menu; | ||
| 54 | [ | 54 | [ |
| 55 | 'label' => 'Слайдер/Банеры', | 55 | 'label' => 'Слайдер/Банеры', |
| 56 | 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-barcode"></i> <span>{label}</span></a>', | 56 | 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-barcode"></i> <span>{label}</span></a>', |
| 57 | + 'options' => ['class'=>\Yii::$app->user->can('banner') || \Yii::$app->user->can('slider') ? '' :'hide'], | ||
| 57 | 'items' => [ | 58 | 'items' => [ |
| 58 | [ | 59 | [ |
| 59 | 'label' => 'Слайдер', | 60 | 'label' => 'Слайдер', |
| 60 | - 'url' => ['/slider/index'] | 61 | + 'url' => ['/slider/index'], |
| 62 | + 'options' => ['class'=>\Yii::$app->user->can('slider') ? '' :'hide'], | ||
| 61 | ], | 63 | ], |
| 62 | [ | 64 | [ |
| 63 | 'label' => 'Банер', | 65 | 'label' => 'Банер', |
| 64 | - 'url' => ['/banner/index'] | 66 | + 'url' => ['/banner/index'], |
| 67 | + 'options' => ['class'=>\Yii::$app->user->can('banner') ? '' :'hide'], | ||
| 65 | ], | 68 | ], |
| 66 | ] | 69 | ] |
| 67 | ], | 70 | ], |
| @@ -69,6 +72,7 @@ use yii\widgets\Menu; | @@ -69,6 +72,7 @@ use yii\widgets\Menu; | ||
| 69 | 'label' => 'Характеристики', | 72 | 'label' => 'Характеристики', |
| 70 | 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-search"></i> <span>{label}</span></a>', | 73 | 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-search"></i> <span>{label}</span></a>', |
| 71 | 'url' => ['/rubrication/tax-group'], | 74 | 'url' => ['/rubrication/tax-group'], |
| 75 | + 'options' => ['class'=>\Yii::$app->user->can('rubrication') || \Yii::$app->user->can('relation') ? '' :'hide'], | ||
| 72 | 'items' => [ | 76 | 'items' => [ |
| 73 | [ | 77 | [ |
| 74 | 'label' => 'Характеристики', | 78 | 'label' => 'Характеристики', |
| @@ -100,6 +104,7 @@ use yii\widgets\Menu; | @@ -100,6 +104,7 @@ use yii\widgets\Menu; | ||
| 100 | [ | 104 | [ |
| 101 | 'label' => 'SEO', | 105 | 'label' => 'SEO', |
| 102 | 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-search"></i> <span>{label}</span></a>', | 106 | 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-search"></i> <span>{label}</span></a>', |
| 107 | + 'options' => ['class'=>\Yii::$app->user->can('seo') || \Yii::$app->user->can('seo-category') ? '' :'hide'], | ||
| 103 | 'items' => [ | 108 | 'items' => [ |
| 104 | [ | 109 | [ |
| 105 | 'label' => 'URL', | 110 | 'label' => 'URL', |