update folder location

This commit is contained in:
Antonio Ramirez
2017-01-11 21:31:42 +01:00
parent 1cb60f0740
commit 13255a5117
167 changed files with 4770 additions and 8 deletions

View File

@ -0,0 +1,48 @@
<?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 $this yii\web\View
* @var $model \Da\User\Model\Role
*/
use Da\User\Helper\AuthHelper;
use dosamigos\selectize\SelectizeDropDownList;
use yii\helpers\Html;
use yii\widgets\ActiveForm;
$unassignedItems = Yii::$container->get(AuthHelper::class)->getUnassignedItems($model);
?>
<?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() ?>

View File

@ -0,0 +1,32 @@
<?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\Role
* @var $this yii\web\View
* @var $unassignedItems string[]
*/
$this->title = Yii::t('usuario', 'Create new role');
$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() ?>

View File

@ -0,0 +1,70 @@
<?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 yii\grid\ActionColumn;
use yii\grid\GridView;
use yii\helpers\Url;
/*
* @var $dataProvider array
* @var $searchModel \Da\User\Search\RoleSearch
* @var $this yii\web\View
*/
$this->title = Yii::t('usuario', 'Roles');
$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/role/'.$action, 'name' => $model['name']]);
},
'options' => [
'style' => 'width: 5%',
],
],
],
]
) ?>
<?php $this->endContent() ?>

View File

@ -0,0 +1,32 @@
<?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\Role
* @var $this yii\web\View
* @var $unassignedItems string[]
*/
$this->title = Yii::t('usuario', 'Update role');
$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() ?>