title = $model->name;
$this->params['breadcrumbs'][] = ['label' => Yii::t('user', 'Roles'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
= Html::a(Yii::t('user', 'Roles'), ['index'], ['class' => 'btn btn-default']) ?>
= Html::a(Yii::t('buttons', 'Edit'), ['update', 'id' => $model->name], ['class' => 'btn btn-primary']) ?>
= Html::a(Yii::t('buttons', 'Delete'), ['delete', 'id' => $model->name], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => Yii::t('buttons', 'Are you sure you want to delete this item?'),
'method' => 'post',
],
]) ?>
= DetailView::widget([
'model' => $model,
'attributes' => [
[
'attribute' => 'name',
'label' => Yii::t('user', 'Role Name'),
],
[
'attribute' => 'description',
'label' => Yii::t('user', 'Role Description'),
],
[
'attribute' => 'ruleName',
'label' => Yii::t('user', 'Rule Name'),
],
],
]) ?>
name !== 'admin'): ?>
= Yii::t('user', 'Contains roles') ?>
= $form->field($itemsForm, 'roles')->widget(
Select2::classname(), [
'name' => 'childrenRoles',
'data' => $roles,
'size' => Select2::SMALL,
'options' => ['placeholder' => Yii::t('user', 'Select role...'), 'multiple' => true],
'pluginOptions' => [
'allowClear' => true
],
])->label(false);
?>
= Yii::t('user', 'Permissions') ?>
= $form->field($itemsForm, 'permissions')->widget(
Select2::classname(), [
'name' => 'childrenPermissions',
'data' => $permissions,
'size' => Select2::SMALL,
'options' => ['placeholder' => Yii::t('user', 'Select permission...'), 'multiple' => true],
'pluginOptions' => [
'allowClear' => true
],
])->label(false);
?>
= Html::submitButton(Yii::t('buttons', 'Save'), ['class' => 'btn btn-primary']) ?>
= Yii::t('user', 'Administrator has full access rules') ?>