echo $form->field($model, 'title')->input('text', ['style' => 'width: 400px;']); ?> <div class="form-group required" style="padding-left: 0px; padding-right: 0px;"> <label>คำอธิบายหมวดหมู่</label> <?php echo $form->field($model, 'description')->widget(CKEditor::className(), ['options' => ['rows' => 5], 'preset' => 'standard']); ?> <div class="help-block"></div> </div> <?php echo $form->field($model, 'id', ['options' => ['class' => 'sr-only']])->hiddenInput(); ?> <?php echo $form->field($model, 'langs', ['options' => ['class' => 'sr-only']])->hiddenInput(); ?> </div> <div class="col-lg-4"> <?php echo $form->field($model, 'langs')->dropDownList(\app\models\tblLangs::makeDropDown(), ['style' => 'width: 150px;', 'disabled' => true]); echo $form->field($model, 'parent_id')->dropDownList(Categories::makeDropDown($model->langs), ['style' => 'margin-right: 10px;width: 300px;']); ?> </div> </div> </div> <?php ActiveForm::end(); ?> </div>
<a href="<?php echo Url::to(['/admin/gallery/update']); ?> " class="btn btn-danger"><i class="glyphicon glyphicon-plus"></i> สร้างอัลบั้ม</a> </div> <div class="col-lg-8"> <?php $form = ActiveForm::begin(['id' => 'article-form', 'options' => ['class' => 'form-inline pull-right'], 'fieldConfig' => ['template' => "{label}{input}", 'labelOptions' => ['class' => 'sr-only']]]); ?> <div class="row"> <div class="col-lg-12"> <?php echo $form->field($model, 'search')->input('text', ['style' => 'width: 230px']); ?> <?php echo $form->field($model, 'langs')->dropDownList(\app\models\tblLangs::makeDropDown(), ['style' => 'width: 120px;', 'onchange' => 'form.submit();']); ?> <?php echo Html::submitButton('<i class="glyphicon glyphicon-search"></i> ค้นหา', ['class' => 'btn btn-danger']); ?> </div> </div> <?php ActiveForm::end(); ?> </div> </div><br/> <?php echo GridView::widget(['dataProvider' => $model->search($model->langs), 'columns' => [['class' => 'yii\\grid\\SerialColumn', 'headerOptions' => ['width' => '5%']], ['headerOptions' => ['width' => '85%'], 'format' => 'raw', 'value' => function ($model) { $mPath = \Yii::getAlias('@webroot') . '/images/gallery/cat_' . $model->id;