echo Html::encode($this->title); ?> <span class="pull-right"> <?php echo Html::a(Yii::t('app', 'Create User'), ['create'], ['class' => 'btn btn-success']); ?> </span> </h1> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'summary' => false, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'username', 'email:email', ['attribute' => 'status', 'filter' => $searchModel->statusList, 'value' => function ($data) { return $data->statusName; }, 'contentOptions' => function ($model, $key, $index, $column) { return ['class' => CssHelper::statusCss($model->statusName)]; }], ['attribute' => 'item_name', 'filter' => $searchModel->rolesList, 'value' => function ($data) { return $data->roleName; }, 'contentOptions' => function ($model, $key, $index, $column) { return ['class' => CssHelper::roleCss($model->roleName)]; }], ['class' => 'yii\\grid\\ActionColumn', 'header' => "Menu", 'template' => '{view} {update} {delete}', 'buttons' => ['view' => function ($url, $model, $key) { return Html::a('', $url, ['title' => 'View user', 'class' => 'glyphicon glyphicon-eye-open']); }, 'update' => function ($url, $model, $key) { return Html::a('', $url, ['title' => 'Manage user', 'class' => 'glyphicon glyphicon-user']); }, 'delete' => function ($url, $model, $key) { return Html::a('', $url, ['title' => 'Delete user', 'class' => 'glyphicon glyphicon-trash', 'data' => ['confirm' => Yii::t('app', 'Are you sure you want to delete this user?'), 'method' => 'post']]); }]]]]); ?> </div>
$this->params['breadcrumbs'][] = $this->title; ?> <div class="user-view"> <h1> <?php echo $this->title; ?> <div class="pull-right"> <?php echo Html::a(Yii::t('app', 'Back'), ['index'], ['class' => 'btn btn-warning']); ?> <?php echo Html::a(Yii::t('app', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']); ?> <?php echo 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 user?'), 'method' => 'post']]); ?> </div> </h1> <?php echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'username', 'email:email', ['attribute' => 'status', 'value' => '<span class="' . CssHelper::userStatusCss($model->status) . '"> ' . $model->getStatusName($model->status) . ' </span>', 'format' => 'raw'], ['attribute' => 'item_name', 'value' => '<span class="' . CssHelper::roleCss($model->getRoleName()) . '"> ' . $model->getRoleName() . ' </span>', 'format' => 'raw'], 'created_at:date', 'updated_at:date']]); ?> </div>
$this->title = Yii::t('frontend-site', 'Posts'); $this->params['breadcrumbs'][] = $this->title; ?> <div class="articles-admin"> <h1> <?php echo Html::encode($this->title); ?> <span class="pull-right"><?php echo Html::a('<i class="fa fa-plus"></i> ' . Yii::t('frontend-site', 'New Post'), ['create'], ['class' => 'btn btn-success']); ?> </span> </h1> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => SerialColumn::className()], ['attribute' => 'user_id', 'value' => function ($data) { return $data->getAuthorName(); }], ['attribute' => 'title'], ['attribute' => 'status', 'filter' => $searchModel->statusList, 'filterInputOptions' => ['class' => 'form-control chosen-select', 'id' => null, 'prompt' => ' All '], 'value' => function ($data) { return $data->getStatusName($data->status); }, 'contentOptions' => function ($model, $key, $index, $column) { return ['class' => CssHelper::articleStatusCss($model->statusName)]; }], ['attribute' => 'category', 'filter' => $searchModel->categoryList, 'filterInputOptions' => ['class' => 'form-control chosen-select', 'id' => null, 'prompt' => ' All '], 'value' => function ($data) { return $data->getCategoryName($data->category); }, 'contentOptions' => function ($model, $key, $index, $column) { return ['class' => CssHelper::articleCategoryCss($model->categoryName)]; }], ['class' => ActionColumn::className(), 'buttons' => ['update' => function ($url, $model, $key) { return Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, ['class' => 'btn btn-xs btn-default', 'title' => Yii::t('common', 'Edit'), 'data-pjax' => '0']); }]]]]); ?> </div>
$this->title = Yii::t('backend', 'Users'); $this->params['breadcrumbs'][] = $this->title; ?> <div class="backend-user-index"> <h1><?php echo Html::encode($this->title); ?> <span class="pull-right"> <?php echo Html::a(Yii::t('backend', 'Create User'), ['create'], ['class' => 'btn btn-success']); ?> </span> </h1> <?php echo GridView::widget(['dataProvider' => $searchModel->search(Yii::$app->request->queryParams), 'filterModel' => $searchModel, 'summary' => false, 'columns' => [['class' => SerialColumn::className()], ['attribute' => 'username'], ['attribute' => 'email'], ['attribute' => 'status', 'filter' => $searchModel->statusList, 'filterInputOptions' => DataColumn::$filterOptionsForChosenSelect, 'value' => function ($data) { return '<span class="' . CssHelper::statusCssLabel($data->statusName) . '">' . $data->statusName . '</span>'; }, 'format' => 'html', 'contentOptions' => ['class' => 'text-align-center']], ['attribute' => 'item_name', 'filter' => $searchModel->rolesList, 'filterInputOptions' => DataColumn::$filterOptionsForChosenSelect, 'value' => function ($data) { return $data->roleName; }, 'contentOptions' => function ($model, $key, $index, $column) { return ['class' => 'text-align-center ' . CssHelper::roleCss($model->roleName)]; }], ['class' => ActionColumn::className(), 'template' => '{view} {update} {delete}', 'buttons' => ['view' => function ($url, $model, $key) { return Html::a('', $url, ['title' => Yii::t('backend', 'View user'), 'class' => 'glyphicon glyphicon-eye-open']); }, 'update' => function ($url, $model, $key) { return Html::a('', $url, ['title' => Yii::t('backend', 'Manage user'), 'class' => 'glyphicon glyphicon-user']); }, 'delete' => function ($url, $model, $key) { return Html::a('', $url, ['title' => Yii::t('backend', 'Delete user'), 'class' => 'glyphicon glyphicon-trash text-danger margin-left-10px', 'data' => ['confirm' => Yii::t('backend', 'Are you sure you want to delete this user?'), 'method' => 'post']]); }]]]]); ?> </div>