yii2-netdisk/views/user/view.php

43 lines
1.0 KiB
PHP
Raw Permalink Normal View History

2024-02-09 12:15:09 +08:00
<?php
use yii\helpers\Html;
use yii\web\YiiAsset;
2024-02-09 12:15:09 +08:00
use yii\widgets\DetailView;
/** @var yii\web\View $this */
/** @var app\models\User $model */
$this->title = $model->id;
$this->params['breadcrumbs'][] = ['label' => 'Users', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
YiiAsset::register($this);
2024-02-09 12:15:09 +08:00
?>
<div class="user-view">
<h1><?= Html::encode($this->title) ?></h1>
<p>
<?= Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Delete', ['delete', 'id' => $model->id], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => 'Are you sure you want to delete this item?',
'method' => 'post',
],
]) ?>
</p>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
'id',
'username',
'password',
'auth_key',
'email:email',
'status',
],
]) ?>
</div>