Files
Alex Solomaha 71b1de5e6d Fixes
2017-03-16 23:37:03 +02:00

52 lines
1.4 KiB
PHP

<?php
/* @var $this yii\web\View */
/* @var $model app\models\User */
use yii\helpers\Html;
use yii\widgets\DetailView;
$this->title = 'Пользователь ' . $model->username;
$this->params['breadcrumbs'][] = ['label' => 'Пользователи', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="user-view">
<p>
<?= Html::a('Редактировать', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Удалить', ['delete', 'id' => $model->id], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'),
'method' => 'post',
],
]) ?>
</p>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
'id',
'username',
'name',
'email:email',
[
'attribute' => 'status',
'value' => $model->getStatusLabel(),
],
[
'attribute' => 'group',
'value' => $model->getGroupLabel(),
],
[
'attribute' => 'room_id',
'value' => $model->room ? $model->room->name : null,
],
'api_key',
'created_at:datetime',
'updated_at:datetime',
],
]) ?>
</div>