Making check for 'add' prefix insensitive. Fixes #434

This commit is contained in:
Mark Story 2010-03-07 17:14:40 -05:00
parent 12edc75a4f
commit bfbf31e234

View file

@ -45,7 +45,8 @@
<div class="actions">
<h3><?php echo "<?php __('Actions'); ?>"; ?></h3>
<ul>
<?php if ($action != 'add'):?>
<?php if (strpos($action, 'add') === false): ?>
<li><?php echo "<?php echo \$this->Html->link(__('Delete', true), array('action' => 'delete', \$this->Form->value('{$modelClass}.{$primaryKey}')), null, sprintf(__('Are you sure you want to delete # %s?', true), \$this->Form->value('{$modelClass}.{$primaryKey}'))); ?>";?></li>
<?php endif;?>
<li><?php echo "<?php echo \$this->Html->link(sprintf(__('List %s', true), __('{$pluralHumanName}', true)), array('action' => 'index'));?>";?></li>