@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | |
27 | 27 | <?php $form = ActiveForm::begin([ |
28 | 28 | 'action' => [ |
29 | - $this->params['urlPrefix'].'index' |
|
29 | + $this->params[ 'urlPrefix' ] . 'index' |
|
30 | 30 | ], |
31 | 31 | 'method' => 'get', |
32 | 32 | ]); ?> |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | <div class="col-md-4"> |
36 | 36 | |
37 | 37 | <?php echo $form->field($model, 'read') |
38 | - ->radioList([0 => Yii::t('feedback', 'New'), 1 => Yii::t('feedback', 'Read')]) |
|
38 | + ->radioList([ 0 => Yii::t('feedback', 'New'), 1 => Yii::t('feedback', 'Read') ]) |
|
39 | 39 | ->label(Yii::t('feedback', 'Read status')); ?> |
40 | 40 | |
41 | 41 | <?php echo $form->field($model, 'name')->label(Yii::t('feedback', 'Name')) ?> |
@@ -47,8 +47,8 @@ discard block |
||
47 | 47 | <?php echo $form->field($model, 'subject')->label(Yii::t('feedback', 'Subject')) ?> |
48 | 48 | |
49 | 49 | <div class="form-group"> |
50 | - <?php echo Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary']) ?> |
|
51 | - <?php echo Html::resetButton(Yii::t('app', 'Reset'), ['class' => 'btn btn-default', 'role' => 'clear-button']) ?> |
|
50 | + <?php echo Html::submitButton(Yii::t('app', 'Search'), [ 'class' => 'btn btn-primary' ]) ?> |
|
51 | + <?php echo Html::resetButton(Yii::t('app', 'Reset'), [ 'class' => 'btn btn-default', 'role' => 'clear-button' ]) ?> |
|
52 | 52 | </div> |
53 | 53 | |
54 | 54 | </div> |
@@ -10,13 +10,13 @@ discard block |
||
10 | 10 | /* @var $this Itstructure\AdminModule\components\AdminView */ |
11 | 11 | |
12 | 12 | $this->title = Yii::t('feedback', 'Feedback'); |
13 | -$this->params['breadcrumbs'][] = $this->title; |
|
13 | +$this->params[ 'breadcrumbs' ][ ] = $this->title; |
|
14 | 14 | ?> |
15 | 15 | <div class="feedback-index"> |
16 | 16 | |
17 | - <?php echo $this->render('_search', ['model' => $searchModel]); ?> |
|
17 | + <?php echo $this->render('_search', [ 'model' => $searchModel ]); ?> |
|
18 | 18 | |
19 | - <?php echo LinkPager::widget(['pagination' => $dataProvider->getPagination()]) ?> |
|
19 | + <?php echo LinkPager::widget([ 'pagination' => $dataProvider->getPagination() ]) ?> |
|
20 | 20 | |
21 | 21 | <?php echo GridView::widget([ |
22 | 22 | 'dataProvider' => $dataProvider, |
@@ -54,12 +54,12 @@ discard block |
||
54 | 54 | ], |
55 | 55 | [ |
56 | 56 | 'attribute' => 'created_at', |
57 | - 'format' => ['date', 'dd.MM.Y HH:mm:ss'], |
|
57 | + 'format' => [ 'date', 'dd.MM.Y HH:mm:ss' ], |
|
58 | 58 | 'label' => Yii::t('app', 'Created date'), |
59 | 59 | ], |
60 | 60 | [ |
61 | 61 | 'attribute' => 'updated_at', |
62 | - 'format' => ['date', 'dd.MM.Y HH:mm:ss'], |
|
62 | + 'format' => [ 'date', 'dd.MM.Y HH:mm:ss' ], |
|
63 | 63 | 'label' => Yii::t('app', 'Updated date'), |
64 | 64 | ], |
65 | 65 | 'read' => [ |
@@ -67,8 +67,7 @@ discard block |
||
67 | 67 | 'value' => function($searchModel) { |
68 | 68 | /* @var $searchModel FeedbackSearch */ |
69 | 69 | return $searchModel->read === 1 ? |
70 | - '<i class="fa fa-check-circle text-success"> ' . Yii::t('feedback', 'Read') . '</i>' : |
|
71 | - '<i class="text-danger">' . Yii::t('feedback', 'New') . '</i>'; |
|
70 | + '<i class="fa fa-check-circle text-success"> ' . Yii::t('feedback', 'Read') . '</i>' : '<i class="text-danger">' . Yii::t('feedback', 'New') . '</i>'; |
|
72 | 71 | }, |
73 | 72 | 'format' => 'raw', |
74 | 73 | ], |
@@ -76,9 +75,9 @@ discard block |
||
76 | 75 | 'class' => 'yii\grid\ActionColumn', |
77 | 76 | 'header' => Yii::t('app', 'Actions'), |
78 | 77 | 'template' => '{view} {delete}', |
79 | - 'urlCreator'=>function($action, $model, $key, $index){ |
|
78 | + 'urlCreator'=>function($action, $model, $key, $index) { |
|
80 | 79 | return Url::to([ |
81 | - $this->params['urlPrefix'].$action, |
|
80 | + $this->params[ 'urlPrefix' ] . $action, |
|
82 | 81 | 'id' => $model->id |
83 | 82 | ]); |
84 | 83 | } |
@@ -13,13 +13,13 @@ discard block |
||
13 | 13 | /* @var $albumsDataProvider yii\data\ArrayDataProvider */ |
14 | 14 | |
15 | 15 | $this->title = $model->title; |
16 | -$this->params['breadcrumbs'][] = [ |
|
16 | +$this->params[ 'breadcrumbs' ][ ] = [ |
|
17 | 17 | 'label' => Yii::t('pages', 'Pages'), |
18 | 18 | 'url' => [ |
19 | - $this->params['urlPrefix'].'index' |
|
19 | + $this->params[ 'urlPrefix' ] . 'index' |
|
20 | 20 | ] |
21 | 21 | ]; |
22 | -$this->params['breadcrumbs'][] = $this->title; |
|
22 | +$this->params[ 'breadcrumbs' ][ ] = $this->title; |
|
23 | 23 | ?> |
24 | 24 | |
25 | 25 | <style> |
@@ -33,14 +33,14 @@ discard block |
||
33 | 33 | |
34 | 34 | <p> |
35 | 35 | <?php echo Html::a(Yii::t('app', 'Update'), [ |
36 | - $this->params['urlPrefix'].'update', |
|
36 | + $this->params[ 'urlPrefix' ] . 'update', |
|
37 | 37 | 'id' => $model->id |
38 | 38 | ], [ |
39 | 39 | 'class' => 'btn btn-primary' |
40 | 40 | ]) ?> |
41 | 41 | |
42 | 42 | <?php echo Html::a(Yii::t('app', 'Delete'), [ |
43 | - $this->params['urlPrefix'].'delete', |
|
43 | + $this->params[ 'urlPrefix' ] . 'delete', |
|
44 | 44 | 'id' => $model->id |
45 | 45 | ], [ |
46 | 46 | 'class' => 'btn btn-danger', |
@@ -79,13 +79,13 @@ discard block |
||
79 | 79 | 'label' => Yii::t('app', 'Icon'), |
80 | 80 | 'value' => function($model) { |
81 | 81 | /* @var $model Page */ |
82 | - return Html::tag('i', '', ['class' => empty($model->icon) ? 'fa fa-file fa-2x' : $model->icon]); |
|
82 | + return Html::tag('i', '', [ 'class' => empty($model->icon) ? 'fa fa-file fa-2x' : $model->icon ]); |
|
83 | 83 | }, |
84 | 84 | 'format' => 'raw', |
85 | 85 | ], |
86 | 86 | 'thumbnail' => [ |
87 | 87 | 'label' => MFUModule::t('main', 'Thumbnail'), |
88 | - 'value' => function ($model) { |
|
88 | + 'value' => function($model) { |
|
89 | 89 | /* @var $model Page */ |
90 | 90 | $thumbnailModel = $model->getThumbnailModel(); |
91 | 91 | return $thumbnailModel == null ? '' : Html::a($model->getDefaultThumbImage(), Url::to($thumbnailModel->getThumbUrl(MFUModule::THUMB_ALIAS_LARGE)), [ |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | 'label' => Yii::t('app', 'Active status'), |
99 | 99 | 'value' => function($model) { |
100 | 100 | /* @var $model Page */ |
101 | - if ($model->active == 1){ |
|
101 | + if ($model->active == 1) { |
|
102 | 102 | return '<i class="fa fa-check-circle text-success"> ' . Yii::t('app', 'Active') . '</i>'; |
103 | 103 | } else { |
104 | 104 | return '<i class="fa fa-times text-danger"> ' . Yii::t('app', 'Inactive') . '</i>'; |
@@ -108,12 +108,12 @@ discard block |
||
108 | 108 | ], |
109 | 109 | [ |
110 | 110 | 'attribute' => 'created_at', |
111 | - 'format' => ['date', 'dd.MM.Y HH:mm:ss'], |
|
111 | + 'format' => [ 'date', 'dd.MM.Y HH:mm:ss' ], |
|
112 | 112 | 'label' => Yii::t('app', 'Created date'), |
113 | 113 | ], |
114 | 114 | [ |
115 | 115 | 'attribute' => 'updated_at', |
116 | - 'format' => ['date', 'dd.MM.Y HH:mm:ss'], |
|
116 | + 'format' => [ 'date', 'dd.MM.Y HH:mm:ss' ], |
|
117 | 117 | 'label' => Yii::t('app', 'Updated date'), |
118 | 118 | ], |
119 | 119 | ], |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | return Html::a( |
133 | 133 | $item->getDefaultThumbImage(), |
134 | 134 | Url::to([ |
135 | - '/mfuploader/'.$item->getFileType($item->type).'-album/view', 'id' => $item->id |
|
135 | + '/mfuploader/' . $item->getFileType($item->type) . '-album/view', 'id' => $item->id |
|
136 | 136 | ]) |
137 | 137 | ); |
138 | 138 | }, |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | return Html::a( |
146 | 146 | Html::encode($item->title), |
147 | 147 | Url::to([ |
148 | - '/mfuploader/'.$item->getFileType($item->type).'-album/view', 'id' => $item->id |
|
148 | + '/mfuploader/' . $item->getFileType($item->type) . '-album/view', 'id' => $item->id |
|
149 | 149 | ]) |
150 | 150 | ); |
151 | 151 | }, |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | <?php $form = ActiveForm::begin([ |
14 | 14 | 'action' => [ |
15 | - $this->params['urlPrefix'].'index' |
|
15 | + $this->params[ 'urlPrefix' ] . 'index' |
|
16 | 16 | ], |
17 | 17 | 'method' => 'get', |
18 | 18 | ]); ?> |
@@ -28,8 +28,8 @@ discard block |
||
28 | 28 | <?php echo $form->field($model, 'updated_at') ?> |
29 | 29 | |
30 | 30 | <div class="form-group"> |
31 | - <?php echo Html::submitButton('Search', ['class' => 'btn btn-primary']) ?> |
|
32 | - <?php echo Html::resetButton('Reset', ['class' => 'btn btn-default']) ?> |
|
31 | + <?php echo Html::submitButton('Search', [ 'class' => 'btn btn-primary' ]) ?> |
|
32 | + <?php echo Html::resetButton('Reset', [ 'class' => 'btn btn-default' ]) ?> |
|
33 | 33 | </div> |
34 | 34 | |
35 | 35 | <?php ActiveForm::end(); ?> |
@@ -9,21 +9,21 @@ discard block |
||
9 | 9 | <div class="row"> |
10 | 10 | <div class="col-md-1"> |
11 | 11 | <?php echo Html::a( |
12 | - Html::tag('i', '', ['class' => empty($data->icon) ? 'fa fa-file fa-2x' : $data->icon]), |
|
13 | - Url::to([$urlPrefix.'view', 'id' => $data->id]) |
|
12 | + Html::tag('i', '', [ 'class' => empty($data->icon) ? 'fa fa-file fa-2x' : $data->icon ]), |
|
13 | + Url::to([ $urlPrefix . 'view', 'id' => $data->id ]) |
|
14 | 14 | ) ?> |
15 | 15 | </div> |
16 | 16 | <div class="col-md-4"> |
17 | 17 | <?php echo Html::a( |
18 | 18 | Html::encode($data->title), |
19 | - Url::to([$urlPrefix.'view', 'id' => $data->id]) |
|
19 | + Url::to([ $urlPrefix . 'view', 'id' => $data->id ]) |
|
20 | 20 | ) ?> |
21 | 21 | </div> |
22 | 22 | <div class="col-md-2"> |
23 | - <?php echo Yii::t('app', 'Created date').' '.BaseHelper::getDateAt($data->created_at) ?> |
|
23 | + <?php echo Yii::t('app', 'Created date') . ' ' . BaseHelper::getDateAt($data->created_at) ?> |
|
24 | 24 | </div> |
25 | 25 | <div class="col-md-2"> |
26 | - <?php echo Yii::t('app', 'Updated date').' '.BaseHelper::getDateAt($data->updated_at) ?> |
|
26 | + <?php echo Yii::t('app', 'Updated date') . ' ' . BaseHelper::getDateAt($data->updated_at) ?> |
|
27 | 27 | </div> |
28 | 28 | <div class="col-md-2"> |
29 | 29 | <?php if ($data->active == 1): ?> |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | Html::tag('span', '', [ |
38 | 38 | 'class' => 'glyphicon glyphicon-eye-open', |
39 | 39 | ]), |
40 | - Url::to([$urlPrefix.'view', 'id' => $data->id]), |
|
40 | + Url::to([ $urlPrefix . 'view', 'id' => $data->id ]), |
|
41 | 41 | [ |
42 | 42 | 'title' => 'View', |
43 | 43 | 'aria-label' => 'View', |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | Html::tag('span', '', [ |
49 | 49 | 'class' => 'glyphicon glyphicon-pencil', |
50 | 50 | ]), |
51 | - Url::to([$urlPrefix.'update', 'id' => $data->id]), |
|
51 | + Url::to([ $urlPrefix . 'update', 'id' => $data->id ]), |
|
52 | 52 | [ |
53 | 53 | 'title' => 'Update', |
54 | 54 | 'aria-label' => 'Update', |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | Html::tag('span', '', [ |
60 | 60 | 'class' => 'glyphicon glyphicon-trash', |
61 | 61 | ]), |
62 | - Url::to([$urlPrefix.'delete', 'id' => $data->id]), |
|
62 | + Url::to([ $urlPrefix . 'delete', 'id' => $data->id ]), |
|
63 | 63 | [ |
64 | 64 | 'title' => 'Delete', |
65 | 65 | 'aria-label' => 'Delete', |
@@ -28,8 +28,11 @@ |
||
28 | 28 | <div class="col-md-2"> |
29 | 29 | <?php if ($data->active == 1): ?> |
30 | 30 | <i class="fa fa-check-circle text-success"> <?php echo Yii::t('app', 'Active'); ?></i> |
31 | - <?php else: ?> |
|
32 | - <i class="fa fa-times text-danger"> <?php echo Yii::t('app', 'Inactive'); ?></i> |
|
31 | + <?php else { |
|
32 | + : ?> |
|
33 | + <i class="fa fa-times text-danger"> <?php echo Yii::t('app', 'Inactive'); |
|
34 | +} |
|
35 | +?></i> |
|
33 | 36 | <?php endif; ?> |
34 | 37 | </div> |
35 | 38 | <div class="col-md-1"> |
@@ -14,4 +14,4 @@ |
||
14 | 14 | 'uncheck' => false, |
15 | 15 | 'onMouseDown' => 'this.isChecked=this.checked;', |
16 | 16 | 'onClick' => 'this.checked=!this.isChecked;', |
17 | -]); ?> |
|
17 | +]); ?> |
@@ -5,21 +5,21 @@ |
||
5 | 5 | /* @var $pages array|\yii\db\ActiveRecord[] */ |
6 | 6 | /* @var $albums Itstructure\MFUploader\models\album\Album[] */ |
7 | 7 | |
8 | -$this->title = Yii::t('pages', 'Update page').': ' . $model->title; |
|
9 | -$this->params['breadcrumbs'][] = [ |
|
8 | +$this->title = Yii::t('pages', 'Update page') . ': ' . $model->title; |
|
9 | +$this->params[ 'breadcrumbs' ][ ] = [ |
|
10 | 10 | 'label' => Yii::t('pages', 'Pages'), |
11 | 11 | 'url' => [ |
12 | - $this->params['urlPrefix'].'index' |
|
12 | + $this->params[ 'urlPrefix' ] . 'index' |
|
13 | 13 | ] |
14 | 14 | ]; |
15 | -$this->params['breadcrumbs'][] = [ |
|
15 | +$this->params[ 'breadcrumbs' ][ ] = [ |
|
16 | 16 | 'label' => $model->title, |
17 | 17 | 'url' => [ |
18 | - $this->params['urlPrefix'].'view', |
|
18 | + $this->params[ 'urlPrefix' ] . 'view', |
|
19 | 19 | 'id' => $model->id |
20 | 20 | ] |
21 | 21 | ]; |
22 | -$this->params['breadcrumbs'][] = Yii::t('app', 'Update'); |
|
22 | +$this->params[ 'breadcrumbs' ][ ] = Yii::t('app', 'Update'); |
|
23 | 23 | ?> |
24 | 24 | <div class="page-update"> |
25 | 25 |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | 'filebrowserWindowHeight' => '700', |
51 | 51 | 'extraPlugins' => 'pbckcode', |
52 | 52 | 'toolbarGroups' => [ |
53 | - ['name' => 'pbckcode'] |
|
53 | + [ 'name' => 'pbckcode' ] |
|
54 | 54 | ], |
55 | 55 | 'allowedContent' => true, |
56 | 56 | 'language' => Yii::$app->language, |
@@ -77,8 +77,8 @@ discard block |
||
77 | 77 | ])->label(Yii::t('app', 'Icon html class')); ?> |
78 | 78 | <div class="row" style="margin-bottom: 15px;"> |
79 | 79 | <div class="col-md-4"> |
80 | - <?php if(!$model->isNewRecord): ?> |
|
81 | - <?php echo Html::tag('i', '', ['class' => empty($model->icon) ? 'fa fa-file fa-2x' : $model->icon]) ?> |
|
80 | + <?php if (!$model->isNewRecord): ?> |
|
81 | + <?php echo Html::tag('i', '', [ 'class' => empty($model->icon) ? 'fa fa-file fa-2x' : $model->icon ]) ?> |
|
82 | 82 | <?php endif; ?> |
83 | 83 | <?php echo Html::a('Fontawesome icons', Url::to('https://fontawesome.ru/all-icons/'), [ |
84 | 84 | 'target' => '_blank' |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | <!-- Thumbnail end --> |
99 | 99 | |
100 | 100 | <?php echo $form->field($model, 'active') |
101 | - ->radioList([1 => Yii::t('app', 'Active'), 0 => Yii::t('app', 'Inactive')]) |
|
101 | + ->radioList([ 1 => Yii::t('app', 'Active'), 0 => Yii::t('app', 'Inactive') ]) |
|
102 | 102 | ->label(Yii::t('app', 'Active status')); ?> |
103 | 103 | |
104 | 104 | <?php echo Html::label(Yii::t('app', 'Parent object'), 'multi-level-menu', [ |
@@ -113,8 +113,8 @@ discard block |
||
113 | 113 | ], |
114 | 114 | 'mainContainerOptions' => [ |
115 | 115 | 'levels' => [ |
116 | - ['style' => 'margin-left: 0; padding-left: 0;'], |
|
117 | - ['style' => 'margin-left: 10px; padding-left: 10px;'], |
|
116 | + [ 'style' => 'margin-left: 0; padding-left: 0;' ], |
|
117 | + [ 'style' => 'margin-left: 10px; padding-left: 10px;' ], |
|
118 | 118 | ] |
119 | 119 | ], |
120 | 120 | 'itemContainerOptions' => [ |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | /* @var $dataProvider yii\data\ActiveDataProvider */ |
8 | 8 | |
9 | 9 | $this->title = Yii::t('pages', 'Pages'); |
10 | -$this->params['breadcrumbs'][] = $this->title; |
|
10 | +$this->params[ 'breadcrumbs' ][ ] = $this->title; |
|
11 | 11 | ?> |
12 | 12 | <div class="page-index"> |
13 | 13 | |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | <p> |
17 | 17 | <?php echo Html::a(Yii::t('pages', 'Create page'), [ |
18 | - $this->params['urlPrefix'].'create' |
|
18 | + $this->params[ 'urlPrefix' ] . 'create' |
|
19 | 19 | ], [ |
20 | 20 | 'class' => 'btn btn-success' |
21 | 21 | ]) ?> |
@@ -25,19 +25,19 @@ discard block |
||
25 | 25 | 'data' => $dataProvider->getModels(), |
26 | 26 | 'itemTemplate' => '@app/views/admin/pages/MultiLevelMenu/index.php', |
27 | 27 | 'itemTemplateParams' => [ |
28 | - 'urlPrefix' => $this->params['urlPrefix'] |
|
28 | + 'urlPrefix' => $this->params[ 'urlPrefix' ] |
|
29 | 29 | ], |
30 | 30 | 'mainContainerOptions' => [ |
31 | 31 | 'levels' => [ |
32 | - ['class' => 'list-group'], |
|
33 | - ['class' => ''] |
|
32 | + [ 'class' => 'list-group' ], |
|
33 | + [ 'class' => '' ] |
|
34 | 34 | ] |
35 | 35 | ], |
36 | 36 | 'itemContainerOptions' => [ |
37 | 37 | 'levels' => [ |
38 | - ['class' => 'list-group-item'], |
|
39 | - ['class' => 'list-group-item list-group-item-success'], |
|
40 | - ['class' => 'list-group-item list-group-item-warning'], |
|
38 | + [ 'class' => 'list-group-item' ], |
|
39 | + [ 'class' => 'list-group-item list-group-item-success' ], |
|
40 | + [ 'class' => 'list-group-item list-group-item-warning' ], |
|
41 | 41 | ] |
42 | 42 | ], |
43 | 43 | ]) ?> |