diff --git a/crud/default/views/_expand.php b/crud/default/views/_expand.php index e31a1a6..749256f 100644 --- a/crud/default/views/_expand.php +++ b/crud/default/views/_expand.php @@ -5,6 +5,8 @@ use yii\helpers\Inflector; use yii\helpers\StringHelper; + +$pk = empty($generator->tableSchema->primaryKey) ? $generator->tableSchema->getColumnNames()[0] : $generator->tableSchema->primaryKey[0]; ?> @@ -14,6 +16,7 @@ $items = [ [ 'label' => ' '. Html::encode(generateString(StringHelper::basename($generator->modelClass)) ?>), + 'options' => ['id' => "tab_modelClass) ?>_{$model->}"], 'content' => $this->render('_detail', [ 'model' => $model, ]), @@ -22,6 +25,7 @@ skippedRelations)): ?> [ 'label' => ' '. Html::encode(generateString(Inflector::camel2words($rel[1])) ?>), + 'options' => ['id' => "tab__{$model->}"], 'content' => $this->render('_data', [ 'model' => $model, 'row' => $model->, @@ -30,6 +34,7 @@ [ 'label' => ' '. Html::encode(generateString(Inflector::camel2words($rel[1])) ?>), + 'options' => ['id' => "tab__{$model->}"], 'content' => $this->render('_data', [ 'model' => $model-> ]),