use helpers\BaseHtml; use helpers\Detail; $this->title = $model->Username; $this->breadcrumb = [['label' => 'Users', 'url' => ['index']], ['label' => $this->title]]; ?> <div class="main-title"> <h1><?php echo $this->title; ?> </h1> </div> <div class="row"> <div class="col-md-8 col-md-offset-2"> <?php echo BaseHtml::a('Update', ['update/' . $model->Username], ['class' => 'btn btn-warning']); ?> <?php echo BaseHtml::a('Delete', ['delete/' . $model->Username], ['class' => 'btn btn-danger', 'onclick' => 'if (confirm(\'Are you sure want to delete this item?\') == false) return false']); ?> <br /><br /> <?php echo Detail::begin(['model' => $model, 'items' => ['Username', 'Email', 'isActivated', 'regDatePretty', 'lastLoginPretty', ['label' => 'Role', 'value' => App::roles()[$model->GroupID - 1]]]]); ?> </div> </div>
<?php use helpers\BaseHtml; use helpers\Grid; $this->title = 'Users'; $this->breadcrumb = [['label' => $this->title]]; ?> <div class="main-title"> <h1><?php echo $this->title; ?> </h1> </div> <?php echo Grid::begin(['model' => $model, 'items' => [['attribute' => ':serialColumn'], 'Username', 'Email', 'isActivated', 'regDatePretty', 'lastLoginPretty', ['label' => 'Role', 'value' => function ($model) { return App::roles()[$model->GroupID - 1]; }], ['attribute' => ':actionColumn', 'parameter' => 'Username']]]);