This commit is contained in:
2020-02-01 16:47:12 +07:00
commit 4c619ad6e6
16739 changed files with 3329179 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?php
use yii\grid\GridView;
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
use yii\widgets\Pjax;
/* @var $this \yii\web\View */
/* @var $gridViewColumns array */
/* @var $dataProvider \yii\data\ArrayDataProvider */
/* @var $searchModel \yii2mod\rbac\models\search\AssignmentSearch */
$this->title = Yii::t('yii2mod.rbac', 'Assignments');
$this->params['breadcrumbs'][] = $this->title;
$this->render('/layouts/_sidebar');
?>
<div class="assignment-index">
<h1><?php echo Html::encode($this->title); ?></h1>
<?php Pjax::begin(['timeout' => 5000]); ?>
<?php echo GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => ArrayHelper::merge($gridViewColumns, [
[
'class' => 'yii\grid\ActionColumn',
'template' => '{view}',
],
]),
]); ?>
<?php Pjax::end(); ?>
</div>

View File

@@ -0,0 +1,31 @@
<?php
use yii\helpers\Html;
use yii\helpers\Json;
use yii2mod\rbac\RbacAsset;
RbacAsset::register($this);
/* @var $this yii\web\View */
/* @var $model \yii2mod\rbac\models\AssignmentModel */
/* @var $usernameField string */
$userName = $model->user->{$usernameField};
$this->title = Yii::t('yii2mod.rbac', 'Assignment : {0}', $userName);
$this->params['breadcrumbs'][] = ['label' => Yii::t('yii2mod.rbac', 'Assignments'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $userName;
$this->render('/layouts/_sidebar');
?>
<div class="assignment-index">
<h1><?php echo Html::encode($this->title); ?></h1>
<?php echo $this->render('../_dualListBox', [
'opts' => Json::htmlEncode([
'items' => $model->getItems(),
]),
'assignUrl' => ['assign', 'id' => $model->userId],
'removeUrl' => ['remove', 'id' => $model->userId],
]); ?>
</div>