1
1
<?php
2
2
/**
3
- * @var $this yii\web\View
3
+ * @var $this yii\web\View
4
4
* @var $content string
5
5
*/
6
6
@@ -154,7 +154,7 @@ class="img-circle"/>
154
154
'label ' => Yii::t ('backend ' , 'Users ' ),
155
155
'icon ' => '<i class="fa fa-users"></i> ' ,
156
156
'url ' => ['/user/index ' ],
157
- 'active ' => ( Yii::$ app ->controller ->id == 'user ' ) ,
157
+ 'active ' => Yii::$ app ->controller ->id === 'user ' ,
158
158
'visible ' => Yii::$ app ->user ->can ('administrator ' ),
159
159
],
160
160
[
@@ -165,26 +165,27 @@ class="img-circle"/>
165
165
'label ' => Yii::t ('backend ' , 'Static pages ' ),
166
166
'url ' => ['/content/page/index ' ],
167
167
'icon ' => '<i class="fa fa-thumb-tack"></i> ' ,
168
- 'active ' => ( Yii::$ app ->controller ->id == 'page ' ) ,
168
+ 'active ' => Yii::$ app ->controller ->id === 'page ' ,
169
169
],
170
170
[
171
171
'label ' => Yii::t ('backend ' , 'Articles ' ),
172
172
'url ' => '# ' ,
173
173
'icon ' => '<i class="fa fa-files-o"></i> ' ,
174
174
'options ' => ['class ' => 'treeview ' ],
175
- 'active ' => (Yii::$ app ->controller ->module ->id == 'article ' ),
175
+ 'active ' => 'content ' === Yii::$ app ->controller ->module ->id &&
176
+ ('article ' === Yii::$ app ->controller ->id || 'category ' === Yii::$ app ->controller ->id ),
176
177
'items ' => [
177
178
[
178
179
'label ' => Yii::t ('backend ' , 'Articles ' ),
179
180
'url ' => ['/content/article/index ' ],
180
181
'icon ' => '<i class="fa fa-file-o"></i> ' ,
181
- 'active ' => ( Yii::$ app ->controller ->id == ' default ' ) ,
182
+ 'active ' => Yii::$ app ->controller ->id === ' article ' ,
182
183
],
183
184
[
184
185
'label ' => Yii::t ('backend ' , 'Categories ' ),
185
186
'url ' => ['/content/category/index ' ],
186
187
'icon ' => '<i class="fa fa-folder-open-o"></i> ' ,
187
- 'active ' => ( Yii::$ app ->controller ->id == 'category ' ) ,
188
+ 'active ' => Yii::$ app ->controller ->id === 'category ' ,
188
189
],
189
190
],
190
191
],
@@ -193,19 +194,19 @@ class="img-circle"/>
193
194
'url ' => '# ' ,
194
195
'icon ' => '<i class="fa fa-code"></i> ' ,
195
196
'options ' => ['class ' => 'treeview ' ],
196
- 'active ' => ( Yii::$ app ->controller ->module ->id == 'widget ' ) ,
197
+ 'active ' => Yii::$ app ->controller ->module ->id === 'widget ' ,
197
198
'items ' => [
198
199
[
199
200
'label ' => Yii::t ('backend ' , 'Text Blocks ' ),
200
201
'url ' => ['/widget/text/index ' ],
201
202
'icon ' => '<i class="fa fa-circle-o"></i> ' ,
202
- 'active ' => ( Yii::$ app ->controller ->id == 'text ' ) ,
203
+ 'active ' => Yii::$ app ->controller ->id === 'text ' ,
203
204
],
204
205
[
205
206
'label ' => Yii::t ('backend ' , 'Menu ' ),
206
207
'url ' => ['/widget/menu/index ' ],
207
208
'icon ' => '<i class="fa fa-circle-o"></i> ' ,
208
- 'active ' => ( Yii::$ app ->controller ->id == 'menu ' ) ,
209
+ 'active ' => Yii::$ app ->controller ->id === 'menu ' ,
209
210
],
210
211
[
211
212
'label ' => Yii::t ('backend ' , 'Carousel ' ),
0 commit comments