Ejemplo n.º 1
0
 */
$this->title = "Perfil de " . $model->user->username;
$this->params['breadcrumbs'][] = ['label' => 'Perfil', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="perfil-view">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <p>
        <?php 
//esto no es necesario pero está aquí como ejemplo
if (PermisosHelpers::userDebeSerPropietario('perfil', $model->id)) {
    echo Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
}
?>

        <?php 
echo Html::a('Delete', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => Yii::t('app', 'Are you sure to delete this item?'), 'method' => 'post']]);
?>

    </p>


    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['user.username', 'nombre', 'apellido', 'fecha_nacimiento', 'genero.genero_nombre', 'created_at', 'updated_at']]);
?>