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
- Bug #1405: fixed disambiguation of relation names generated by gii (qiangxue)
- 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 #2712: Fixed missing id in code file preview url (klevron)
- Bug: fixed controller in crud template to avoid returning query in findModel() (cebe)
- Enh #1624: generate rules for unique indexes (lucianobaraglia)
- Enh #1818: Do not display checkbox column if all rows are empty (johonunu)
......
......@@ -62,6 +62,7 @@ foreach ($generator->templates as $name => $path) {
]);
} elseif (isset($files)) {
echo $this->render('view/files', [
'id' => $id,
'generator' => $generator,
'files' => $files,
'answers' => $answers,
......
......@@ -46,7 +46,7 @@ use yii\gii\CodeFile;
?>
<tr class="<?= "$file->operation $trClass" ?>">
<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): ?>
<?= Html::a('diff', ['diff', 'file' => $file->id], ['class' => 'diff-code label label-warning', 'data-title' => $file->getRelativePath()]) ?>
<?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