<div class="portlet-body"> <?php $form = $this->beginWidget('ActiveForm', array('htmlOptions' => array('class' => 'clearfix row'), 'enableClientValidation' => true)); ?> <?php echo Html::formGroup($model, 'title_zh', array('class' => 'col-lg-6'), $form->labelEx($model, 'title_zh', array('label' => '中文标题')), Html::activeTextField($model, 'title_zh'), $form->error($model, 'title_zh', array('class' => 'text-danger'))); ?> <?php echo Html::formGroup($model, 'title', array('class' => 'col-lg-6'), $form->labelEx($model, 'title', array('label' => '英文标题')), Html::activeTextField($model, 'title'), $form->error($model, 'title', array('class' => 'text-danger'))); ?> <div class="clearfix"></div> <?php echo Html::formGroup($model, 'date', array('class' => 'col-lg-6'), $form->labelEx($model, 'date', array('label' => '时间')), Html::activeTextField($model, 'date', array('class' => 'datetime-picker', 'data-date-format' => 'yyyy-mm-dd hh:ii:ss')), $form->error($model, 'date', array('class' => 'text-danger'))); ?> <?php echo Html::formGroup($model, 'category_id', array('class' => 'col-lg-6'), $form->labelEx($model, 'category_id', array('label' => '分类')), $form->dropDownList($model, 'category_id', FaqCategory::getCategories(), array('class' => 'form-control', 'prompt' => '')), $form->error($model, 'category_id', array('class' => 'text-danger'))); ?> <div class="clearfix"></div> <?php echo Html::formGroup($model, 'content_zh', array('class' => 'col-lg-6'), $form->labelEx($model, 'content_zh', array('label' => '中文正文')), $form->textArea($model, 'content_zh', array('class' => 'editor form-control')), $form->error($model, 'content_zh', array('class' => 'text-danger'))); ?> <?php echo Html::formGroup($model, 'content', array('class' => 'col-lg-6'), $form->labelEx($model, 'content', array('label' => '英文正文')), $form->textArea($model, 'content', array('class' => 'editor form-control')), $form->error($model, 'content', array('class' => 'text-danger'))); ?> <div class="col-lg-12"> <button type="submit" class="btn btn-default btn-square"><?php echo Yii::t('common', 'Submit'); ?> </button> </div> <?php
<div class="row"> <div class="col-lg-12"> <div class="portlet portlet-default"> <div class="portlet-heading"> <div class="portlet-title"> <h4>FAQ列表</h4> </div> <div class="clearfix"></div> </div> <div class="panel-collapse collapse in"> <div class="portlet-body"> <?php $this->widget('GridView', array('dataProvider' => $model->search(), 'filter' => $model, 'columns' => array(array('header' => '操作', 'type' => 'raw', 'value' => '$data->operationButton'), 'id', array('name' => 'user_id', 'value' => '$data->user->name_zh', 'filter' => false), array('name' => 'category_id', 'filter' => FaqCategory::getCategories(), 'value' => '$data->category->name_zh'), 'title_zh', array('name' => 'date', 'type' => 'raw', 'value' => 'date("Y-m-d H:i:s", $data->date)', 'filter' => false), array('name' => 'status', 'type' => 'raw', 'value' => '$data->getStatusText()', 'filter' => Faq::getAllStatus())))); ?> </div> </div> </div> </div> </div>