//$langOption = new \appCMS\language\LanguageCms(); //echo $form->field($model, 'langs')->dropDownList(\app\models\tblLangs::makeDropDown(), [ 'style' => 'width: 120px;', 'onchange' => 'form.submit();']); ?> </div> </div> <div class="row" style="margin-top: 10px;"> <div class="col-lg-12"> <?php echo $form->field($model, 'search')->input('text', ['style' => 'width: 300px']); ?> <?php echo Html::submitButton('<i class="glyphicon glyphicon-search"></i> ค้นหา', ['class' => 'btn btn-danger']); ?> </div> </div> <?php ActiveForm::end(); ?> </div> </div><br/> <?php // $this->registerJs("$('a[data-pjax]').pjax()"); \yii\widgets\Pjax::begin(); echo GridView::widget(['id' => 'grid-id', 'dataProvider' => $model->search(), 'columns' => [['class' => 'yii\\grid\\SerialColumn', 'headerOptions' => ['width' => '5%']], ['headerOptions' => ['width' => '40%'], 'header' => 'ชื่อเรื่อง', 'attribute' => 'title'], ['headerOptions' => ['width' => '20%'], 'header' => 'ชื่อไฟล์', 'attribute' => 'file_name'], ['headerOptions' => ['width' => '16%'], 'header' => 'หมวดหมู่', 'attribute' => 'catname'], ['headerOptions' => ['width' => '5%', 'style' => 'text-align:center;'], 'contentOptions' => ['align' => 'center'], 'class' => yii\grid\CMSColumn::className(), 'template' => '{published}', 'header' => 'แสดง', 'visible' => Yii::$app->user->can('Publisher')], ['headerOptions' => ['width' => '7%', 'style' => 'text-align:center;'], 'contentOptions' => ['align' => 'center'], 'class' => yii\grid\CMSColumn::className(), 'template' => '{up} {down}', 'header' => 'เรียง', 'visible' => Yii::$app->user->can('Administrator')], ['headerOptions' => ['width' => '7%', 'style' => 'text-align:center;'], 'contentOptions' => ['align' => 'center'], 'class' => yii\grid\ActionColumn::className(), 'template' => '{update} {delete}', 'header' => 'แก้ไข']]]); \yii\widgets\Pjax::end(); ?> </div> </div>
echo $form->field($model, 'langs')->dropDownList(\app\models\tblLangs::makeDropDown(), ['style' => 'width: 120px;', 'onchange' => 'form.submit();']); ?> </div> </div> <div class="row" style="margin-top: 10px;"> <div class="col-lg-12"> <?php echo $form->field($model, 'search')->input('text', ['style' => 'width: 300px']); ?> <?php echo Html::submitButton('<i class="glyphicon glyphicon-search"></i> ค้นหา', ['class' => 'btn btn-danger']); ?> </div> </div> <?php echo $form->field($model, 'cid', ['options' => ['class' => 'sr-only']])->hiddenInput(); ?> <?php ActiveForm::end(); ?> </div> </div><br/> <?php Pjax::begin(); echo GridView::widget(['dataProvider' => $model->search($sess), 'columns' => [['class' => 'yii\\grid\\SerialColumn', 'headerOptions' => ['width' => '5%']], ['headerOptions' => ['width' => '60%'], 'header' => 'ชื่อเรื่อง', 'attribute' => 'titles'], ['headerOptions' => ['width' => '20%'], 'header' => 'ปรับปรุงเมื่อ', 'attribute' => 'applyDate'], ['headerOptions' => ['width' => '5%', 'style' => 'text-align:center;'], 'contentOptions' => ['align' => 'center'], 'class' => yii\grid\CMSColumn::className(), 'template' => '{published}', 'header' => 'แสดง'], ['headerOptions' => ['width' => '10%', 'style' => 'text-align:center;'], 'contentOptions' => ['align' => 'center'], 'class' => yii\grid\ActionColumn::className(), 'template' => '{update} {delete}', 'header' => 'แก้ไข']]]); Pjax::end(); ?> </div> </div>