Created
May 22, 2021 19:07
-
-
Save calcio/77e8c1492d2b13cd233d5edcfa0d030f to your computer and use it in GitHub Desktop.
vitrine\modules\admin\views\view.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use yii\helpers\Html; | |
use yii\widgets\DetailView; | |
/* @var $this yii\web\View */ | |
/* @var $model app\modules\admin\models\User */ | |
$this->title = $model->username; | |
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Users'), 'url' => ['index']]; | |
$this->params['breadcrumbs'][] = $this->title; | |
?> | |
<div class="user-view"> | |
<h1>Usuário: <?= Html::encode($this->title) ?></h1> | |
<p> | |
<?= Html::a('Novo', ['create'], ['class' => 'btn btn-success']) ?> | |
<?= Html::a(Yii::t('app', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?> | |
<?= Html::a(Yii::t('app', 'Delete'), ['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, | |
'template' => '<tr><th{captionOptions} class="col-sm-2">{label}</th><td{contentOptions}>{value}</td></tr>', | |
'attributes' => [ | |
'id', | |
'username', | |
'email:email', | |
'status:status', | |
'created_at:date', | |
'updated_at:date', | |
], | |
]) ?> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment