49 lines
1.2 KiB
PHP
49 lines
1.2 KiB
PHP
|
<?php
|
||
|
|
||
|
use app\models\User;
|
||
|
use yii\helpers\Html;
|
||
|
use yii\helpers\Url;
|
||
|
use yii\grid\ActionColumn;
|
||
|
use yii\grid\GridView;
|
||
|
|
||
|
/** @var yii\web\View $this */
|
||
|
/** @var app\models\UserSearch $searchModel */
|
||
|
/** @var yii\data\ActiveDataProvider $dataProvider */
|
||
|
|
||
|
$this->title = 'Users';
|
||
|
$this->params['breadcrumbs'][] = $this->title;
|
||
|
?>
|
||
|
<div class="user-index">
|
||
|
|
||
|
<h1><?= Html::encode($this->title) ?></h1>
|
||
|
|
||
|
<p>
|
||
|
<?= Html::a('Create User', ['create'], ['class' => 'btn btn-success']) ?>
|
||
|
</p>
|
||
|
|
||
|
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
|
||
|
|
||
|
<?= GridView::widget([
|
||
|
'dataProvider' => $dataProvider,
|
||
|
'filterModel' => $searchModel,
|
||
|
'columns' => [
|
||
|
['class' => 'yii\grid\SerialColumn'],
|
||
|
|
||
|
'id',
|
||
|
'username',
|
||
|
'password',
|
||
|
'auth_key',
|
||
|
'email:email',
|
||
|
//'status',
|
||
|
[
|
||
|
'class' => ActionColumn::className(),
|
||
|
'urlCreator' => function ($action, User $model, $key, $index, $column) {
|
||
|
return Url::toRoute([$action, 'id' => $model->id]);
|
||
|
}
|
||
|
],
|
||
|
],
|
||
|
]); ?>
|
||
|
|
||
|
|
||
|
</div>
|