diff --git a/backend/config/main.php b/backend/config/main.php index 5520950..3ea1918 100644 --- a/backend/config/main.php +++ b/backend/config/main.php @@ -16,7 +16,7 @@ return [ 'bootstrap' => ['log'], 'modules' => [ 'permit' => [ - 'class' => 'common\components\developeruz\db_rbac\Yii2DbRbac', + 'class' => 'developeruz\db_rbac\Yii2DbRbac', 'params' => [ 'userClass' => 'common\models\User' ] diff --git a/backend/controllers/MenuLocationController.php b/backend/controllers/MenuLocationController.php new file mode 100644 index 0000000..2e3121a --- /dev/null +++ b/backend/controllers/MenuLocationController.php @@ -0,0 +1,121 @@ + [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'delete' => ['post'], + ], + ], + ]; + } + + /** + * Lists all MenuLocation models. + * @return mixed + */ + public function actionIndex() + { + $searchModel = new MenuSearchLocation(); + $dataProvider = $searchModel->search(Yii::$app->request->queryParams); + + return $this->render('index', [ + 'searchModel' => $searchModel, + 'dataProvider' => $dataProvider, + ]); + } + + /** + * Displays a single MenuLocation model. + * @param integer $id + * @return mixed + */ + public function actionView($id) + { + return $this->render('view', [ + 'model' => $this->findModel($id), + ]); + } + + /** + * Creates a new MenuLocation model. + * If creation is successful, the browser will be redirected to the 'view' page. + * @return mixed + */ + public function actionCreate() + { + $model = new MenuLocation(); + + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['view', 'id' => $model->menu_location_id]); + } else { + return $this->render('create', [ + 'model' => $model, + ]); + } + } + + /** + * Updates an existing MenuLocation model. + * If update is successful, the browser will be redirected to the 'view' page. + * @param integer $id + * @return mixed + */ + public function actionUpdate($id) + { + $model = $this->findModel($id); + + if ($model->load(Yii::$app->request->post()) && $model->save()) { + return $this->redirect(['view', 'id' => $model->menu_location_id]); + } else { + return $this->render('update', [ + 'model' => $model, + ]); + } + } + + /** + * Deletes an existing MenuLocation model. + * If deletion is successful, the browser will be redirected to the 'index' page. + * @param integer $id + * @return mixed + */ + public function actionDelete($id) + { + $this->findModel($id)->delete(); + + return $this->redirect(['index']); + } + + /** + * Finds the MenuLocation model based on its primary key value. + * If the model is not found, a 404 HTTP exception will be thrown. + * @param integer $id + * @return MenuLocation the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($id) + { + if (($model = MenuLocation::findOne($id)) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } +} diff --git a/backend/controllers/TerminController.php b/backend/controllers/TerminController.php new file mode 100644 index 0000000..435a5d1 --- /dev/null +++ b/backend/controllers/TerminController.php @@ -0,0 +1,161 @@ + [ + 'class' => AccessControl::className(), + 'except' => ['login', 'error', 'index', 'create', 'update'], + 'rules' => [ + [ + 'allow' => true, + 'roles' => ['admin'] + ], + ], + ], + 'verbs' => [ + 'class' => VerbFilter::className(), + 'actions' => [ + 'logout' => ['post'], + 'delete-req' => ['post'] + ], + ], + ]; + } + + /** + * Lists all Termin models. + * @return mixed + */ + public function actionIndex() + { + $searchModel = new TerminSearch(); + $dataProvider = $searchModel->search(Yii::$app->request->queryParams); + + return $this->render('index', [ + 'searchModel' => $searchModel, + 'dataProvider' => $dataProvider, + ]); + } + + /** + * Displays a single Termin model. + * @param integer $id + * @return mixed + */ + public function actionView($id) + { + return $this->render('view', [ + 'model' => $this->findModel($id), + ]); + } + + /** + * Creates a new Termin model. + * If creation is successful, the browser will be redirected to the 'view' page. + * @return mixed + */ + public function actionCreate() + { + $model = new Termin(); + $model_lang = new TerminLang(); + + if ($model->load(Yii::$app->request->post()) + && $model_lang->load(Yii::$app->request->post())) + { + $model->save(); + $model_lang->termin_id = $model->termin_id; + $model_lang->save(); + + return $this->redirect(['view', 'id' => $model->termin_id]); + } + else + { + return $this->render('create', [ + 'model' => $model, + 'model_lang' => $model_lang, + ]); + } + } + + /** + * Updates an existing Termin model. + * If update is successful, the browser will be redirected to the 'view' page. + * @param integer $id + * @return mixed + */ + public function actionUpdate($id) + { + $model = $this->findModel($id); + $model_lang = TerminLang::findOne($id); + $model_pid = TerminStructure::findOne($id)->getRelation('terminPid')->one(); + + //var_dump(Yii::$app->request->post()); + //var_dump($model_pid->termin->termin_id); die; + + if ($model->load(Yii::$app->request->post()) + && $model_lang->load(Yii::$app->request->post()) + && $model_pid->load(Yii::$app->request->post()) + ) + { + $model->save(); + $model_lang->save(); + $model_pid->termin_pid = $model_pid->termin->termin_id; + + return $this->redirect(['view', 'id' => $model->termin_id]); + } + else + { + return $this->render('update', [ + 'model' => $model, + 'model_lang' => $model_lang, + 'model_pid' => $model_pid, + ]); + } + } + + /** + * Deletes an existing Termin model. + * If deletion is successful, the browser will be redirected to the 'index' page. + * @param integer $id + * @return mixed + */ + public function actionDelete($id) + { + $this->findModel($id)->delete(); + + return $this->redirect(['index']); + } + + /** + * Finds the Termin model based on its primary key value. + * If the model is not found, a 404 HTTP exception will be thrown. + * @param integer $id + * @return Termin the loaded model + * @throws NotFoundHttpException if the model cannot be found + */ + protected function findModel($id) + { + if (($model = Termin::findOne($id)) !== null) { + return $model; + } else { + throw new NotFoundHttpException('The requested page does not exist.'); + } + } +} diff --git a/backend/models/Menu.php b/backend/models/Menu.php new file mode 100644 index 0000000..8cdbddd --- /dev/null +++ b/backend/models/Menu.php @@ -0,0 +1,97 @@ + 250] + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'menu_id' => Yii::t('app', 'Menu ID'), + 'menu_pid' => Yii::t('app', 'Menu Pid'), + 'level' => Yii::t('app', 'Level'), + 'termin_id' => Yii::t('app', 'Termin ID'), + 'show' => Yii::t('app', 'Show'), + 'is_open' => Yii::t('app', 'Is Open'), + 'menu_location_id' => Yii::t('app', 'Menu Location ID'), + 'sortorder' => Yii::t('app', 'Sortorder'), + 'name' => Yii::t('app', 'Name'), + 'url' => Yii::t('app', 'Url'), + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getTermin() + { + return $this->hasOne(Termin::className(), ['termin_id' => 'termin_id']); + } + + public function getMenuList ($location_name) + { + return yii::$app->db->createCommand(' + SELECT + menu.menu_id, menu.menu_pid, menu.level, + termin_lang.termin_title, termin_lang.termin_alias + FROM menu + INNER JOIN menu_location ON menu_location.menu_location_id = menu.menu_location_id + AND menu_location.menu_location_name = \''.$location_name.'\' + INNER JOIN termin ON termin.termin_id = menu.termin_id + INNER JOIN termin_lang ON termin_lang.termin_id = menu.termin_id + AND termin_lang.lang_id = '.Yii::$app->params['lang_id'].' + ORDER BY menu.level ASC, menu.sortorder ASC + ')->queryAll(); +/* + return $this->find() + ->selectOption('termin_lang.termin_title') + ->from('menu') + ->join( + 'INNER JOIN', + 'termin_lang.termin_id = menu.termin_id', + ['lang_id' => yii::$app->params['lang_id']]) + ->all(); + */ + } +} diff --git a/backend/models/MenuLocation.php b/backend/models/MenuLocation.php new file mode 100644 index 0000000..3c442c2 --- /dev/null +++ b/backend/models/MenuLocation.php @@ -0,0 +1,64 @@ + 250] + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'menu_location_id' => Yii::t('app', 'Menu Location ID'), + 'menu_location_name' => Yii::t('app', 'Menu Location Name'), + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getMenuLocationLangs() + { + return $this->hasMany(MenuLocationLang::className(), ['menu_location_id' => 'menu_location_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getLangs() + { + return $this->hasMany(Language::className(), ['language_id' => 'lang_id'])->viaTable('menu_location_lang', ['menu_location_id' => 'menu_location_id']); + } +} diff --git a/backend/models/MenuLocationLang.php b/backend/models/MenuLocationLang.php new file mode 100644 index 0000000..02e310d --- /dev/null +++ b/backend/models/MenuLocationLang.php @@ -0,0 +1,66 @@ + 250] + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'menu_location_id' => Yii::t('app', 'Menu Location ID'), + 'menu_location_title' => Yii::t('app', 'Menu Location Title'), + 'lang_id' => Yii::t('app', 'Lang ID'), + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getLang() + { + return $this->hasOne(Language::className(), ['language_id' => 'lang_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getMenuLocation() + { + return $this->hasOne(MenuLocation::className(), ['menu_location_id' => 'menu_location_id']); + } +} diff --git a/backend/models/MenuLocationSearch.php b/backend/models/MenuLocationSearch.php new file mode 100644 index 0000000..a7d42e0 --- /dev/null +++ b/backend/models/MenuLocationSearch.php @@ -0,0 +1,66 @@ + $query, + ]); + + $this->load($params); + + if (!$this->validate()) { + // uncomment the following line if you do not want to return any records when validation fails + // $query->where('0=1'); + return $dataProvider; + } + + $query->andFilterWhere([ + 'menu_location_id' => $this->menu_location_id, + ]); + + $query->andFilterWhere(['like', 'menu_location_name', $this->menu_location_name]); + + return $dataProvider; + } +} diff --git a/backend/models/MenuSearch.php b/backend/models/MenuSearch.php new file mode 100644 index 0000000..bb61ec0 --- /dev/null +++ b/backend/models/MenuSearch.php @@ -0,0 +1,74 @@ + $query, + ]); + + $this->load($params); + + if (!$this->validate()) { + // uncomment the following line if you do not want to return any records when validation fails + // $query->where('0=1'); + return $dataProvider; + } + + $query->andFilterWhere([ + 'menu_id' => $this->menu_id, + 'menu_pid' => $this->menu_pid, + 'level' => $this->level, + 'termin_id' => $this->termin_id, + 'show' => $this->show, + 'is_open' => $this->is_open, + 'menu_location_id' => $this->menu_location_id, + 'sortorder' => $this->sortorder, + ]); + + $query->andFilterWhere(['like', 'name', $this->name]) + ->andFilterWhere(['like', 'url', $this->url]); + + return $dataProvider; + } +} diff --git a/backend/models/Termin.php b/backend/models/Termin.php new file mode 100644 index 0000000..e7064da --- /dev/null +++ b/backend/models/Termin.php @@ -0,0 +1,184 @@ + 250], + [['termin_name'], 'string', 'max' => 250] + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'termin_id' => Yii::t('app', 'termin'), + 'termin_name' => Yii::t('app', 'name').' (SYSTEM NAME)', + 'is_book' => Yii::t('app', 'book'), + ]; + } + + /** + * Выполняет поиск по параметрам + * @param array $param принимает [termin_id, lang_id, return_one, return_field, show_all] + * @return array one | array all | string значение масива + */ + public function finInfo (array $params = []) + { + Tools::ifNotExist ($params, array ( + 'termin_id' => false, + 'termin_pid' => false, + 'lang_id' => Yii::$app->params['lang_id'], + 'return_one' => false, + 'return_field' => false, + 'show_all' => false, + 'to_array' => true, + 'pid_title' => false, + )); + + $WHERE = $SELECT = array (); + + $model = new self(); + + $SELECT[] = 'termin.*'; + $query = $model->find(); + + if ($params['termin_id']) + { + $WHERE['termin.termin_id'] = $params['termin_id']; + } + + // перевод + $SELECT[] = 'termin_lang.*'; + $query->join( + 'INNER JOIN', 'termin_lang', + 'termin.termin_id = termin_lang.termin_id' + ); + + if ($params['lang_id']) + { + $WHERE['termin_lang.lang_id'] = $params['lang_id']; + } + + // структура + $SELECT[] = 'termin_structure.*'; + $query->join( + 'INNER JOIN', 'termin_structure', + 'termin.termin_id = termin_structure.termin_id' + ); + + if ($params['termin_pid'] !== false) + { + $WHERE['termin_structure.termin_pid'] = $params['termin_pid']; + } + + if ($params['pid_title']) + { + $SELECT[] = 'termin_pid_lang.termin_title as termin_pid_title'; + $query->join( + 'LEFT JOIN', 'termin_lang as termin_pid_lang', + 'termin_pid_lang.termin_id = termin_structure.termin_pid' + ); + } + + // SELECT + if (! empty ($SELECT)) + { + $query->select($SELECT); + } + + // WHERE + if (! empty ($WHERE)) + { + $query->where($WHERE); + } + + if ($params['to_array']) + { + $query = $query->asArray(); + } + + if ($params['return_one'] || $params['return_field']) + { + + $result = $params['return_field'] ? $query->one($params['return_field']) : $query->one(); + } + else + { + $result = $query->all(); + } + + return $result; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getMenus() + { + return $this->hasMany(Menu::className(), ['termin_id' => 'termin_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getTerminLangs() + { + return $this->hasMany(TerminLang::className(), ['termin_id' => 'termin_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getLangs() + { + return $this->hasMany(Language::className(), ['language_id' => 'lang_id']) + ->viaTable('termin_lang', ['termin_id' => 'termin_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getTerminStructures() + { + return $this->hasMany(TerminStructure::className(), ['termin_id' => 'termin_id']); + } + +} diff --git a/backend/models/TerminLang.php b/backend/models/TerminLang.php new file mode 100644 index 0000000..911a353 --- /dev/null +++ b/backend/models/TerminLang.php @@ -0,0 +1,68 @@ + 250] + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'termin_id' => Yii::t('app', 'Termin ID'), + 'lang_id' => Yii::t('app', 'Lang ID'), + 'termin_title' => Yii::t('app', 'Termin Title'), + 'termin_alias' => Yii::t('app', 'Termin Alias'), + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getLang() + { + return $this->hasOne(Language::className(), ['language_id' => 'lang_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getTermin() + { + return $this->hasOne(Termin::className(), ['termin_id' => 'termin_id']); + } +} diff --git a/backend/models/TerminRelation.php b/backend/models/TerminRelation.php new file mode 100644 index 0000000..8971a80 --- /dev/null +++ b/backend/models/TerminRelation.php @@ -0,0 +1,43 @@ + Yii::t('app', 'Termin ID'), + 'termin_id_related' => Yii::t('app', 'Termin Id Related'), + ]; + } +} diff --git a/backend/models/TerminSearch.php b/backend/models/TerminSearch.php new file mode 100644 index 0000000..fe13c3a --- /dev/null +++ b/backend/models/TerminSearch.php @@ -0,0 +1,67 @@ + $query, + ]); + + $this->load($params); + + if (!$this->validate()) { + // uncomment the following line if you do not want to return any records when validation fails + // $query->where('0=1'); + return $dataProvider; + } + + $query->andFilterWhere([ + 'termin_id' => $this->termin_id, + 'is_book' => $this->is_book, + ]); + + $query->andFilterWhere(['like', 'termin_name', $this->termin_name]); + + return $dataProvider; + } +} diff --git a/backend/models/TerminStructure.php b/backend/models/TerminStructure.php new file mode 100644 index 0000000..2b3c5c5 --- /dev/null +++ b/backend/models/TerminStructure.php @@ -0,0 +1,62 @@ + Yii::t('app', 'Termin ID'), + 'termin_pid' => Yii::t('app', 'Termin Pid'), + ]; + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getTermin() + { + return $this->hasOne(Termin::className(), ['termin_id' => 'termin_id']); + } + + /** + * @return \yii\db\ActiveQuery + */ + public function getTerminPid() + { + return $this->hasMany(TerminLang::className(), ['termin_id' => 'termin_pid']); + } +} diff --git a/backend/views/menu-location/_form.php b/backend/views/menu-location/_form.php new file mode 100644 index 0000000..2d51e5c --- /dev/null +++ b/backend/views/menu-location/_form.php @@ -0,0 +1,27 @@ + + + diff --git a/backend/views/menu-location/_search.php b/backend/views/menu-location/_search.php new file mode 100644 index 0000000..898e4db --- /dev/null +++ b/backend/views/menu-location/_search.php @@ -0,0 +1,29 @@ + + + diff --git a/backend/views/menu-location/create.php b/backend/views/menu-location/create.php new file mode 100644 index 0000000..05abb25 --- /dev/null +++ b/backend/views/menu-location/create.php @@ -0,0 +1,21 @@ +title = Yii::t('app', 'Create Menu Location'); +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Menu Locations'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> + diff --git a/backend/views/menu-location/index.php b/backend/views/menu-location/index.php new file mode 100644 index 0000000..570e058 --- /dev/null +++ b/backend/views/menu-location/index.php @@ -0,0 +1,43 @@ +title = Yii::t('app', 'Menu Locations'); +$this->params['breadcrumbs'][] = $this->title; +?> + diff --git a/backend/views/menu-location/update.php b/backend/views/menu-location/update.php new file mode 100644 index 0000000..2b34243 --- /dev/null +++ b/backend/views/menu-location/update.php @@ -0,0 +1,23 @@ +title = Yii::t('app', 'Update {modelClass}: ', [ + 'modelClass' => 'Menu Location', +]) . ' ' . $model->menu_location_id; +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Menu Locations'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => $model->menu_location_id, 'url' => ['view', 'id' => $model->menu_location_id]]; +$this->params['breadcrumbs'][] = Yii::t('app', 'Update'); +?> + diff --git a/backend/views/menu-location/view.php b/backend/views/menu-location/view.php new file mode 100644 index 0000000..507515c --- /dev/null +++ b/backend/views/menu-location/view.php @@ -0,0 +1,36 @@ +title = $model->menu_location_id; +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Menu Locations'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> + diff --git a/backend/views/termin/_form.php b/backend/views/termin/_form.php new file mode 100644 index 0000000..cc088ef --- /dev/null +++ b/backend/views/termin/_form.php @@ -0,0 +1,50 @@ + + +
+ + + + field($model_pid->termin, 'termin_pid')->widget(Select2::classname(), + [ + 'data' => ArrayHelper::map((new Termin)->finInfo([ + 'show_all' => true, + ]), + 'termin_id', + 'termin_title' + ), + 'options' => ['placeholder' => 'Select a state ...'], + 'pluginOptions' => [ + 'allowClear' => true + ], + ]); + ?> + + field($model, 'termin_name')->textInput(['maxlength' => true]) ?> + + field($model_lang, 'termin_title')->textInput() ?> + + field($model_lang, 'termin_alias')->textInput() ?> + + ($model_lang->lang_id != 0 ? $model_lang->lang_id : Yii::$app->params['lang_id']), + ]) ?> + +
+ isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> +
+ + + +
diff --git a/backend/views/termin/_search.php b/backend/views/termin/_search.php new file mode 100644 index 0000000..1ff1d09 --- /dev/null +++ b/backend/views/termin/_search.php @@ -0,0 +1,31 @@ + + + diff --git a/backend/views/termin/create.php b/backend/views/termin/create.php new file mode 100644 index 0000000..ce04b41 --- /dev/null +++ b/backend/views/termin/create.php @@ -0,0 +1,22 @@ +title = Yii::t('app', 'Create').' '.Yii::t('app', 'termin'); +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Termins'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + 'model_lang' => $model_lang, + ]) ?> + +
diff --git a/backend/views/termin/index.php b/backend/views/termin/index.php new file mode 100644 index 0000000..099988c --- /dev/null +++ b/backend/views/termin/index.php @@ -0,0 +1,40 @@ +title = Yii::t('app', 'termin'); +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ render('_search', ['model' => $searchModel]); ?> + +

+ 'btn btn-success']) ?> +

+ + $dataProvider, + 'filterModel' => $searchModel, + 'columns' => [ + ['class' => 'yii\grid\SerialColumn'], + [ + 'attribute' => Yii::t('app', 'termin'), + 'value' => function ($model) { + return $model->terminLangs[0]->termin_title; + }, + ], + 'termin_name', + 'is_book', + + ['class' => 'yii\grid\ActionColumn'], + ], + ]); ?> + +
diff --git a/backend/views/termin/update.php b/backend/views/termin/update.php new file mode 100644 index 0000000..4b2e1e4 --- /dev/null +++ b/backend/views/termin/update.php @@ -0,0 +1,26 @@ +title = Yii::t('app', 'Update {modelClass}: ', [ + 'modelClass' => 'Termin', +]) . ' ' . $model->termin_id; +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Termins'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => $model->termin_id, 'url' => ['view', 'id' => $model->termin_id]]; +$this->params['breadcrumbs'][] = Yii::t('app', 'Update'); +?> +
+ +

title) ?>

+ + render('_form', [ + 'model' => $model, + 'model_lang' => $model_lang, + 'model_pid' => $model_pid, + ]) ?> + + +
diff --git a/backend/views/termin/view.php b/backend/views/termin/view.php new file mode 100644 index 0000000..acc4659 --- /dev/null +++ b/backend/views/termin/view.php @@ -0,0 +1,37 @@ +title = $model->termin_id; +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Termins'), 'url' => ['index']]; +$this->params['breadcrumbs'][] = $this->title; +?> +
+ +

title) ?>

+ +

+ $model->termin_id], ['class' => 'btn btn-primary']) ?> + $model->termin_id], [ + 'class' => 'btn btn-danger', + 'data' => [ + 'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'), + 'method' => 'post', + ], + ]) ?> +

+ + $model, + 'attributes' => [ + 'termin_id', + 'termin_name', + 'is_book', + ], + ]) ?> + +
diff --git a/common/config/main.php b/common/config/main.php index 3e4e509..8cf90ba 100644 --- a/common/config/main.php +++ b/common/config/main.php @@ -2,8 +2,8 @@ return [ 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor', 'modules' => [ - 'permit' => [ - 'class' => 'common\components\developeruz\db_rbac\Yii2DbRbac', + 'permit' => [ + 'class' => 'developeruz\db_rbac\Yii2DbRbac', 'params' => [ 'userClass' => 'common\models\User' ] diff --git a/common/translation/uk/app.php b/common/translation/uk/app.php new file mode 100644 index 0000000..e69d796 --- /dev/null +++ b/common/translation/uk/app.php @@ -0,0 +1,27 @@ + 'Сторінка', + 'date_add' => 'Дата додання', + 'template' => 'Шаблон', + 'image' => 'Картинка', + 'title' => 'Заголовок', + 'meta_title' => 'Meta Title', + 'meta_description' => 'Meta Description', + 'text' => 'Текст', + 'page_alias' => 'alias', + 'lang_id' => 'ID мови', + 'common' => 'Загальне', + 'lang' => 'Мовні змінні', + 'termin' => 'Термін', + 'related' => 'Пов`язані', + 'menu' => 'Меню', + 'location' => 'Розташування', + 'book' => 'Справочник', + + // Дима +]; -- libgit2 0.21.4