<?php /** * User create view. * * @var \yii\web\View $this View * @var \vova07\users\models\backend\User $user User * @var \vova07\users\models\Profile $profile Profile * @var array $roleArray Roles array * @var array $statusArray Statuses array * @var \vova07\themes\admin\widgets\Box $box Box widget instance */ use vova07\themes\admin\widgets\Box; use vova07\users\Module; $this->title = Module::t('users', 'BACKEND_CREATE_TITLE'); $this->params['subtitle'] = Module::t('users', 'BACKEND_CREATE_SUBTITLE'); $this->params['breadcrumbs'] = [['label' => $this->title, 'url' => ['index']], $this->params['subtitle']]; ?> <div class="row"> <div class="col-sm-12"> <?php $box = Box::begin(['title' => $this->params['subtitle'], 'renderBody' => false, 'options' => ['class' => 'box-primary'], 'bodyOptions' => ['class' => 'table-responsive'], 'buttonsTemplate' => '{cancel}']); echo $this->render('_form', ['user' => $user, 'profile' => $profile, 'roleArray' => $roleArray, 'statusArray' => $statusArray, 'box' => $box]); Box::end(); ?> </div> </div>
if (Yii::$app->user->can('BCreateRoles')) { $boxButtons[] = '{create}'; } if (Yii::$app->user->can('BUpdateRoles')) { $actions[] = '{update}'; $showActions = $showActions || true; } if (Yii::$app->user->can('BDeleteRoles')) { $boxButtons[] = '{batch-delete}'; $actions[] = '{delete}'; $showActions = $showActions || true; } if ($showActions === true) { $gridConfig['columns'][] = ['class' => ActionColumn::className(), 'template' => implode(' ', $actions)]; } $boxButtons = !empty($boxButtons) ? implode(' ', $boxButtons) : null; ?> <div class="row"> <div class="col-xs-12"> <?php Box::begin(['title' => $this->params['subtitle'], 'bodyOptions' => ['class' => 'table-responsive'], 'batchParam' => 'names', 'buttonsTemplate' => $boxButtons, 'grid' => $gridId]); ?> <?php echo GridView::widget($gridConfig); ?> <?php Box::end(); ?> </div> </div>
* Blog update view. * * @var yii\base\View $this View * @var vova07\blogs\models\backend\Blog $model Model * @var \vova07\themes\admin\widgets\Box $box Box widget instance * @var array $statusArray Statuses array */ use vova07\themes\admin\widgets\Box; use vova07\blogs\Module; $this->title = Module::t('blogs', 'BACKEND_UPDATE_TITLE'); $this->params['subtitle'] = Module::t('blogs', 'BACKEND_UPDATE_SUBTITLE'); $this->params['breadcrumbs'] = [['label' => $this->title, 'url' => ['index']], $this->params['subtitle']]; $boxButtons = ['{cancel}']; if (Yii::$app->user->can('BCreateBlogs')) { $boxButtons[] = '{create}'; } if (Yii::$app->user->can('BDeleteBlogs')) { $boxButtons[] = '{delete}'; } $boxButtons = !empty($boxButtons) ? implode(' ', $boxButtons) : null; ?> <div class="row"> <div class="col-sm-12"> <?php $box = Box::begin(['title' => $this->params['subtitle'], 'renderBody' => false, 'options' => ['class' => 'box-success'], 'bodyOptions' => ['class' => 'table-responsive'], 'buttonsTemplate' => $boxButtons]); echo $this->render('_form', ['model' => $model, 'statusArray' => $statusArray, 'box' => $box]); Box::end(); ?> </div> </div>
<?php /** * Permission update view. * * @var \yii\base\View $this View * @var \yii\base\DynamicModel $model Model * @var \vova07\themes\admin\widgets\Box $box Box widget instance * @var array $permissionArray Permissions array * @var array $ruleArray Rules array */ use vova07\themes\admin\widgets\Box; use vova07\blogs\Module; $this->title = Module::t('rbac', 'BACKEND_PERMISSIONS_UPDATE_TITLE'); $this->params['subtitle'] = Module::t('rbac', 'BACKEND_PERMISSIONS_UPDATE_SUBTITLE'); $this->params['breadcrumbs'] = [['label' => $this->title, 'url' => ['index']], $this->params['subtitle']]; ?> <div class="row"> <div class="col-sm-12"> <?php $box = Box::begin(['title' => $this->params['subtitle'], 'renderBody' => false, 'options' => ['class' => 'box-success'], 'bodyOptions' => ['class' => 'table-responsive'], 'deleteParam' => 'name', 'buttonsTemplate' => '{create} {cancel} {delete}']); echo $this->render('_form', ['model' => $model, 'permissionArray' => $permissionArray, 'ruleArray' => $ruleArray, 'box' => $box, 'update' => true]); Box::end(); ?> </div> </div>