<?php use yii\helpers\Html; use yii\grid\GridView; use common\models\KefuQq; /* @var $this yii\web\View */ /* @var $searchModel backend\models\search\KefuQqSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = Yii::t('common', 'Kefu QQ'); $this->params['breadcrumbs'][] = $this->title; ?> <div class="kefu-qq-index"> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <p> <?php echo Html::a(Yii::t('backend', 'Create {modelClass}', ['modelClass' => Yii::t('common', 'Kefu QQ')]), ['create'], ['class' => 'btn btn-success']); ?> </p> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'qq', 'user_name', 'created_at:datetime', ['class' => \common\grid\EnumColumn::className(), 'attribute' => 'status', 'enum' => KefuQq::getStatus()], ['class' => 'yii\\grid\\ActionColumn']]]); ?> </div>
<?php use yii\helpers\Html; use yii\widgets\DetailView; use yii\helpers\ArrayHelper; use common\models\KefuQq; /* @var $this yii\web\View */ /* @var $model common\models\KefuQq */ $this->title = $model->user_name; $this->params['breadcrumbs'][] = ['label' => Yii::t('common', 'Kefu QQ'), 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; ?> <div class="kefu-qq-view"> <p> <?php echo Html::a(Yii::t('common', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']); ?> <?php echo Html::a(Yii::t('common', 'Delete'), ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => Yii::t('common', 'Are you sure you want to delete this item?'), 'method' => 'post']]); ?> </p> <?php echo DetailView::widget(['model' => $model, 'attributes' => ['qq', 'user_id', 'user_name', 'created_at:datetime', 'updated_at:datetime', ['attribute' => 'status', 'value' => ArrayHelper::getValue(KefuQq::getStatus(), $model->status)]]]); ?> </div>