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-outline-primary btn-sm']) ?>
= Html::a(Yii::t('buttons', 'Edit'), ['update', 'id' => $model->name], ['class' => 'btn btn-primary btn-sm']) ?>
= Html::a(Yii::t('buttons', 'Delete'), ['delete', 'id' => $model->name], [
'class' => 'btn btn-danger btn-sm',
'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::class,
[
'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::class,
[
'name' => 'childrenPermissions',
'data' => $permissions,
'size' => Select2::SMALL,
'options' => [
'placeholder' => Yii::t('user', 'Select permission...'),
'multiple' => true
],
'pluginOptions' => [
'allowClear' => true
],
]
)->label(false);
?>
= Yii::t('user', 'Administrator has full access rules') ?>