update folder location
This commit is contained in:
45
src/User/resources/views/permission/_form.php
Normal file
45
src/User/resources/views/permission/_form.php
Normal file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the 2amigos/yii2-usuario project.
|
||||
*
|
||||
* (c) 2amigOS! <http://2amigos.us/>
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use dosamigos\selectize\SelectizeDropDownList;
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
|
||||
/**
|
||||
* @var $this yii\web\View
|
||||
* @var $model Da\User\Model\Permission
|
||||
* @var $unassignedItems string[]
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<?php $form = ActiveForm::begin([
|
||||
'enableClientValidation' => false,
|
||||
'enableAjaxValidation' => true,
|
||||
]) ?>
|
||||
|
||||
<?= $form->field($model, 'name') ?>
|
||||
|
||||
<?= $form->field($model, 'description') ?>
|
||||
|
||||
<?= $form->field($model, 'rule') ?>
|
||||
|
||||
<?= $form->field($model, 'children')->widget(SelectizeDropDownList::class, [
|
||||
'items' => $unassignedItems,
|
||||
'options' => [
|
||||
'id' => 'children',
|
||||
'multiple' => true,
|
||||
],
|
||||
]) ?>
|
||||
|
||||
<?= Html::submitButton(Yii::t('usuario', 'Save'), ['class' => 'btn btn-success btn-block']) ?>
|
||||
|
||||
<?php ActiveForm::end() ?>
|
||||
33
src/User/resources/views/permission/create.php
Normal file
33
src/User/resources/views/permission/create.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the 2amigos/yii2-usuario project.
|
||||
*
|
||||
* (c) 2amigOS! <http://2amigos.us/>
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var \Da\User\Model\Permission
|
||||
* @var $this yii\web\View
|
||||
* @var $unassignedItems string[]
|
||||
*/
|
||||
|
||||
$this->title = Yii::t('usuario', 'Create new permission');
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
|
||||
?>
|
||||
|
||||
<?php $this->beginContent('@Da/User/resources/views/shared/admin_layout.php') ?>
|
||||
|
||||
<?= $this->render(
|
||||
'_form',
|
||||
[
|
||||
'model' => $model,
|
||||
'unassignedItems' => $unassignedItems,
|
||||
]
|
||||
) ?>
|
||||
|
||||
<?php $this->endContent() ?>
|
||||
68
src/User/resources/views/permission/index.php
Normal file
68
src/User/resources/views/permission/index.php
Normal file
@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the 2amigos/yii2-usuario project.
|
||||
*
|
||||
* (c) 2amigOS! <http://2amigos.us/>
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var array
|
||||
* @var $this yii\web\View
|
||||
* @var $searchModel \Da\User\Search\PermissionSearch
|
||||
*/
|
||||
use yii\grid\ActionColumn;
|
||||
use yii\grid\GridView;
|
||||
use yii\helpers\Url;
|
||||
|
||||
$this->title = Yii::t('usuario', 'Permissions');
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
|
||||
?>
|
||||
|
||||
<?php $this->beginContent('@Da/User/resources/views/shared/admin_layout.php') ?>
|
||||
|
||||
<?= GridView::widget(
|
||||
[
|
||||
'dataProvider' => $dataProvider,
|
||||
'filterModel' => $searchModel,
|
||||
'layout' => "{items}\n{pager}",
|
||||
'columns' => [
|
||||
[
|
||||
'attribute' => 'name',
|
||||
'header' => Yii::t('usuario', 'Name'),
|
||||
'options' => [
|
||||
'style' => 'width: 20%',
|
||||
],
|
||||
],
|
||||
[
|
||||
'attribute' => 'description',
|
||||
'header' => Yii::t('usuario', 'Description'),
|
||||
'options' => [
|
||||
'style' => 'width: 55%',
|
||||
],
|
||||
],
|
||||
[
|
||||
'attribute' => 'rule_name',
|
||||
'header' => Yii::t('usuario', 'Rule name'),
|
||||
'options' => [
|
||||
'style' => 'width: 20%',
|
||||
],
|
||||
],
|
||||
[
|
||||
'class' => ActionColumn::className(),
|
||||
'template' => '{update} {delete}',
|
||||
'urlCreator' => function ($action, $model) {
|
||||
return Url::to(['/user/permission/'.$action, 'name' => $model['name']]);
|
||||
},
|
||||
'options' => [
|
||||
'style' => 'width: 5%',
|
||||
],
|
||||
],
|
||||
],
|
||||
]
|
||||
) ?>
|
||||
<?php $this->endContent() ?>
|
||||
34
src/User/resources/views/permission/update.php
Normal file
34
src/User/resources/views/permission/update.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the 2amigos/yii2-usuario project.
|
||||
*
|
||||
* (c) 2amigOS! <http://2amigos.us/>
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var \Da\User\Model\Permission
|
||||
* @var $this yii\web\View
|
||||
* @var $unassignedItems string[]
|
||||
*/
|
||||
|
||||
$this->title = Yii::t('usuario', 'Update permission');
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
|
||||
?>
|
||||
|
||||
<?php $this->beginContent('@Da/User/resources/views/shared/admin_layout.php') ?>
|
||||
|
||||
<?= $this->render(
|
||||
'_form',
|
||||
[
|
||||
'model' => $model,
|
||||
'unassignedItems' => $unassignedItems,
|
||||
]
|
||||
) ?>
|
||||
|
||||
<?php $this->endContent() ?>
|
||||
|
||||
Reference in New Issue
Block a user