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,29 @@
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model \yii2mod\rbac\models\BizRuleModel */
/* @var $form ActiveForm */
?>
<div class="rule-item-form">
<?php $form = ActiveForm::begin(); ?>
<?php echo $form->field($model, 'name')->textInput(['maxlength' => 64]); ?>
<?php echo $form->field($model, 'className')->textInput(); ?>
<div class="form-group">
<?php echo Html::submitButton(
$model->getIsNewRecord() ? Yii::t('yii2mod.rbac', 'Create') : Yii::t('yii2mod.rbac', 'Update'),
[
'class' => $model->getIsNewRecord() ? 'btn btn-success' : 'btn btn-primary',
]
); ?>
</div>
<?php ActiveForm::end(); ?>
</div>

View File

@@ -0,0 +1,21 @@
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model \yii2mod\rbac\models\BizRuleModel */
$this->title = Yii::t('yii2mod.rbac', 'Create Rule');
$this->params['breadcrumbs'][] = ['label' => Yii::t('yii2mod.rbac', 'Rules'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
$this->render('/layouts/_sidebar');
?>
<div class="rule-item-create">
<h1><?php echo Html::encode($this->title); ?></h1>
<?php echo $this->render('_form', [
'model' => $model,
]); ?>
</div>

View File

@@ -0,0 +1,43 @@
<?php
use yii\grid\GridView;
use yii\helpers\Html;
use yii\widgets\Pjax;
/* @var $this yii\web\View */
/* @var $dataProvider \yii\data\ArrayDataProvider */
/* @var $searchModel yii2mod\rbac\models\search\BizRuleSearch */
$this->title = Yii::t('yii2mod.rbac', 'Rules');
$this->params['breadcrumbs'][] = $this->title;
$this->render('/layouts/_sidebar');
?>
<div class="role-index">
<h1><?php echo Html::encode($this->title); ?></h1>
<p>
<?php echo Html::a(Yii::t('yii2mod.rbac', 'Create Rule'), ['create'], ['class' => 'btn btn-success']); ?>
</p>
<?php Pjax::begin(['timeout' => 5000]); ?>
<?php echo GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
[
'attribute' => 'name',
'label' => Yii::t('yii2mod.rbac', 'Name'),
],
[
'header' => Yii::t('yii2mod.rbac', 'Action'),
'class' => 'yii\grid\ActionColumn',
],
],
]);
?>
<?php Pjax::end(); ?>
</div>

View File

@@ -0,0 +1,21 @@
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model \yii2mod\rbac\models\BizRuleModel */
$this->title = Yii::t('yii2mod.rbac', 'Update Rule : {0}', $model->name);
$this->params['breadcrumbs'][] = ['label' => Yii::t('yii2mod.rbac', 'Rules'), 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->name]];
$this->params['breadcrumbs'][] = Yii::t('yii2mod.rbac', 'Update');
$this->render('/layouts/_sidebar');
?>
<div class="rule-item-update">
<h1><?php echo Html::encode($this->title); ?></h1>
<?php echo $this->render('_form', [
'model' => $model,
]); ?>
</div>

View File

@@ -0,0 +1,35 @@
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model \yii2mod\rbac\models\BizRuleModel */
$this->title = Yii::t('yii2mod.rbac', 'Rule : {0}', $model->name);
$this->params['breadcrumbs'][] = ['label' => Yii::t('yii2mod.rbac', 'Rules'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $model->name;
$this->render('/layouts/_sidebar');
?>
<div class="rule-item-view">
<h1><?php echo Html::encode($this->title); ?></h1>
<p>
<?php echo Html::a(Yii::t('yii2mod.rbac', 'Update'), ['update', 'id' => $model->name], ['class' => 'btn btn-primary']); ?>
<?php echo Html::a(Yii::t('yii2mod.rbac', 'Delete'), ['delete', 'id' => $model->name], [
'class' => 'btn btn-danger',
'data-confirm' => Yii::t('yii2mod.rbac', 'Are you sure to delete this item?'),
'data-method' => 'post',
]); ?>
</p>
<?php echo DetailView::widget([
'model' => $model,
'attributes' => [
'name',
'className',
],
]); ?>
</div>