title = '用户';
$this->params['breadcrumbs'][] = $this->title;
?>
beginBlock('content-header') ?>
= $this->title . ' ' . Html::a('新用户', ['create'], ['class' => 'btn btn-primary btn-flat btn-xs']) ?>
endBlock() ?>
render('_search', ['model' => $searchModel]); ?>
= GridView::widget([
'dataProvider' => $dataProvider,
// 'filterModel' => $searchModel,
'columns' => [
'id',
'pid',
'nickname',
[
'attribute' => 'avatar',
"format" => [
"image", [
"width" => "60",
"height" => "60",
"class" => 'img-circle'
]
]
],
// 'dataCount[0][count]:text:日课',
[
'label' => '日课',
'format' => 'raw',
'value' => function ($model) {
return $model->dataCount[0]['count'];
},
],
[
'label' => '总课',
'format' => 'raw',
'value' => function ($model) {
return $model->dataCount[1]['count'];
},
],
[
'label' => '辅助课',
'format' => 'raw',
'value' => function ($model) {
return $model->dataCount[2]['count'];
},
],
'allRoleDesc:text:角色',
'tel',
'email',
'created_at:datetime',
'login_at:datetime',
[
'class' => 'yii\grid\ActionColumn',
'template' => '{update} {delete}'
]
],
]); ?>