Commit f7a859f5 by Alexander Makarov

Merge pull request #2719 from klevron/2712

Fix #2712
parents 466e2600 0b92f270
...@@ -7,6 +7,7 @@ Yii Framework 2 gii extension Change Log ...@@ -7,6 +7,7 @@ Yii Framework 2 gii extension Change Log
- Bug #1405: fixed disambiguation of relation names generated by gii (qiangxue) - Bug #1405: fixed disambiguation of relation names generated by gii (qiangxue)
- Bug #1904: Fixed autocomplete to work with underscore inputs "_" (tonydspaniard) - Bug #1904: Fixed autocomplete to work with underscore inputs "_" (tonydspaniard)
- Bug #2298: Fixed the bug that Gii controller generator did not allow digit in the controller ID (qiangxue) - Bug #2298: Fixed the bug that Gii controller generator did not allow digit in the controller ID (qiangxue)
- Bug #2712: Fixed missing id in code file preview url (klevron)
- Bug: fixed controller in crud template to avoid returning query in findModel() (cebe) - Bug: fixed controller in crud template to avoid returning query in findModel() (cebe)
- Enh #1624: generate rules for unique indexes (lucianobaraglia) - Enh #1624: generate rules for unique indexes (lucianobaraglia)
- Enh #1818: Do not display checkbox column if all rows are empty (johonunu) - Enh #1818: Do not display checkbox column if all rows are empty (johonunu)
......
...@@ -62,6 +62,7 @@ foreach ($generator->templates as $name => $path) { ...@@ -62,6 +62,7 @@ foreach ($generator->templates as $name => $path) {
]); ]);
} elseif (isset($files)) { } elseif (isset($files)) {
echo $this->render('view/files', [ echo $this->render('view/files', [
'id' => $id,
'generator' => $generator, 'generator' => $generator,
'files' => $files, 'files' => $files,
'answers' => $answers, 'answers' => $answers,
......
...@@ -46,7 +46,7 @@ use yii\gii\CodeFile; ...@@ -46,7 +46,7 @@ use yii\gii\CodeFile;
?> ?>
<tr class="<?= "$file->operation $trClass" ?>"> <tr class="<?= "$file->operation $trClass" ?>">
<td class="file"> <td class="file">
<?= Html::a(Html::encode($file->getRelativePath()), ['preview', 'file' => $file->id], ['class' => 'preview-code', 'data-title' => $file->getRelativePath()]) ?> <?= Html::a(Html::encode($file->getRelativePath()), ['preview', 'id'=>$id, 'file' => $file->id], ['class' => 'preview-code', 'data-title' => $file->getRelativePath()]) ?>
<?php if ($file->operation === CodeFile::OP_OVERWRITE): ?> <?php if ($file->operation === CodeFile::OP_OVERWRITE): ?>
<?= Html::a('diff', ['diff', 'file' => $file->id], ['class' => 'diff-code label label-warning', 'data-title' => $file->getRelativePath()]) ?> <?= Html::a('diff', ['diff', 'file' => $file->id], ['class' => 'diff-code label label-warning', 'data-title' => $file->getRelativePath()]) ?>
<?php endif; ?> <?php endif; ?>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment