Skip to content

Commit

Permalink
Changed template for view related so that it is no longer in an if block
Browse files Browse the repository at this point in the history
  • Loading branch information
jamielsharief committed Jul 11, 2021
1 parent 63d0420 commit 7fc3da2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog


## [3.8.0] - 2021-07-11

### Fixed

- Fixed ConcenernControllerTest template switched to public method
- Fixed ControllerTest template switched to public method
- Fixed EntityTest template switched to public method
- Fixed ListenerTest template switched to public method
- Fixed MailBoxTest template switched to public method
- Fixed MiddlewareTeest template switched to public method

## Changed

- Changed template for view related so that it is no longer in an if block

## [3.7.1] - 2021-02-24

### Fixed
Expand Down
8 changes: 2 additions & 6 deletions templates/scaffold/view_related.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,17 @@
</div>
<h4><?= __('%pluralHuman%') ?></h4>
</div>

<?php if (!empty($%currentModel%->%pluralName%)): ?>

<table class="table">
<tr>

<RECORDBLOCK>
<th><?= __('%field%') ?></th>
</RECORDBLOCK>
<th class="actions"><?= __('Actions') ?></th>
</tr>
<?php foreach ($%currentModel%->%pluralName% as $%singularName%): ?>
<tr>

<RECORDBLOCK>
<RECORDBLOCK>
<td><?= h($%singularName%->%field%) ?></td>
</RECORDBLOCK>
<td class="actions">
Expand All @@ -31,5 +28,4 @@
</tr>
<?php endforeach; ?>
</table>
<?php endif; ?>
</div>
4 changes: 3 additions & 1 deletion tests/TestCase/Console/Command/GenerateCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ public function testGenerateScaffold()
$this->assertFileHash('c8d3d6cd1474cee688f8173d1a640b08', APP . DS . 'Http' . DS . 'View' . DS . 'Bookmarks' . DS . 'index.ctp');
unlink(APP . DS . 'Http' . DS . 'View' . DS . 'Bookmarks' . DS . 'index.ctp');

$this->assertFileHash('d302f7dc164a50552a336aed242ba0a6', APP . DS . 'Http' . DS . 'View' . DS . 'Bookmarks' . DS . 'view.ctp');
$this->assertFileHash('0e2366d6811e52834474c99f52208e4c', APP . DS . 'Http' . DS . 'View' . DS . 'Bookmarks' . DS . 'view.ctp');

print(file_get_contents(APP . DS . 'Http' . DS . 'View' . DS . 'Bookmarks' . DS . 'view.ctp'));
unlink(APP . DS . 'Http' . DS . 'View' . DS . 'Bookmarks' . DS . 'view.ctp');
}

Expand Down

0 comments on commit 7fc3da2

Please sign in to comment.