= $this->render('/widgets/_ibox-title') ?>
= Bar::widget([
'template' => '{refresh} {create} {delete}'
]) ?>
= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
[
'class' => CheckboxColumn::className(),
],
[
'attribute' => 'username',
],
[
'attribute' => 'role',
'label' => Yii::t('app', 'Role'),
'value' => function ($model) {
/** @var $model backend\models\AdminUser */
return $model->getRolesNameString();
},
],
[
'attribute' => 'email',
],
[
'attribute' => 'status',
'label' => Yii::t('app', 'Status'),
'value' => function ($model) {
if($model->status == AdminUser::STATUS_ACTIVE){
return Yii::t('app', 'Normal');
}else if( $model->status == AdminUser::STATUS_DELETED ){
return Yii::t('app', 'Disabled');
}
},
'filter' => AdminUser::getStatuses(),
],
[
'class' => DateColumn::className(),
'attribute' => 'created_at',
],
[
'class' => DateColumn::className(),
'attribute' => 'updated_at',
],
[
'class' => ActionColumn::className(),
'buttons' => ['assignment' => $assignment],
],
]
]); ?>