= $this->render('/widgets/_ibox-title') ?>
= Bar::widget([
'template' => '{refresh} {create} {delete}',
]) ?>
= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
[
'class' => CheckboxColumn::className(),
],
[
'attribute' => 'id',
],
[
'attribute' => 'username',
],
[
'attribute' => 'email',
],
[
'attribute' => 'status',
'label' => Yii::t('app', 'Status'),
'value' => function ($model) {
if($model->status == User::STATUS_ACTIVE){
return Yii::t('app', 'Normal');
}else if( $model->status == User::STATUS_DELETED ){
return Yii::t('app', 'Disabled');
}
},
'filter' => User::getStatuses(),
],
[
'class' => DateColumn::className(),
'attribute' => 'created_at',
],
[
'class' => DateColumn::className(),
'attribute' => 'updated_at',
],
[
'class' => ActionColumn::className(),
'width' => '190px',
],
]
]); ?>