@@ -27,12 +27,18 @@ |
||
27 | 27 | <?= $form->buttonsStandart($component); ?> |
28 | 28 | <?php \skeeks\cms\modules\admin\widgets\form\ActiveFormUseTab::end(); ?> |
29 | 29 | |
30 | -<?php else: ?> |
|
30 | +<?php else { |
|
31 | + : ?> |
|
31 | 32 | <?php if ($component->existsConfigFormFile()) : ?> |
32 | - <?= $component->renderConfigForm(); ?> |
|
33 | - <?php else: ?> |
|
33 | + <?= $component->renderConfigForm(); |
|
34 | +} |
|
35 | +?> |
|
36 | + <?php else { |
|
37 | + : ?> |
|
34 | 38 | <p>Настройки отсутствуют</p> |
35 | - <?php endif; ?> |
|
39 | + <?php endif; |
|
40 | +} |
|
41 | +?> |
|
36 | 42 | <?php endif; ?> |
37 | 43 | |
38 | 44 | <?php $this->registerJs(<<<JS |
@@ -10,7 +10,8 @@ discard block |
||
10 | 10 | |
11 | 11 | <?php if ($form_id = \Yii::$app->request->get('property_id')) : ?> |
12 | 12 | <?= $form->field($model, 'property_id')->hiddenInput(['value' => $form_id])->label(false); ?> |
13 | -<?php else: ?> |
|
13 | +<?php else { |
|
14 | + : ?> |
|
14 | 15 | <?= $form->field($model, 'property_id')->widget( |
15 | 16 | \skeeks\widget\chosen\Chosen::className(), [ |
16 | 17 | 'items' => \yii\helpers\ArrayHelper::map( |
@@ -19,6 +20,7 @@ discard block |
||
19 | 20 | "name" |
20 | 21 | ), |
21 | 22 | ]); |
23 | +} |
|
22 | 24 | ?> |
23 | 25 | <?php endif; ?> |
24 | 26 |
@@ -44,7 +44,7 @@ |
||
44 | 44 | [ |
45 | 45 | 'label' => \Yii::t('skeeks/cms', 'Property'), |
46 | 46 | 'attribute' => 'p.name', |
47 | - 'value' => function (\skeeks\cms\models\CmsContentPropertyEnum $cmsContentPropertyEnum) { |
|
47 | + 'value' => function(\skeeks\cms\models\CmsContentPropertyEnum $cmsContentPropertyEnum) { |
|
48 | 48 | return $cmsContentPropertyEnum->property->name; |
49 | 49 | } |
50 | 50 | ], |
@@ -91,7 +91,8 @@ discard block |
||
91 | 91 | |
92 | 92 | <?php /*= $form->field($model, 'tree_type_id')->hiddenInput(['value' => $content_id])->label(false); */ ?> |
93 | 93 | |
94 | -<?php else: ?> |
|
94 | +<?php else { |
|
95 | + : ?> |
|
95 | 96 | |
96 | 97 | <?= $form->field($model, 'cmsTreeTypes')->widget( |
97 | 98 | \skeeks\widget\chosen\Chosen::class, |
@@ -101,7 +102,9 @@ discard block |
||
101 | 102 | \skeeks\cms\models\CmsTreeType::find()->all(), 'id', 'name' |
102 | 103 | ) |
103 | 104 | ] |
104 | - ); ?> |
|
105 | + ); |
|
106 | +} |
|
107 | +?> |
|
105 | 108 | |
106 | 109 | <?php endif; ?> |
107 | 110 | <?= $form->fieldSetEnd(); ?> |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | 'priority', |
31 | 31 | [ |
32 | 32 | 'label' => \Yii::t('skeeks/cms', 'Sections'), |
33 | - 'value' => function (\skeeks\cms\models\CmsTreeTypeProperty $cmsContentProperty) { |
|
33 | + 'value' => function(\skeeks\cms\models\CmsTreeTypeProperty $cmsContentProperty) { |
|
34 | 34 | $contents = \yii\helpers\ArrayHelper::map($cmsContentProperty->cmsTreeTypes, 'id', 'name'); |
35 | 35 | return implode(', ', $contents); |
36 | 36 | } |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | [ |
39 | 39 | 'label' => \Yii::t('skeeks/cms', 'Number of partitions where the property is filled'), |
40 | 40 | 'format' => 'raw', |
41 | - 'value' => function (\skeeks\cms\models\CmsTreeTypeProperty $cmsContentProperty) { |
|
41 | + 'value' => function(\skeeks\cms\models\CmsTreeTypeProperty $cmsContentProperty) { |
|
42 | 42 | return \yii\helpers\Html::a($cmsContentProperty->getElementProperties()->andWhere([ |
43 | 43 | '!=', |
44 | 44 | 'value', |
@@ -85,9 +85,12 @@ |
||
85 | 85 | <?php endforeach; ?> |
86 | 86 | <?php endif; ?> |
87 | 87 | |
88 | -<?php else : ?> |
|
88 | +<?php else { |
|
89 | + : ?> |
|
89 | 90 | <?php /*= \Yii::t('skeeks/cms','Additional properties are not set')*/ ?> |
90 | -<?php endif; ?> |
|
91 | +<?php endif; |
|
92 | +} |
|
93 | +?> |
|
91 | 94 | |
92 | 95 | |
93 | 96 | <?= $form->fieldSetEnd(); ?> |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | 'filterModel' => $searchModel, |
43 | 43 | 'adminController' => $controller, |
44 | 44 | 'pjax' => $pjax, |
45 | - 'chooseCallback' => function ($model) { |
|
45 | + 'chooseCallback' => function($model) { |
|
46 | 46 | return \yii\helpers\ArrayHelper::merge($model->toArray(), [ |
47 | 47 | //'url' => $model->url, |
48 | 48 | 'image' => $model->image ? $model->image->src : "", |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | 'size' => 1, |
94 | 94 | 'class' => 'form-control' |
95 | 95 | ]), |
96 | - 'value' => function (\skeeks\cms\models\User $model) { |
|
96 | + 'value' => function(\skeeks\cms\models\User $model) { |
|
97 | 97 | $result = []; |
98 | 98 | |
99 | 99 | if ($roles = \Yii::$app->authManager->getRolesByUser($model->id)) { |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | [ |
118 | 118 | 'class' => \yii\grid\DataColumn::className(), |
119 | 119 | 'label' => "Смотреть", |
120 | - 'value' => function (\skeeks\cms\models\CmsUser $model) { |
|
120 | + 'value' => function(\skeeks\cms\models\CmsUser $model) { |
|
121 | 121 | |
122 | 122 | return \yii\helpers\Html::a('<i class="glyphicon glyphicon-arrow-right"></i>', $model->getProfileUrl(), |
123 | 123 | [ |
@@ -11,8 +11,11 @@ discard block |
||
11 | 11 | |
12 | 12 | <?php if ($contentModel->root_tree_id) : ?> |
13 | 13 | <?php $rootTreeModels = \skeeks\cms\models\CmsTree::findAll($contentModel->root_tree_id); ?> |
14 | -<?php else : ?> |
|
15 | - <?php $rootTreeModels = \skeeks\cms\models\CmsTree::findRoots()->joinWith('cmsSiteRelation')->orderBy([\skeeks\cms\models\CmsSite::tableName() . ".priority" => SORT_ASC])->all(); ?> |
|
14 | +<?php else { |
|
15 | + : ?> |
|
16 | + <?php $rootTreeModels = \skeeks\cms\models\CmsTree::findRoots()->joinWith('cmsSiteRelation')->orderBy([\skeeks\cms\models\CmsSite::tableName() . ".priority" => SORT_ASC])->all(); |
|
17 | +} |
|
18 | +?> |
|
16 | 19 | <?php endif; ?> |
17 | 20 | |
18 | 21 | <?php if ($contentModel->is_allow_change_tree == \skeeks\cms\components\Cms::BOOL_Y) : ?> |
@@ -171,12 +174,18 @@ discard block |
||
171 | 174 | </div> |
172 | 175 | <?php \skeeks\cms\modules\admin\widgets\Pjax::end(); ?> |
173 | 176 | |
174 | - <?php else: ?> |
|
177 | + <?php else { |
|
178 | + : ?> |
|
175 | 179 | <?= $property->renderActiveForm($form, $model) ?> |
176 | - <?php endif; ?> |
|
180 | + <?php endif; |
|
181 | +} |
|
182 | +?> |
|
177 | 183 | <?php endforeach; ?> |
178 | 184 | |
179 | -<?php else : ?> |
|
185 | +<?php else { |
|
186 | + : ?> |
|
180 | 187 | <?php /*= \Yii::t('skeeks/cms','Additional properties are not set')*/ ?> |
181 | -<?php endif; ?> |
|
188 | +<?php endif; |
|
189 | +} |
|
190 | +?> |
|
182 | 191 | <?= $form->fieldSetEnd() ?> |
@@ -76,8 +76,11 @@ discard block |
||
76 | 76 | <?php $model->content_id = $content_id; ?> |
77 | 77 | <?= $form->field($model, 'content_id')->hiddenInput(['value' => $content_id])->label(false); ?> |
78 | 78 | <?php endif; ?> |
79 | - <?php else : ?> |
|
80 | - <?php $contentModel = $model->cmsContent; ?> |
|
79 | + <?php else { |
|
80 | + : ?> |
|
81 | + <?php $contentModel = $model->cmsContent; |
|
82 | +} |
|
83 | +?> |
|
81 | 84 | <?php endif; ?> |
82 | 85 | |
83 | 86 | <?php if ($contentModel && $contentModel->parentContent) : ?> |
@@ -162,7 +165,8 @@ discard block |
||
162 | 165 | ], |
163 | 166 | 'body' => \Yii::t('skeeks/cms', 'Management will be available after saving') |
164 | 167 | ]); ?> |
165 | - <?php else: ?> |
|
168 | + <?php else { |
|
169 | + : ?> |
|
166 | 170 | <?= \skeeks\cms\modules\admin\widgets\RelatedModelsGrid::widget([ |
167 | 171 | 'label' => $childContent->name, |
168 | 172 | 'namespace' => md5($model->className() . $childContent->id), |
@@ -183,7 +187,9 @@ discard block |
||
183 | 187 | 'gridViewOptions' => [ |
184 | 188 | 'columns' => (array)\skeeks\cms\controllers\AdminCmsContentElementController::getColumns($childContent) |
185 | 189 | ], |
186 | - ]); ?> |
|
190 | + ]); |
|
191 | +} |
|
192 | +?> |
|
187 | 193 | |
188 | 194 | <?php endif; ?> |
189 | 195 |