<?php use yii\helpers\Html; use yii\grid\GridView; /* @var $this yii\web\View */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = 'Роли пользователей'; $this->params['breadcrumbs'][] = ['label' => 'Пользователи', 'url' => ['/users']]; $this->params['breadcrumbs'][] = $this->title; \lenarx\admin\helpers\Backend::addControlLink(['rule' => 'BRbacCreate', 'label' => 'Добавить роль', 'url' => ['create']]); ?> <div class="usergroups-index"> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'layout' => "{items}\n{pager}", 'options' => ['class' => 'grid-view table-responsive'], 'columns' => ['id', 'title', 'name', ['class' => 'yii\\grid\\ActionColumn', 'template' => (Yii::$app->user->can('BRbacUpdate') ? " {update} " : "") . (Yii::$app->user->can('BRbacDelete') ? " {delete} " : "")]]]); ?> </div>
<?php use yii\helpers\Html; use kartik\sortable\Sortable; use yii\widgets\ActiveForm; $this->title = 'Управление настройками'; $this->params['breadcrumbs'][] = ['label' => 'Настройки', 'url' => ['index']]; if (isset(Yii::$app->controller->actionParams['page'])) { $this->params['breadcrumbs'][] = ['url' => ['index', 'page' => Yii::$app->controller->actionParams['page']], 'label' => Yii::$app->params['modules'][Yii::$app->controller->actionParams['page']]['description']]; } $this->params['breadcrumbs'][] = $this->title; \lenarx\admin\helpers\Backend::addControlLink(['rule' => 'BSettingsCreate', 'label' => 'Добавить поле', 'url' => ['create', 'page' => isset(Yii::$app->controller->actionParams['page']) ? Yii::$app->controller->actionParams['page'] : null]]); ?> <div class="pages-index"> <?php if ($settings) { ?> <?php $form = ActiveForm::begin(); ?> <?php echo Sortable::widget(['items' => $settings, 'showHandle' => true, 'pluginOptions' => ['handle' => '.glyphicon-move']]); ?> <div class="form-group"> <?php echo Html::submitButton('Сохранить', ['class' => 'btn btn-sm btn-success']); ?>
<?php use yii\helpers\Html; use yii\grid\GridView; /* @var $this yii\web\View */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = 'Новости'; $this->params['breadcrumbs'][] = $this->title; \lenarx\admin\helpers\Backend::addControlLink(['rule' => 'BNewsCreate', 'label' => 'Добавить новость', 'url' => ['create']]); ?> <div class="news-index"> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'layout' => "{items}\n{pager}", 'options' => ['class' => 'grid-view table-responsive'], 'columns' => [['attribute' => 'date', 'content' => function ($model) { return date('d.m.Y H:i', $model->date); }], 'title', 'name', ['class' => 'yii\\grid\\ActionColumn', 'template' => (Yii::$app->user->can('BNewsUpdate') ? " {update} " : "") . (Yii::$app->user->can('BNewsDelete') ? " {delete} " : "")]]]); ?> </div>
<?php use yii\helpers\Html; use yii\bootstrap\Tabs; use yii\widgets\ActiveForm; $this->title = 'Настройки'; if (isset(Yii::$app->controller->actionParams['page'])) { $this->params['breadcrumbs'][] = ['url' => ['index'], 'label' => $this->title]; $this->params['breadcrumbs'][] = Yii::$app->params['modules'][Yii::$app->controller->actionParams['page']]['description']; } else { $this->params['breadcrumbs'][] = $this->title; } \lenarx\admin\helpers\Backend::addControlLink(['rule' => 'BSettingsManage', 'label' => 'Управление настройками', 'url' => ['manage', 'page' => isset(Yii::$app->controller->actionParams['page']) ? Yii::$app->controller->actionParams['page'] : null]]); \yii\jui\JuiAsset::register($this); \common\themes\admin\widgets\touch_punch\TouchPunchAssets::register($this); \newerton\fancybox\FancyBoxAsset::register($this); ?> <?php if ($fields || $tabs) { ?> <?php $form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]); ?> <?php if ($fields) { ?> <?php
<?php $modules = Yii::$app->params['modules']; if ($modules && is_array($modules) && count($modules)) { $menu = \lenarx\admin\helpers\Backend::getModulesMenu($modules); echo \yii\bootstrap\Nav::widget(['options' => ['class' => 'nav nav-sidebar'], 'items' => $menu, 'encodeLabels' => false, 'dropDownCaret' => "", 'activateParents' => true]); ?> <?php } ?> <ul class="nav nav-sidebar user-links"> <?php echo $this->render('//layouts/blocks/top-links'); ?> </ul>
<?php use yii\helpers\Html; use yii\grid\GridView; $this->title = 'Статические страницы'; $this->params['breadcrumbs'][] = $this->title; \lenarx\admin\helpers\Backend::addControlLink(['rule' => 'BPagesCreate', 'label' => 'Добавить страницу', 'url' => ['create']]); ?> <div class="pages-index"> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'layout' => "{items}\n{pager}", 'options' => ['class' => 'grid-view table-responsive'], 'columns' => ['id', 'title', 'name', ['attribute' => 'date', 'content' => function ($model, $key, $index, $column) { return date('d.m.Y H:i', $model->date); }], ['class' => 'yii\\grid\\ActionColumn', 'template' => (Yii::$app->user->can('BPagesUpdate') ? " {update} " : "") . (Yii::$app->user->can('BPagesDelete') ? " {delete} " : "")]]]); ?> </div>
<?php use dektrium\user\models\UserSearch; use yii\data\ActiveDataProvider; use yii\grid\GridView; use yii\helpers\Html; use yii\jui\DatePicker; use yii\web\View; use yii\widgets\Pjax; $this->title = 'Пользователи'; $this->params['breadcrumbs'][] = $this->title; \lenarx\admin\helpers\Backend::addControlLink(['rule' => 'BUsersCreate', 'label' => 'Добавить пользователя', 'url' => ['create']]); ?> <?php Pjax::begin(); echo GridView::widget(['dataProvider' => $dataProvider, 'options' => ['class' => 'grid-view table-responsive'], 'layout' => "{items}\n{pager}", 'columns' => ['username', 'email:email', ['attribute' => 'registration_ip', 'value' => function ($model) { return $model->registration_ip == null ? '<span class="not-set">' . Yii::t('user', '(not set)') . '</span>' : $model->registration_ip; }, 'format' => 'html'], ['attribute' => 'created_at', 'value' => function ($model) { if (extension_loaded('intl')) { return Yii::t('user', '{0, date, MMMM dd, YYYY HH:mm}', [$model->created_at]); } else { return date('Y-m-d G:i:s', $model->created_at); } }, 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'created_at', 'dateFormat' => 'php:Y-m-d', 'options' => ['class' => 'form-control']])], ['header' => Yii::t('user', 'Confirmation'), 'value' => function ($model) { if ($model->isConfirmed) { return '<div class="text-center"><span class="text-success">' . Yii::t('user', 'Confirmed') . '</span></div>'; } else { return Html::a(Yii::t('user', 'Confirm'), ['confirm', 'id' => $model->id], ['class' => 'btn btn-xs btn-success btn-block', 'data-method' => 'post', 'data-confirm' => Yii::t('user', 'Are you sure you want to confirm this user?')]); } }, 'format' => 'raw', 'visible' => Yii::$app->getModule('user')->enableConfirmation], ['header' => Yii::t('user', 'Block status'), 'value' => function ($model) {
<?php use yii\helpers\Html; use yii\grid\GridView; /* @var $this yii\web\View */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = 'Меню сайта'; $this->params['breadcrumbs'][] = ['label' => 'Настройки', 'url' => ['/settings']]; $this->params['breadcrumbs'][] = $this->title; \lenarx\admin\helpers\Backend::addControlLink(['rule' => 'BMenuCreate', 'label' => 'Добавить меню', 'url' => ['create']]); ?> <div class="menu-index"> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'layout' => "{items}\n{pager}", 'columns' => [['attribute' => 'id', 'options' => ['width' => 50]], ['attribute' => 'title', 'content' => function ($model) { return Yii::$app->user->can('BMenuUpdate') ? Html::a($model->title, ['update', 'id' => $model->id]) : $model->title; }], ['class' => 'yii\\grid\\ActionColumn', 'template' => (Yii::$app->user->can('BMenuUpdate') ? " {update} " : "") . (Yii::$app->user->can('BMenuDelete') ? " {delete} " : ""), 'options' => ['width' => 50]]]]); ?> </div>