Skip to content

Commit

Permalink
Merge pull request #299 from FriendsOfCake/issue-297
Browse files Browse the repository at this point in the history
Fix delete link for related records.
  • Loading branch information
ADmad committed Mar 10, 2022
2 parents 405dc8b + 1e2ebc8 commit ec3cb65
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion templates/element/view/related/has_many.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,15 @@
<td class="actions">
<?= $this->Html->link(__d('crud', 'View'), ['plugin' => $details['plugin'], 'controller' => $details['controller'], 'action' => 'view', ${$otherSingularVar}[$details['primaryKey']]], ['class' => 'btn btn-secondary']); ?>
<?= $this->Html->link(__d('crud', 'Edit'), ['plugin' => $details['plugin'], 'controller' => $details['controller'], 'action' => 'edit', ${$otherSingularVar}[$details['primaryKey']]], ['class' => 'btn btn-secondary']); ?>
<?= $this->Html->link(__d('crud', 'Delete'), ['plugin' => $details['plugin'], 'controller' => $details['controller'], 'action' => 'delete', ${$otherSingularVar}[$details['primaryKey']]], ['class' => 'btn btn-secondary']); ?>
<?= $this->Form->postLink(
__d('crud', 'Delete'),
['plugin' => $details['plugin'], 'controller' => $details['controller'], 'action' => 'delete', ${$otherSingularVar}[$details['primaryKey']]],
[
'class' => 'btn btn-danger btn-delete',
'confirm' => __d('crud', 'Are you sure you want to delete this record?'),
'name' => '_delete',
]
); ?>
</td>
</tr>
<?php
Expand Down

0 comments on commit ec3cb65

Please sign in to comment.