$this->params['breadcrumbs'][] = ['label' => 'News', 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; ?> <div class="row"> </div> <div class="news-view"> <h1><?php echo Html::encode($this->title); ?> </h1> <p> <?php echo Html::a('Редактировать', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']); ?> <?php echo Html::a('Удалить', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => 'Are you sure you want to delete this item?', 'method' => 'post']]); ?> <?php echo Html::a('Назад', ['/news'], ['class' => 'btn btn-info']); ?> </p> <?php echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'title', 'tags', ['attribute' => 'text', 'format' => 'html'], 'dt_add:datetime', ['attribute' => 'status', 'value' => \common\constants\Status::getStatusNew($model->status)]]]); ?> </div>
$this->params['breadcrumbs'][] = $this->title; ?> <div class="user-index"> <h1><?php echo Html::encode($this->title); ?> </h1> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <p> <?php echo Html::a('Добавить пользователя', ['create'], ['class' => 'btn btn-success']); ?> <?php echo Html::a('Назад', ['/'], ['class' => 'btn btn-info']); ?> </p> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'email:email', 'name', 'surname', ['attribute' => 'status', 'format' => 'text', 'value' => function ($model) { return \common\constants\Status::getStatusText($model->status); }, 'filter' => [-1 => "Забанен", 0 => "Не активирован", 1 => 'Активирован']], ['attribute' => 'user_type', 'format' => 'text', 'value' => function ($model) { return \common\constants\UserType::getUserTypeNumber($model->user_type); }, 'filter' => [\common\constants\UserType::MODERATOR => 'Модератор', \common\constants\UserType::ADMINISTRATOR => 'Администратор']], ['class' => 'yii\\grid\\ActionColumn']]]); ?> </div>
/* @var $this yii\web\View */ /* @var $model backend\modules\manager\models\db\User */ $this->title = 'Профиль: ' . $model->email; $this->params['breadcrumbs'][] = ['label' => 'Users', 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; ?> <div class="user-view"> <h1><?php echo Html::encode($this->title); ?> </h1> <p> <?php echo Html::a('Редактировать', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']); ?> <?php echo Html::a('Удалить', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => 'Вы уверены что хотите удалить профиль ' . $model->email . '?', 'method' => 'post']]); ?> <?php echo Html::a('Назад', ['/manager'], ['class' => 'btn btn-info']); ?> </p> <?php echo DetailView::widget(['model' => $model, 'attributes' => ['email:email', 'surname', 'name', 'patronymic', ['attribute' => 'status', 'value' => \common\constants\Status::getStatusText($model->status)], 'created_at:datetime', 'updated_at:datetime', ['attribute' => 'user_type', 'value' => \common\constants\UserType::getUserTypeNumber($model->user_type)], ['attribute' => 'image', 'format' => 'html', 'value' => Html::img('/image/' . $model->image)]]]); ?> </div>