@@ -57,9 +57,11 @@ |
||
| 57 | 57 | $names[] = $model->redirectTree->name; |
| 58 | 58 | echo implode(" / ", $names); |
| 59 | 59 | ?> |
| 60 | - <?php else : ?> |
|
| 60 | + <?php else { |
|
| 61 | + : ?> |
|
| 61 | 62 | <? |
| 62 | 63 | $names[] = $model->redirectTree->site->name; |
| 64 | +} |
|
| 63 | 65 | echo implode(" / ", $names); |
| 64 | 66 | ?> |
| 65 | 67 | <?php endif; ?> |
@@ -90,7 +90,8 @@ discard block |
||
| 90 | 90 | |
| 91 | 91 | <?php /*= $form->field($model, 'content_id')->hiddenInput(['value' => $content_id])->label(false); */ ?> |
| 92 | 92 | |
| 93 | -<?php else: ?> |
|
| 93 | +<?php else { |
|
| 94 | + : ?> |
|
| 94 | 95 | <?php /*= $form->field($model, 'content_id')->label(\Yii::t('skeeks/cms','Content'))->widget( |
| 95 | 96 | \skeeks\cms\widgets\formInputs\EditedSelect::className(), [ |
| 96 | 97 | 'items' => \yii\helpers\ArrayHelper::map( |
@@ -107,7 +108,9 @@ discard block |
||
| 107 | 108 | 'multiple' => true, |
| 108 | 109 | 'items' => \skeeks\cms\models\CmsContent::getDataForSelect() |
| 109 | 110 | ] |
| 110 | - ); ?> |
|
| 111 | + ); |
|
| 112 | +} |
|
| 113 | +?> |
|
| 111 | 114 | |
| 112 | 115 | |
| 113 | 116 | <?php endif; ?> |
@@ -126,13 +129,16 @@ discard block |
||
| 126 | 129 | ] |
| 127 | 130 | ); ?> |
| 128 | 131 | </div> |
| 129 | -<?php else : ?> |
|
| 132 | +<?php else { |
|
| 133 | + : ?> |
|
| 130 | 134 | <?= $form->field($model, 'cmsTrees')->widget( |
| 131 | 135 | \skeeks\cms\widgets\formInputs\selectTree\SelectTreeInputWidget::class, |
| 132 | 136 | [ |
| 133 | 137 | 'multiple' => true, |
| 134 | 138 | ] |
| 135 | - ); ?> |
|
| 139 | + ); |
|
| 140 | +} |
|
| 141 | +?> |
|
| 136 | 142 | <?php endif; ?> |
| 137 | 143 | |
| 138 | 144 | <?= $form->fieldSetEnd(); ?> |
@@ -30,14 +30,14 @@ discard block |
||
| 30 | 30 | [ |
| 31 | 31 | 'label' => \Yii::t('skeeks/cms', 'Type'), |
| 32 | 32 | 'format' => 'raw', |
| 33 | - 'value' => function (\skeeks\cms\models\CmsContentProperty $cmsContentProperty) { |
|
| 33 | + 'value' => function(\skeeks\cms\models\CmsContentProperty $cmsContentProperty) { |
|
| 34 | 34 | return $cmsContentProperty->handler->name; |
| 35 | 35 | } |
| 36 | 36 | ], |
| 37 | 37 | |
| 38 | 38 | [ |
| 39 | 39 | 'label' => \Yii::t('skeeks/cms', 'Content'), |
| 40 | - 'value' => function (\skeeks\cms\models\CmsContentProperty $cmsContentProperty) { |
|
| 40 | + 'value' => function(\skeeks\cms\models\CmsContentProperty $cmsContentProperty) { |
|
| 41 | 41 | $contents = \yii\helpers\ArrayHelper::map($cmsContentProperty->cmsContents, 'id', 'name'); |
| 42 | 42 | return implode(', ', $contents); |
| 43 | 43 | } |
@@ -46,10 +46,10 @@ discard block |
||
| 46 | 46 | [ |
| 47 | 47 | 'label' => \Yii::t('skeeks/cms', 'Sections'), |
| 48 | 48 | 'format' => 'raw', |
| 49 | - 'value' => function (\skeeks\cms\models\CmsContentProperty $cmsContentProperty) { |
|
| 49 | + 'value' => function(\skeeks\cms\models\CmsContentProperty $cmsContentProperty) { |
|
| 50 | 50 | if ($cmsContentProperty->cmsTrees) { |
| 51 | 51 | $contents = \yii\helpers\ArrayHelper::map($cmsContentProperty->cmsTrees, 'id', |
| 52 | - function ($cmsTree) { |
|
| 52 | + function($cmsTree) { |
|
| 53 | 53 | $path = []; |
| 54 | 54 | |
| 55 | 55 | if ($cmsTree->parents) { |
@@ -36,8 +36,11 @@ |
||
| 36 | 36 | 'Site selected by default always active')); ?> |
| 37 | 37 | <?= $form->field($model, 'def')->hiddenInput()->hint(\Yii::t('skeeks/cms', |
| 38 | 38 | 'This site is the site selected by default. If you want to change it, you need to choose a different site, the default site.')); ?> |
| 39 | -<?php else : ?> |
|
| 40 | - <?= $form->fieldRadioListBoolean($model, 'active'); ?> |
|
| 39 | +<?php else { |
|
| 40 | + : ?> |
|
| 41 | + <?= $form->fieldRadioListBoolean($model, 'active'); |
|
| 42 | +} |
|
| 43 | +?> |
|
| 41 | 44 | <?= $form->fieldRadioListBoolean($model, 'def'); ?> |
| 42 | 45 | <?php endif; ?> |
| 43 | 46 | |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | <div class="row"> |
| 78 | 78 | <div class="col-md-3"> |
| 79 | 79 | <?= $form->fieldSelect($model, 'parent_content_id', \skeeks\cms\models\CmsContent::getDataForSelect(true, |
| 80 | - function (\yii\db\ActiveQuery $activeQuery) use ($model) { |
|
| 80 | + function(\yii\db\ActiveQuery $activeQuery) use ($model) { |
|
| 81 | 81 | if (!$model->isNewRecord) { |
| 82 | 82 | $activeQuery->andWhere(['!=', 'id', $model->id]); |
| 83 | 83 | } |
@@ -177,14 +177,14 @@ discard block |
||
| 177 | 177 | [ |
| 178 | 178 | 'label' => \Yii::t('skeeks/cms', 'Type'), |
| 179 | 179 | 'format' => 'raw', |
| 180 | - 'value' => function (\skeeks\cms\models\CmsContentProperty $cmsContentProperty) { |
|
| 180 | + 'value' => function(\skeeks\cms\models\CmsContentProperty $cmsContentProperty) { |
|
| 181 | 181 | return $cmsContentProperty->handler->name; |
| 182 | 182 | } |
| 183 | 183 | ], |
| 184 | 184 | |
| 185 | 185 | [ |
| 186 | 186 | 'label' => \Yii::t('skeeks/cms', 'Content'), |
| 187 | - 'value' => function (\skeeks\cms\models\CmsContentProperty $cmsContentProperty) { |
|
| 187 | + 'value' => function(\skeeks\cms\models\CmsContentProperty $cmsContentProperty) { |
|
| 188 | 188 | $contents = \yii\helpers\ArrayHelper::map($cmsContentProperty->cmsContents, 'id', |
| 189 | 189 | 'name'); |
| 190 | 190 | return implode(', ', $contents); |
@@ -194,10 +194,10 @@ discard block |
||
| 194 | 194 | [ |
| 195 | 195 | 'label' => \Yii::t('skeeks/cms', 'Sections'), |
| 196 | 196 | 'format' => 'raw', |
| 197 | - 'value' => function (\skeeks\cms\models\CmsContentProperty $cmsContentProperty) { |
|
| 197 | + 'value' => function(\skeeks\cms\models\CmsContentProperty $cmsContentProperty) { |
|
| 198 | 198 | if ($cmsContentProperty->cmsTrees) { |
| 199 | 199 | $contents = \yii\helpers\ArrayHelper::map($cmsContentProperty->cmsTrees, 'id', |
| 200 | - function ($cmsTree) { |
|
| 200 | + function($cmsTree) { |
|
| 201 | 201 | $path = []; |
| 202 | 202 | |
| 203 | 203 | if ($cmsTree->parents) { |
@@ -22,10 +22,13 @@ |
||
| 22 | 22 | |
| 23 | 23 | <?php if ($content_type = \Yii::$app->request->get('content_type')) : ?> |
| 24 | 24 | <?= $form->field($model, 'content_type')->hiddenInput(['value' => $content_type])->label(false); ?> |
| 25 | -<?php else: ?> |
|
| 25 | +<?php else { |
|
| 26 | + : ?> |
|
| 26 | 27 | <div style="display: none;"> |
| 27 | 28 | <?= $form->fieldSelect($model, 'content_type', |
| 28 | - \yii\helpers\ArrayHelper::map(\skeeks\cms\models\CmsContentType::find()->all(), 'code', 'name')); ?> |
|
| 29 | + \yii\helpers\ArrayHelper::map(\skeeks\cms\models\CmsContentType::find()->all(), 'code', 'name')); |
|
| 30 | +} |
|
| 31 | +?> |
|
| 29 | 32 | </div> |
| 30 | 33 | <?php endif; ?> |
| 31 | 34 | |
@@ -15,7 +15,8 @@ discard block |
||
| 15 | 15 | |
| 16 | 16 | <?php if ($code = \Yii::$app->request->get('cms_site_id')) : ?> |
| 17 | 17 | <?= $form->field($model, 'cms_site_id')->hiddenInput(['value' => $code])->label(false); ?> |
| 18 | -<?php else: ?> |
|
| 18 | +<?php else { |
|
| 19 | + : ?> |
|
| 19 | 20 | <?= $form->field($model, 'cms_site_id')->widget( |
| 20 | 21 | \skeeks\widget\chosen\Chosen::className(), [ |
| 21 | 22 | 'items' => \yii\helpers\ArrayHelper::map( |
@@ -24,6 +25,7 @@ discard block |
||
| 24 | 25 | "name" |
| 25 | 26 | ), |
| 26 | 27 | ]); |
| 28 | +} |
|
| 27 | 29 | ?> |
| 28 | 30 | <?php endif; ?> |
| 29 | 31 | |
@@ -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 |
@@ -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(); ?> |