@@ -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(); ?> |
@@ -4,21 +4,21 @@ |
||
4 | 4 | /* @var $model Itstructure\AdminModule\models\MultilanguageValidateModel */ |
5 | 5 | /* @var $categories array|\yii\db\ActiveRecord[] */ |
6 | 6 | |
7 | -$this->title = Yii::t('categories', 'Update category').': ' . $model->mainModel->getDefaultTranslate('title'); |
|
8 | -$this->params['breadcrumbs'][] = [ |
|
7 | +$this->title = Yii::t('categories', 'Update category').': '.$model->mainModel->getDefaultTranslate('title'); |
|
8 | +$this->params[ 'breadcrumbs' ][ ] = [ |
|
9 | 9 | 'label' => Yii::t('categories', 'Categories'), |
10 | 10 | 'url' => [ |
11 | - $this->params['urlPrefix'].'index' |
|
11 | + $this->params[ 'urlPrefix' ].'index' |
|
12 | 12 | ] |
13 | 13 | ]; |
14 | -$this->params['breadcrumbs'][] = [ |
|
14 | +$this->params[ 'breadcrumbs' ][ ] = [ |
|
15 | 15 | 'label' => $model->mainModel->getDefaultTranslate('title'), |
16 | 16 | 'url' => [ |
17 | - $this->params['urlPrefix'].'view', |
|
17 | + $this->params[ 'urlPrefix' ].'view', |
|
18 | 18 | 'id' => $model->id |
19 | 19 | ] |
20 | 20 | ]; |
21 | -$this->params['breadcrumbs'][] = Yii::t('app', 'Update'); |
|
21 | +$this->params[ 'breadcrumbs' ][ ] = Yii::t('app', 'Update'); |
|
22 | 22 | ?> |
23 | 23 | <div class="category-update"> |
24 | 24 |
@@ -16,4 +16,4 @@ |
||
16 | 16 | //'uncheck' => false, |
17 | 17 | 'onMouseDown' => 'this.isChecked=this.checked;', |
18 | 18 | 'onClick' => 'this.checked=!this.isChecked;', |
19 | -]); ?> |
|
19 | +]); ?> |
@@ -8,14 +8,14 @@ discard block |
||
8 | 8 | <div class="row"> |
9 | 9 | <div class="col-md-1"> |
10 | 10 | <?php echo Html::a( |
11 | - Html::tag('i', '', ['class' => empty($data->icon) ? 'fa fa-file fa-2x' : $data->icon]), |
|
12 | - Url::to([$urlPrefix.'view', 'id' => $data->id]) |
|
11 | + Html::tag('i', '', [ 'class' => empty($data->icon) ? 'fa fa-file fa-2x' : $data->icon ]), |
|
12 | + Url::to([ $urlPrefix.'view', 'id' => $data->id ]) |
|
13 | 13 | ) ?> |
14 | 14 | </div> |
15 | 15 | <div class="col-md-4"> |
16 | 16 | <?php echo Html::a( |
17 | 17 | Html::encode($data->getDefaultTranslate('title')), |
18 | - Url::to([$urlPrefix.'view', 'id' => $data->id]) |
|
18 | + Url::to([ $urlPrefix.'view', 'id' => $data->id ]) |
|
19 | 19 | ) ?> |
20 | 20 | </div> |
21 | 21 | <div class="col-md-2"> |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | Html::tag('span', '', [ |
37 | 37 | 'class' => 'glyphicon glyphicon-eye-open', |
38 | 38 | ]), |
39 | - Url::to([$urlPrefix.'view', 'id' => $data->id]), |
|
39 | + Url::to([ $urlPrefix.'view', 'id' => $data->id ]), |
|
40 | 40 | [ |
41 | 41 | 'title' => 'View', |
42 | 42 | 'aria-label' => 'View', |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | Html::tag('span', '', [ |
48 | 48 | 'class' => 'glyphicon glyphicon-pencil', |
49 | 49 | ]), |
50 | - Url::to([$urlPrefix.'update', 'id' => $data->id]), |
|
50 | + Url::to([ $urlPrefix.'update', 'id' => $data->id ]), |
|
51 | 51 | [ |
52 | 52 | 'title' => 'Update', |
53 | 53 | 'aria-label' => 'Update', |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | Html::tag('span', '', [ |
59 | 59 | 'class' => 'glyphicon glyphicon-trash', |
60 | 60 | ]), |
61 | - Url::to([$urlPrefix.'delete', 'id' => $data->id]), |
|
61 | + Url::to([ $urlPrefix.'delete', 'id' => $data->id ]), |
|
62 | 62 | [ |
63 | 63 | 'title' => 'Delete', |
64 | 64 | 'aria-label' => 'Delete', |
@@ -27,8 +27,11 @@ |
||
27 | 27 | <div class="col-md-2"> |
28 | 28 | <?php if ($data->active == 1): ?> |
29 | 29 | <i class="fa fa-check-circle text-success"> <?php echo Yii::t('app', 'Active'); ?></i> |
30 | - <?php else: ?> |
|
31 | - <i class="fa fa-times text-danger"> <?php echo Yii::t('app', 'Inactive'); ?></i> |
|
30 | + <?php else { |
|
31 | + : ?> |
|
32 | + <i class="fa fa-times text-danger"> <?php echo Yii::t('app', 'Inactive'); |
|
33 | +} |
|
34 | +?></i> |
|
32 | 35 | <?php endif; ?> |
33 | 36 | </div> |
34 | 37 | <div class="col-md-1"> |
@@ -5,13 +5,13 @@ |
||
5 | 5 | /* @var $categories array|\yii\db\ActiveRecord[] */ |
6 | 6 | |
7 | 7 | $this->title = Yii::t('categories', 'Create category'); |
8 | -$this->params['breadcrumbs'][] = [ |
|
8 | +$this->params[ 'breadcrumbs' ][ ] = [ |
|
9 | 9 | 'label' => Yii::t('categories', 'Categories'), |
10 | 10 | 'url' => [ |
11 | - $this->params['urlPrefix'].'index' |
|
11 | + $this->params[ 'urlPrefix' ].'index' |
|
12 | 12 | ] |
13 | 13 | ]; |
14 | -$this->params['breadcrumbs'][] = Yii::t('app', 'Create'); |
|
14 | +$this->params[ 'breadcrumbs' ][ ] = Yii::t('app', 'Create'); |
|
15 | 15 | ?> |
16 | 16 | <div class="category-create"> |
17 | 17 |
@@ -45,8 +45,8 @@ discard block |
||
45 | 45 | ])->label(Yii::t('app', 'Icon html class')); ?> |
46 | 46 | <div class="row" style="margin-bottom: 15px;"> |
47 | 47 | <div class="col-md-12"> |
48 | - <?php if(!$model->mainModel->isNewRecord): ?> |
|
49 | - <?php echo Html::tag('i', '', ['class' => empty($model->mainModel->icon) ? 'fa fa-file fa-2x' : $model->mainModel->icon]) ?> |
|
48 | + <?php if (!$model->mainModel->isNewRecord): ?> |
|
49 | + <?php echo Html::tag('i', '', [ 'class' => empty($model->mainModel->icon) ? 'fa fa-file fa-2x' : $model->mainModel->icon ]) ?> |
|
50 | 50 | <?php endif; ?> |
51 | 51 | <?php echo Html::a('Fontawesome icons', Url::to('https://fontawesome.ru/all-icons/'), [ |
52 | 52 | 'target' => '_blank' |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | <?php |
55 | 55 | Modal::begin([ |
56 | 56 | 'header' => '<h2>Fe icons</h2>', |
57 | - 'toggleButton' => ['label' => 'Fe icons'] |
|
57 | + 'toggleButton' => [ 'label' => 'Fe icons' ] |
|
58 | 58 | ]); |
59 | 59 | require __DIR__.'/../icons/fe-icons.php'; |
60 | 60 | Modal::end(); |
@@ -88,10 +88,10 @@ discard block |
||
88 | 88 | 'filebrowserWindowHeight' => '700', |
89 | 89 | 'extraPlugins' => 'pbckcode', |
90 | 90 | 'toolbarGroups' => [ |
91 | - ['name' => 'pbckcode'] |
|
91 | + [ 'name' => 'pbckcode' ] |
|
92 | 92 | ], |
93 | 93 | 'allowedContent' => true, |
94 | - 'language' => $this->params['shortLanguage'], |
|
94 | + 'language' => $this->params[ 'shortLanguage' ], |
|
95 | 95 | ] |
96 | 96 | ], |
97 | 97 | [ |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | ])->label(Yii::t('app', 'URL Alias')); ?> |
117 | 117 | |
118 | 118 | <?php echo $form->field($model, 'active') |
119 | - ->radioList([1 => Yii::t('app', 'Active'), 0 => Yii::t('app', 'Inactive')]) |
|
119 | + ->radioList([ 1 => Yii::t('app', 'Active'), 0 => Yii::t('app', 'Inactive') ]) |
|
120 | 120 | ->label(Yii::t('app', 'Active status')); ?> |
121 | 121 | |
122 | 122 | <div class="form-group <?php if ($model->hasErrors('pageId')):?>has-error<?php endif; ?>"> |
@@ -132,8 +132,8 @@ discard block |
||
132 | 132 | ], |
133 | 133 | 'mainContainerOptions' => [ |
134 | 134 | 'levels' => [ |
135 | - ['style' => 'margin-left: 0; padding-left: 0;'], |
|
136 | - ['style' => 'margin-left: 10px; padding-left: 10px;'], |
|
135 | + [ 'style' => 'margin-left: 0; padding-left: 0;' ], |
|
136 | + [ 'style' => 'margin-left: 10px; padding-left: 10px;' ], |
|
137 | 137 | ] |
138 | 138 | ], |
139 | 139 | 'itemContainerOptions' => [ |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | <div class="panel-heading"><?php echo MFUModule::t('main', 'New files'); ?></div> |
153 | 153 | <div class="panel-body"> |
154 | 154 | <div class="row"> |
155 | - <?php for ($i=1; $i < 5; $i++): ?> |
|
155 | + <?php for ($i = 1; $i < 5; $i++): ?> |
|
156 | 156 | <div class="col-12 col-lg-6" style="margin-top: 5px; margin-bottom: 10px;"> |
157 | 157 | <?php echo $this->render('../mediafiles/_new-mediafiles', [ |
158 | 158 | 'model' => $model, |
@@ -168,14 +168,14 @@ discard block |
||
168 | 168 | <!-- New files end --> |
169 | 169 | |
170 | 170 | <!-- Existing files begin --> |
171 | - <?php if (!$model->mainModel->isNewRecord && $images['pagination']->totalCount > 0): ?> |
|
171 | + <?php if (!$model->mainModel->isNewRecord && $images[ 'pagination' ]->totalCount > 0): ?> |
|
172 | 172 | <div class="panel panel-default"> |
173 | 173 | <div class="panel-heading"><?php echo MFUModule::t('main', 'Existing files'); ?></div> |
174 | 174 | <div class="panel-body"> |
175 | 175 | <?php echo $this->render('../mediafiles/_existing-mediafiles', [ |
176 | 176 | 'model' => $model, |
177 | - 'mediafiles' => $images['items'], |
|
178 | - 'pages' => $images['pagination'], |
|
177 | + 'mediafiles' => $images[ 'items' ], |
|
178 | + 'pages' => $images[ 'pagination' ], |
|
179 | 179 | 'fileType' => UploadModelInterface::FILE_TYPE_IMAGE, |
180 | 180 | 'ownerParams' => isset($ownerParams) && is_array($ownerParams) ? $ownerParams : null, |
181 | 181 | ]) ?> |
@@ -18,17 +18,17 @@ discard block |
||
18 | 18 | /* @var $images_items Mediafile[] */ |
19 | 19 | /* @var $images_pagination Pagination */ |
20 | 20 | |
21 | -$images_items = $images['items']; |
|
22 | -$images_pagination = $images['pagination']; |
|
21 | +$images_items = $images[ 'items' ]; |
|
22 | +$images_pagination = $images[ 'pagination' ]; |
|
23 | 23 | |
24 | 24 | $this->title = $model->getDefaultTranslate('title'); |
25 | -$this->params['breadcrumbs'][] = [ |
|
25 | +$this->params[ 'breadcrumbs' ][ ] = [ |
|
26 | 26 | 'label' => Yii::t('articles', 'Articles'), |
27 | 27 | 'url' => [ |
28 | - $this->params['urlPrefix'].'index' |
|
28 | + $this->params[ 'urlPrefix' ].'index' |
|
29 | 29 | ] |
30 | 30 | ]; |
31 | -$this->params['breadcrumbs'][] = $this->title; |
|
31 | +$this->params[ 'breadcrumbs' ][ ] = $this->title; |
|
32 | 32 | ?> |
33 | 33 | |
34 | 34 | <style> |
@@ -42,14 +42,14 @@ discard block |
||
42 | 42 | |
43 | 43 | <p> |
44 | 44 | <?php echo Html::a(Yii::t('app', 'Update'), [ |
45 | - $this->params['urlPrefix'].'update', |
|
45 | + $this->params[ 'urlPrefix' ].'update', |
|
46 | 46 | 'id' => $model->id |
47 | 47 | ], [ |
48 | 48 | 'class' => 'btn btn-primary' |
49 | 49 | ]) ?> |
50 | 50 | |
51 | 51 | <?php echo Html::a(Yii::t('app', 'Delete'), [ |
52 | - $this->params['urlPrefix'].'delete', |
|
52 | + $this->params[ 'urlPrefix' ].'delete', |
|
53 | 53 | 'id' => $model->id |
54 | 54 | ], [ |
55 | 55 | 'class' => 'btn btn-danger', |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | 'id', |
95 | 95 | 'thumbnail' => [ |
96 | 96 | 'label' => MFUModule::t('main', 'Thumbnail'), |
97 | - 'value' => function ($model) { |
|
97 | + 'value' => function($model) { |
|
98 | 98 | /* @var $model Article */ |
99 | 99 | $thumbnailModel = $model->getThumbnailModel(); |
100 | 100 | return $thumbnailModel == null ? '' : Html::a($model->getDefaultThumbImage(), Url::to($thumbnailModel->getThumbUrl(MFUModule::THUMB_ALIAS_LARGE)), [ |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | 'label' => Yii::t('app', 'Icon'), |
108 | 108 | 'value' => function($model) { |
109 | 109 | /* @var $model Article */ |
110 | - return Html::tag('i', '', ['class' => empty($model->icon) ? 'fa fa-file fa-2x' : $model->icon]); |
|
110 | + return Html::tag('i', '', [ 'class' => empty($model->icon) ? 'fa fa-file fa-2x' : $model->icon ]); |
|
111 | 111 | }, |
112 | 112 | 'format' => 'raw', |
113 | 113 | ], |
@@ -119,21 +119,21 @@ discard block |
||
119 | 119 | 'label' => Yii::t('app', 'Active status'), |
120 | 120 | 'value' => function($model) { |
121 | 121 | /* @var $model Article */ |
122 | - if ($model->active == 1){ |
|
123 | - return '<i class="fa fa-check-circle text-success"> ' . Yii::t('app', 'Active') . '</i>'; |
|
122 | + if ($model->active == 1) { |
|
123 | + return '<i class="fa fa-check-circle text-success"> '.Yii::t('app', 'Active').'</i>'; |
|
124 | 124 | } else { |
125 | - return '<i class="fa fa-times text-danger"> ' . Yii::t('app', 'Inactive') . '</i>'; |
|
125 | + return '<i class="fa fa-times text-danger"> '.Yii::t('app', 'Inactive').'</i>'; |
|
126 | 126 | } |
127 | 127 | }, |
128 | 128 | 'format' => 'raw', |
129 | 129 | ], |
130 | 130 | [ |
131 | 131 | 'label' => Yii::t('articles', 'Parent page'), |
132 | - 'value' => function ($model) { |
|
132 | + 'value' => function($model) { |
|
133 | 133 | /* @var $model Article */ |
134 | 134 | return null === $model->page ? '' : Html::a( |
135 | 135 | $model->page->getDefaultTranslate('title'), |
136 | - Url::to(['/'.$this->params['shortLanguage'].'/admin/pages/view', 'id' => $model->page->id]), |
|
136 | + Url::to([ '/'.$this->params[ 'shortLanguage' ].'/admin/pages/view', 'id' => $model->page->id ]), |
|
137 | 137 | [ |
138 | 138 | 'target' => '_blank' |
139 | 139 | ] |
@@ -143,12 +143,12 @@ discard block |
||
143 | 143 | ], |
144 | 144 | [ |
145 | 145 | 'attribute' => 'created_at', |
146 | - 'format' => ['date', 'dd.MM.Y HH:mm:ss'], |
|
146 | + 'format' => [ 'date', 'dd.MM.Y HH:mm:ss' ], |
|
147 | 147 | 'label' => Yii::t('app', 'Created date'), |
148 | 148 | ], |
149 | 149 | [ |
150 | 150 | 'attribute' => 'updated_at', |
151 | - 'format' => ['date', 'dd.MM.Y HH:mm:ss'], |
|
151 | + 'format' => [ 'date', 'dd.MM.Y HH:mm:ss' ], |
|
152 | 152 | 'label' => Yii::t('app', 'Updated date'), |
153 | 153 | ], |
154 | 154 | ], |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | return Html::a( |
185 | 185 | $item->getDefaultThumbImage(), |
186 | 186 | Url::to([ |
187 | - '/'.$this->params['shortLanguage'].'/mfuploader/'.$item->getFileType($item->type).'-album/view', 'id' => $item->id |
|
187 | + '/'.$this->params[ 'shortLanguage' ].'/mfuploader/'.$item->getFileType($item->type).'-album/view', 'id' => $item->id |
|
188 | 188 | ]) |
189 | 189 | ); |
190 | 190 | }, |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | return Html::a( |
198 | 198 | Html::encode($item->title), |
199 | 199 | Url::to([ |
200 | - '/'.$this->params['shortLanguage'].'/mfuploader/'.$item->getFileType($item->type).'-album/view', 'id' => $item->id |
|
200 | + '/'.$this->params[ 'shortLanguage' ].'/mfuploader/'.$item->getFileType($item->type).'-album/view', 'id' => $item->id |
|
201 | 201 | ]) |
202 | 202 | ); |
203 | 203 | }, |
@@ -11,21 +11,21 @@ discard block |
||
11 | 11 | /* @var $this Itstructure\AdminModule\components\AdminView */ |
12 | 12 | |
13 | 13 | $this->title = Yii::t('articles', 'Articles'); |
14 | -$this->params['breadcrumbs'][] = $this->title; |
|
14 | +$this->params[ 'breadcrumbs' ][ ] = $this->title; |
|
15 | 15 | ?> |
16 | 16 | <div class="article-index"> |
17 | 17 | |
18 | - <?php echo $this->render('_search', ['model' => $searchModel]); ?> |
|
18 | + <?php echo $this->render('_search', [ 'model' => $searchModel ]); ?> |
|
19 | 19 | |
20 | 20 | <p> |
21 | 21 | <?php echo Html::a(Yii::t('articles', 'Create article'), [ |
22 | - $this->params['urlPrefix'].'create' |
|
22 | + $this->params[ 'urlPrefix' ].'create' |
|
23 | 23 | ], [ |
24 | 24 | 'class' => 'btn btn-success' |
25 | 25 | ]) ?> |
26 | 26 | </p> |
27 | 27 | |
28 | - <?php echo LinkPager::widget(['pagination' => $dataProvider->getPagination()]) ?> |
|
28 | + <?php echo LinkPager::widget([ 'pagination' => $dataProvider->getPagination() ]) ?> |
|
29 | 29 | |
30 | 30 | <?php echo GridView::widget([ |
31 | 31 | 'dataProvider' => $dataProvider, |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | /* @var $data ArticleSearch */ |
40 | 40 | $defaultThumbImage = $data->getDefaultThumbImage(); |
41 | 41 | return !empty($defaultThumbImage) ? Html::a($defaultThumbImage, Url::to([ |
42 | - $this->params['urlPrefix'].'view', |
|
42 | + $this->params[ 'urlPrefix' ].'view', |
|
43 | 43 | 'id' => $data->id |
44 | 44 | ])) : ''; |
45 | 45 | }, |
@@ -50,8 +50,8 @@ discard block |
||
50 | 50 | 'value' => function($searchModel) { |
51 | 51 | /* @var $searchModel ArticleSearch */ |
52 | 52 | return Html::a( |
53 | - Html::tag('i', '', ['class' => empty($searchModel->icon) ? 'fa fa-file fa-2x' : $searchModel->icon]), |
|
54 | - Url::to([$this->params['urlPrefix'].'view', 'id' => $searchModel->id]) |
|
53 | + Html::tag('i', '', [ 'class' => empty($searchModel->icon) ? 'fa fa-file fa-2x' : $searchModel->icon ]), |
|
54 | + Url::to([ $this->params[ 'urlPrefix' ].'view', 'id' => $searchModel->id ]) |
|
55 | 55 | ); |
56 | 56 | }, |
57 | 57 | 'format' => 'raw', |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | /* @var $searchModel ArticleSearch */ |
63 | 63 | return Html::a( |
64 | 64 | Html::encode($searchModel->getDefaultTranslate('title')), |
65 | - Url::to([$this->params['urlPrefix'].'view', 'id' => $searchModel->id]) |
|
65 | + Url::to([ $this->params[ 'urlPrefix' ].'view', 'id' => $searchModel->id ]) |
|
66 | 66 | ); |
67 | 67 | }, |
68 | 68 | 'format' => 'raw', |
@@ -77,11 +77,11 @@ discard block |
||
77 | 77 | ], |
78 | 78 | 'page' => [ |
79 | 79 | 'label' => Yii::t('articles', 'Parent page'), |
80 | - 'value' => function ($searchModel) { |
|
80 | + 'value' => function($searchModel) { |
|
81 | 81 | /* @var $searchModel app\models\ArticleSearch */ |
82 | 82 | return null === $searchModel->page ? '' : Html::a( |
83 | 83 | $searchModel->page->getDefaultTranslate('title'), |
84 | - Url::to(['/'.$this->params['shortLanguage'].'/admin/pages/view', 'id' => $searchModel->page->id]), |
|
84 | + Url::to([ '/'.$this->params[ 'shortLanguage' ].'/admin/pages/view', 'id' => $searchModel->page->id ]), |
|
85 | 85 | [ |
86 | 86 | 'target' => '_blank' |
87 | 87 | ] |
@@ -91,22 +91,22 @@ discard block |
||
91 | 91 | ], |
92 | 92 | [ |
93 | 93 | 'attribute' => 'created_at', |
94 | - 'format' => ['date', 'dd.MM.Y HH:mm:ss'], |
|
94 | + 'format' => [ 'date', 'dd.MM.Y HH:mm:ss' ], |
|
95 | 95 | 'label' => Yii::t('app', 'Created date'), |
96 | 96 | ], |
97 | 97 | [ |
98 | 98 | 'attribute' => 'updated_at', |
99 | - 'format' => ['date', 'dd.MM.Y HH:mm:ss'], |
|
99 | + 'format' => [ 'date', 'dd.MM.Y HH:mm:ss' ], |
|
100 | 100 | 'label' => Yii::t('app', 'Updated date'), |
101 | 101 | ], |
102 | 102 | 'active' => [ |
103 | 103 | 'label' => Yii::t('app', 'Active status'), |
104 | 104 | 'value' => function($searchModel) { |
105 | 105 | /* @var $searchModel app\models\Article */ |
106 | - if ($searchModel->active == 1){ |
|
107 | - return '<i class="fa fa-check-circle text-success"> ' . Yii::t('app', 'Active') . '</i>'; |
|
106 | + if ($searchModel->active == 1) { |
|
107 | + return '<i class="fa fa-check-circle text-success"> '.Yii::t('app', 'Active').'</i>'; |
|
108 | 108 | } else { |
109 | - return '<i class="fa fa-times text-danger"> ' . Yii::t('app', 'Inactive') . '</i>'; |
|
109 | + return '<i class="fa fa-times text-danger"> '.Yii::t('app', 'Inactive').'</i>'; |
|
110 | 110 | } |
111 | 111 | }, |
112 | 112 | 'format' => 'raw', |
@@ -115,9 +115,9 @@ discard block |
||
115 | 115 | 'class' => 'yii\grid\ActionColumn', |
116 | 116 | 'header' => Yii::t('app', 'Actions'), |
117 | 117 | 'template' => '{view} {update} {delete}', |
118 | - 'urlCreator'=>function($action, $model, $key, $index){ |
|
118 | + 'urlCreator'=>function($action, $model, $key, $index) { |
|
119 | 119 | return Url::to([ |
120 | - $this->params['urlPrefix'].$action, |
|
120 | + $this->params[ 'urlPrefix' ].$action, |
|
121 | 121 | 'id' => $model->id |
122 | 122 | ]); |
123 | 123 | } |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | |
29 | 29 | <?php $form = ActiveForm::begin([ |
30 | 30 | 'action' => [ |
31 | - $this->params['urlPrefix'].'index' |
|
31 | + $this->params[ 'urlPrefix' ].'index' |
|
32 | 32 | ], |
33 | 33 | 'method' => 'get', |
34 | 34 | ]); ?> |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | <div class="col-md-4"> |
38 | 38 | |
39 | 39 | <?php echo $form->field($model, 'active') |
40 | - ->radioList([1 => Yii::t('app', 'Active'), 0 => Yii::t('app', 'Inactive')]) |
|
40 | + ->radioList([ 1 => Yii::t('app', 'Active'), 0 => Yii::t('app', 'Inactive') ]) |
|
41 | 41 | ->label(Yii::t('app', 'Active status')); ?> |
42 | 42 | |
43 | 43 | <?php echo Html::label(Yii::t('articles', 'Parent page'), 'search-by-page', [ |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | ], |
53 | 53 | 'mainContainerOptions' => [ |
54 | 54 | 'levels' => [ |
55 | - ['style' => 'margin-left: 0; padding-left: 0;'], |
|
56 | - ['style' => 'margin-left: 10px; padding-left: 10px;'], |
|
55 | + [ 'style' => 'margin-left: 0; padding-left: 0;' ], |
|
56 | + [ 'style' => 'margin-left: 10px; padding-left: 10px;' ], |
|
57 | 57 | ] |
58 | 58 | ], |
59 | 59 | 'itemContainerOptions' => [ |
@@ -64,8 +64,8 @@ discard block |
||
64 | 64 | <?php echo $form->field($model, 'title')->label(Yii::t('app', 'Title')) ?> |
65 | 65 | |
66 | 66 | <div class="form-group"> |
67 | - <?php echo Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary']) ?> |
|
68 | - <?php echo Html::resetButton(Yii::t('app', 'Reset'), ['class' => 'btn btn-default', 'role' => 'clear-button']) ?> |
|
67 | + <?php echo Html::submitButton(Yii::t('app', 'Search'), [ 'class' => 'btn btn-primary' ]) ?> |
|
68 | + <?php echo Html::resetButton(Yii::t('app', 'Reset'), [ 'class' => 'btn btn-default', 'role' => 'clear-button' ]) ?> |
|
69 | 69 | </div> |
70 | 70 | |
71 | 71 | </div> |