Skip to content

Commit

Permalink
Use Icon->render()
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Mar 15, 2023
1 parent 30906dc commit 78e506c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions templates/bake/Template/index.twig
Expand Up @@ -81,9 +81,9 @@
{% endfor %}
{% set pk = '$' ~ singularVar ~ '->' ~ primaryKey[0] %}
<td class="actions">
<?php echo $this->Html->link($this->Format->icon('view'), ['action' => 'view', {{ pk|raw }}], ['escapeTitle' => false]); ?>
<?php echo $this->Html->link($this->Format->icon('edit'), ['action' => 'edit', {{ pk|raw }}], ['escapeTitle' => false]); ?>
<?php echo $this->Form->postLink($this->Format->icon('delete'), ['action' => 'delete', {{ pk|raw }}], ['escapeTitle' => false, 'confirm' => __('Are you sure you want to delete # {0}?', {{ pk|raw }})]); ?>
<?php echo $this->Html->link($this->Icon->render('view'), ['action' => 'view', {{ pk|raw }}], ['escapeTitle' => false]); ?>
<?php echo $this->Html->link($this->Icon->render('edit'), ['action' => 'edit', {{ pk|raw }}], ['escapeTitle' => false]); ?>
<?php echo $this->Form->postLink($this->Icon->render('delete'), ['action' => 'delete', {{ pk|raw }}], ['escapeTitle' => false, 'confirm' => __('Are you sure you want to delete # {0}?', {{ pk|raw }})]); ?>
</td>
</tr>
<?php endforeach; ?>
Expand Down
6 changes: 3 additions & 3 deletions templates/bake/Template/view.twig
Expand Up @@ -137,9 +137,9 @@
{% endfor %}
{% set otherPk = '$' ~ otherSingularVar ~ '->' ~ details.primaryKey[0] %}
<td class="actions">
<?php echo $this->Html->link($this->Format->icon('view'), ['controller' => '{{ details.controller }}', 'action' => 'view', {{ otherPk|raw }}], ['escapeTitle' => false]); ?>
<?php echo $this->Html->link($this->Format->icon('edit'), ['controller' => '{{ details.controller }}', 'action' => 'edit', {{ otherPk|raw }}], ['escapeTitle' => false]); ?>
<?php echo $this->Form->postLink($this->Format->icon('delete'), ['controller' => '{{ details.controller }}', 'action' => 'delete', {{ otherPk|raw }}], ['escapeTitle' => false, 'confirm' => __('Are you sure you want to delete # {0}?', {{ otherPk|raw }})]); ?>
<?php echo $this->Html->link($this->Icon->render('view'), ['controller' => '{{ details.controller }}', 'action' => 'view', {{ otherPk|raw }}], ['escapeTitle' => false]); ?>
<?php echo $this->Html->link($this->Icon->render('edit'), ['controller' => '{{ details.controller }}', 'action' => 'edit', {{ otherPk|raw }}], ['escapeTitle' => false]); ?>
<?php echo $this->Form->postLink($this->Icon->render('delete'), ['controller' => '{{ details.controller }}', 'action' => 'delete', {{ otherPk|raw }}], ['escapeTitle' => false, 'confirm' => __('Are you sure you want to delete # {0}?', {{ otherPk|raw }})]); ?>
</td>
</tr>
<?php endforeach; ?>
Expand Down

0 comments on commit 78e506c

Please sign in to comment.