Commit b1604aaa authored by john's avatar john

Merge branch 't_3031'

3031
parents 985a0810 704d651d
...@@ -71,7 +71,7 @@ class DocContent extends \yii\db\ActiveRecord ...@@ -71,7 +71,7 @@ class DocContent extends \yii\db\ActiveRecord
public function rules() public function rules()
{ {
return [ return [
[['list_id'], 'required'], [['list_id','priority'], 'required'],
[['list_id'], 'integer'], [['list_id'], 'integer'],
[[ 'priority'], 'number'], [[ 'priority'], 'number'],
[['list_id'], 'exist', 'skipOnError' => true, 'targetClass' => DocList::className(), 'targetAttribute' => ['list_id' => 'id']], [['list_id'], 'exist', 'skipOnError' => true, 'targetClass' => DocList::className(), 'targetAttribute' => ['list_id' => 'id']],
......
...@@ -50,7 +50,7 @@ $blocks = \common\modules\content\models\CoBlocks::find()->all(); ...@@ -50,7 +50,7 @@ $blocks = \common\modules\content\models\CoBlocks::find()->all();
<?= $form->field($model, 'parent_id')->dropDownList($model->getParentList($model), ['class' => 'form-control', 'prompt' => 'Выберите родительский раздел']) ?> <?= $form->field($model, 'parent_id')->dropDownList($model->getParentList($model), ['class' => 'form-control', 'prompt' => 'Выберите родительский раздел']) ?>
<?= <?=
$form->field($model, 'active', [ $form->field($model, 'active', [
'template' => '{input}<a href="#" class="btn btn-xs btn-success m-l-5 disabled">Пункт меню скрыт от пользователя / Пункт меню виднен для пользователю</a>' 'template' => '{input}<a href="#" class="btn btn-xs btn-success m-l-5 disabled">Пункт меню скрыт от пользователя / Пункт меню виден для пользователю</a>'
])->checkbox([ ])->checkbox([
'data-theme' => 'self', 'data-theme' => 'self',
'data-render' => 'switchery', 'data-render' => 'switchery',
......
...@@ -47,7 +47,7 @@ $parentList = $searchModel->getParentList($searchModel, 0, 0, true); ...@@ -47,7 +47,7 @@ $parentList = $searchModel->getParentList($searchModel, 0, 0, true);
[ [
'attribute' => 'active', 'attribute' => 'active',
'value' => function($model) { 'value' => function($model) {
$list = ['0' => 'Пункт меню скрыт от пользователя ', '1' => 'Пункт меню виднен для пользователю']; $list = ['0' => 'Пункт меню скрыт от пользователя ', '1' => 'Пункт меню виден для пользователю'];
return ArrayHelper::getValue($list, $model->active); return ArrayHelper::getValue($list, $model->active);
} }
], ],
......
...@@ -52,7 +52,7 @@ SortableGridView::widget([ ...@@ -52,7 +52,7 @@ SortableGridView::widget([
'header' => $searchModel->getAttributeLabel('active'), 'header' => $searchModel->getAttributeLabel('active'),
'attribute' => 'active', 'attribute' => 'active',
'value' => function($model) { 'value' => function($model) {
$list = ['0' => 'Пункт меню скрыт от пользователя ', '1' => 'Пункт меню виднен для пользователю']; $list = ['0' => 'Пункт меню скрыт от пользователя ', '1' => 'Пункт меню виден для пользователю'];
return ArrayHelper::getValue($list, $model->active); return ArrayHelper::getValue($list, $model->active);
} }
], ],
......
...@@ -47,7 +47,7 @@ DetailView::widget([ ...@@ -47,7 +47,7 @@ DetailView::widget([
[ [
'attribute' => 'active', 'attribute' => 'active',
'value' => function($model) { 'value' => function($model) {
$list = ['0' => 'Пункт меню скрыт от пользователя ', '1' => 'Пункт меню виднен для пользователю']; $list = ['0' => 'Пункт меню скрыт от пользователя ', '1' => 'Пункт меню виден для пользователю'];
return ArrayHelper::getValue($list, $model->active); return ArrayHelper::getValue($list, $model->active);
} }
], ],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment