Commit 57e9745b752234054ed4503c1cae299afa0abb7a
1 parent
45f61208
test
Showing
4 changed files
with
21 additions
and
18 deletions
Show diff stats
backend/views/termin/index.php
| 1 | <?php | 1 | <?php |
| 2 | - | ||
| 3 | -use yii\helpers\Html; | 2 | + use backend\models\Termin; |
| 3 | + use yii\helpers\Html; | ||
| 4 | use yii\grid\GridView; | 4 | use yii\grid\GridView; |
| 5 | 5 | ||
| 6 | /* @var $this yii\web\View */ | 6 | /* @var $this yii\web\View */ |
| @@ -32,8 +32,11 @@ $this->params['breadcrumbs'][] = $this->title; | @@ -32,8 +32,11 @@ $this->params['breadcrumbs'][] = $this->title; | ||
| 32 | 'attribute' => 'termin_parent_title', | 32 | 'attribute' => 'termin_parent_title', |
| 33 | 'value' => 'terminStructures.parent.terminLangs.termin_title', | 33 | 'value' => 'terminStructures.parent.terminLangs.termin_title', |
| 34 | 'content' => function($model, $key, $index, $column) { | 34 | 'content' => function($model, $key, $index, $column) { |
| 35 | - var_dump($model); | ||
| 36 | - return 1; //$model->terminStructures[0]->parent->terminLangs[0]->termin_title; | 35 | + if($model->terminStructures[0]->parent instanceof Termin) { |
| 36 | + return $model->terminStructures[0]->parent->terminLangs[0]->termin_title; | ||
| 37 | + } else { | ||
| 38 | + return NULL; | ||
| 39 | + } | ||
| 37 | } | 40 | } |
| 38 | ], | 41 | ], |
| 39 | 'termin_name', | 42 | 'termin_name', |
common/config/main-local.php
| @@ -7,10 +7,10 @@ return [ | @@ -7,10 +7,10 @@ return [ | ||
| 7 | 'username' => 'test33', | 7 | 'username' => 'test33', |
| 8 | 'password' => 'E4q2N7i9', | 8 | 'password' => 'E4q2N7i9', |
| 9 | 'schemaMap' => [ | 9 | 'schemaMap' => [ |
| 10 | - 'pgsql'=> [ | ||
| 11 | - 'class'=>'yii\db\pgsql\Schema', | ||
| 12 | - 'defaultSchema' => 'public' | ||
| 13 | - ] | 10 | + 'pgsql'=> [ |
| 11 | + 'class'=>'yii\db\pgsql\Schema', | ||
| 12 | + 'defaultSchema' => 'public' | ||
| 13 | + ] | ||
| 14 | ], | 14 | ], |
| 15 | ], | 15 | ], |
| 16 | 'mailer' => [ | 16 | 'mailer' => [ |
common/config/main.php
| @@ -26,7 +26,7 @@ return [ | @@ -26,7 +26,7 @@ return [ | ||
| 26 | 'rules'=>[ | 26 | 'rules'=>[ |
| 27 | '<module:\w+>/<controller:\w+>/<action:(\w|-)+>' => '<module>/<controller>/<action>', | 27 | '<module:\w+>/<controller:\w+>/<action:(\w|-)+>' => '<module>/<controller>/<action>', |
| 28 | '<module:\w+>/<controller:\w+>/<action:(\w|-)+>/<id:\d+>' => '<module>/<controller>/<action>', | 28 | '<module:\w+>/<controller:\w+>/<action:(\w|-)+>/<id:\d+>' => '<module>/<controller>/<action>', |
| 29 | - ] | 29 | + ], |
| 30 | ], | 30 | ], |
| 31 | 'request' => [ | 31 | 'request' => [ |
| 32 | 'class' => 'common\components\LangRequest' | 32 | 'class' => 'common\components\LangRequest' |
common/modules/blog/views/ajax/_article_form.php
| @@ -10,29 +10,29 @@ if(empty($form)) { | @@ -10,29 +10,29 @@ if(empty($form)) { | ||
| 10 | ?> | 10 | ?> |
| 11 | <div role="" class="tab-pane active ajax-loaded" id="<?=$widget_id?>-<?=$model->language_id?>"> | 11 | <div role="" class="tab-pane active ajax-loaded" id="<?=$widget_id?>-<?=$model->language_id?>"> |
| 12 | 12 | ||
| 13 | - <?= (new ActiveField(['model' => $model, 'attribute' => "[$model->language_id]language_id"]))->label(false)->hiddenInput(['value' => $model->language_id]) ?> | 13 | + <?= (new ActiveField(['model' => $model, 'attribute' => "[$model->language_id]language_id", 'form' => $form]))->label(false)->hiddenInput(['value' => $model->language_id]) ?> |
| 14 | 14 | ||
| 15 | <?= (new ActiveField(['model' => $model, 'attribute' => "[$model->language_id]text", 'form' => $form]))->widget(CKEditor::className(),['editorOptions' => [ 'preset' => 'full', 'inline' => false, ]]); ?> | 15 | <?= (new ActiveField(['model' => $model, 'attribute' => "[$model->language_id]text", 'form' => $form]))->widget(CKEditor::className(),['editorOptions' => [ 'preset' => 'full', 'inline' => false, ]]); ?> |
| 16 | 16 | ||
| 17 | <?= (new ActiveField(['model' => $model, 'attribute' => "[$model->language_id]preview", 'form' => $form]))->widget(CKEditor::className(),['editorOptions' => [ 'preset' => 'full', 'inline' => false, ]]); ?> | 17 | <?= (new ActiveField(['model' => $model, 'attribute' => "[$model->language_id]preview", 'form' => $form]))->widget(CKEditor::className(),['editorOptions' => [ 'preset' => 'full', 'inline' => false, ]]); ?> |
| 18 | 18 | ||
| 19 | - <?= (new ActiveField(['model' => $model, 'attribute' => "[$model->language_id]seo_url"]))->textInput() ?> | 19 | + <?= (new ActiveField(['model' => $model, 'attribute' => "[$model->language_id]seo_url", 'form' => $form]))->textInput() ?> |
| 20 | 20 | ||
| 21 | - <?= (new ActiveField(['model' => $model, 'attribute' => "[$model->language_id]name"]))->textInput() ?> | 21 | + <?= (new ActiveField(['model' => $model, 'attribute' => "[$model->language_id]name", 'form' => $form]))->textInput() ?> |
| 22 | 22 | ||
| 23 | - <?= (new ActiveField(['model' => $model, 'attribute' => "[$model->language_id]meta_title"]))->textInput() ?> | 23 | + <?= (new ActiveField(['model' => $model, 'attribute' => "[$model->language_id]meta_title", 'form' => $form]))->textInput() ?> |
| 24 | 24 | ||
| 25 | - <?= (new ActiveField(['model' => $model, 'attribute' => "[$model->language_id]meta_descr"]))->textarea() ?> | 25 | + <?= (new ActiveField(['model' => $model, 'attribute' => "[$model->language_id]meta_descr", 'form' => $form]))->textarea() ?> |
| 26 | 26 | ||
| 27 | - <?= (new ActiveField(['model' => $model, 'attribute' => "[$model->language_id]meta_keyword"]))->textInput() ?> | 27 | + <?= (new ActiveField(['model' => $model, 'attribute' => "[$model->language_id]meta_keyword", 'form' => $form]))->textInput() ?> |
| 28 | 28 | ||
| 29 | - <?= (new ActiveField(['model' => $model, 'attribute' => "[$model->language_id]h1_tag"]))->textInput() ?> | 29 | + <?= (new ActiveField(['model' => $model, 'attribute' => "[$model->language_id]h1_tag", 'form' => $form]))->textInput() ?> |
| 30 | 30 | ||
| 31 | - <?= (new ActiveField(['model' => $model, 'attribute' => "[$model->language_id]tag"]))->textInput() ?> | 31 | + <?= (new ActiveField(['model' => $model, 'attribute' => "[$model->language_id]tag", 'form' => $form]))->textInput() ?> |
| 32 | 32 | ||
| 33 | </div> | 33 | </div> |
| 34 | <?php | 34 | <?php |
| 35 | - if($new_form) { | 35 | + if(isset($new_form) && $new_form === true) { |
| 36 | $form->end(); | 36 | $form->end(); |
| 37 | } | 37 | } |
| 38 | ?> | 38 | ?> |