public function init() { $this->name = "Настройки разделов"; $this->modelShowAttribute = "name"; $this->modelClassName = CmsTreeType::className(); parent::init(); }
</div> <?php echo $form->field($model, 'code')->textInput(['maxlength' => 255])->hint(\Yii::t('skeeks/cms', \Yii::t('skeeks/cms', 'This affects the address of the page, be careful when editing.'))); ?> <?php echo Html::checkbox("isLink", (bool) ($model->redirect || $model->redirect_tree_id), ['value' => '1', 'label' => \Yii::t('skeeks/cms', 'This section is a link'), 'class' => 'smartCheck', 'id' => 'isLink']); ?> <div data-listen="isLink" data-show="0" class="sx-hide"> <?php echo $form->field($model, 'tree_type_id')->widget(\skeeks\widget\chosen\Chosen::className(), ['items' => \yii\helpers\ArrayHelper::map(\skeeks\cms\models\CmsTreeType::find()->active()->all(), "id", "name")])->label('Тип раздела')->hint(\Yii::t('skeeks/cms', 'On selected type of partition can depend how it will be displayed.')); ?> <?php echo $form->field($model, 'view_file')->textInput()->hint('@app/views/template-name || template-name'); ?> </div> <div data-listen="isLink" data-show="1" class="sx-hide"> <?php echo \skeeks\cms\modules\admin\widgets\BlockTitleWidget::widget(['content' => \Yii::t('skeeks/cms', 'Redirect')]); ?> <?php echo $form->field($model, 'redirect_code', [])->radioList([301 => 'Постоянное перенаправление [301]', 302 => 'Временное перенаправление [302]'])->label(\Yii::t('skeeks/cms', 'Redirect Code')); ?>
?> <?/*= $form->fieldRadioListBoolean($model, 'filtrable') */?><!-- --><?/*= $form->fieldRadioListBoolean($model, 'smart_filtrable') */?> <?/*= $form->fieldRadioListBoolean($model, 'with_description') */?> <? if ($content_id = \Yii::$app->request->get('tree_type_id')) : ?> <?php echo $form->field($model, 'tree_type_id')->hiddenInput(['value' => $content_id])->label(false); ?> <? else: ?> <?php echo $form->field($model, 'tree_type_id')->label(\Yii::t('skeeks/cms', 'Section type'))->widget(\skeeks\cms\widgets\formInputs\EditedSelect::className(), ['items' => \yii\helpers\ArrayHelper::map(\skeeks\cms\models\CmsTreeType::find()->active()->all(), "id", "name"), 'controllerRoute' => 'cms/admin-cms-tree-type']); ?> <? endif; ?> <?php echo $form->fieldSetEnd(); ?> <?php echo $form->buttonsStandart($model); ?> <?php ActiveForm::end(); ?>
/** * @return \yii\db\ActiveQuery */ public function getDefaultChildrenTreeType() { return $this->hasOne(CmsTreeType::className(), ['id' => 'default_children_tree_type']); }
/** * @return \yii\db\ActiveQuery */ public function getTreeType() { return $this->hasOne(CmsTreeType::className(), ['id' => 'tree_type_id']); }
<?php if ($content_id = \Yii::$app->request->get('shop_person_type_id')) { ?> <?php echo $form->field($model, 'shop_person_type_id')->hiddenInput(['value' => $content_id])->label(false); ?> <?php } else { ?> <?php echo $form->field($model, 'shop_person_type_id')->label(\skeeks\cms\shop\Module::t('app', 'Type payer'))->widget(\skeeks\cms\widgets\formInputs\EditedSelect::className(), ['items' => \yii\helpers\ArrayHelper::map(\skeeks\cms\models\CmsTreeType::find()->active()->all(), "id", "name"), 'controllerRoute' => 'shop/admin-shop-person-type']); ?> <?php } ?> <?php echo $form->fieldSelect($model, 'component', [\skeeks\cms\shop\Module::t('app', 'Basic types') => \Yii::$app->cms->basePropertyTypes(), \skeeks\cms\shop\Module::t('app', 'Custom types') => \Yii::$app->cms->userPropertyTypes()])->label(\skeeks\cms\shop\Module::t('app', 'Type of property')); ?> <?php echo $form->field($model, 'component_settings')->label(false)->widget(\skeeks\cms\widgets\formInputs\componentSettings\ComponentSettingsWidget::className(), ['componentSelectId' => Html::getInputId($model, "component")]); ?> <?php echo $form->field($model, 'name')->textInput(['maxlength' => 255]);
echo $form->field($model, 'viewFile')->textInput()->hint(\Yii::t('app', 'The path to the template. If not specified, the pattern will be the same code.')); ?> <?php echo $form->fieldRadioListBoolean($model, 'active'); ?> <?php echo $form->fieldInputInt($model, 'priority'); ?> <?php echo $form->fieldRadioListBoolean($model, 'index_for_search'); ?> <?php echo $form->fieldSelect($model, 'default_children_tree_type', \yii\helpers\ArrayHelper::map(\skeeks\cms\models\CmsTreeType::find()->all(), 'id', 'name'), ['allowDeselect' => true])->hint(\Yii::t('app', 'If this parameter is not specified, the child partition is created of the same type as the current one.')); ?> <?php echo $form->fieldSetEnd(); ?> <?php echo $form->fieldSet(\Yii::t('app', 'Captions')); ?> <?php echo $form->field($model, 'name_one')->textInput(); ?> <?php echo $form->field($model, 'name_meny')->textInput(); echo $form->fieldSetEnd();
echo $form->field($model, 'viewFile')->textInput(); echo $form->fieldSetEnd(); ?> <?php echo $form->fieldSet('Фильтрация'); ?> <?php echo $form->fieldRadioListBoolean($model, 'enabledCurrentSite', \Yii::$app->cms->booleanFormat())->hint('Если будет выбрано "да", то в выборку разделов добавиться условие фильтрации, разделов сайта, где вызван компонент'); ?> <?php echo $form->fieldSelect($model, 'active', \Yii::$app->cms->booleanFormat()); ?> <?php echo $form->fieldSelectMulti($model, 'tree_type_ids', \yii\helpers\ArrayHelper::map(\skeeks\cms\models\CmsTreeType::find()->all(), 'id', 'name')); ?> <?php echo $form->fieldInputInt($model, 'level')->hint('Добавляет в выборку разделов, условие выбора вложенности. 0 — не будет использовать это условие вовсе.'); ?> <?php echo $form->fieldSelectMulti($model, 'site_codes', \yii\helpers\ArrayHelper::map(\skeeks\cms\models\CmsSite::find()->active()->all(), 'code', 'name')); ?> <?php echo $form->field($model, 'treePid')->widget(\skeeks\cms\widgets\formInputs\selectTree\SelectTree::className(), ['mode' => \skeeks\cms\widgets\formInputs\selectTree\SelectTree::MOD_SINGLE, 'attributeSingle' => 'treePid']); echo $form->fieldSetEnd(); ?> <?php echo $form->fieldSet('Сортировка');