Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update list actions generator

  • Loading branch information...
commit 50d962186d6fba9fea072b7e7d07cb973f88e281 1 parent 2955330
Vincent CHALAMON authored
6 data/generator/sfDoctrineModule/admin_template/template/templates/_list_actions.php
View
@@ -5,7 +5,13 @@
<?php echo $this->addCredentialCondition('[?php echo $helper->linkToNew('.$this->asPhp($params).') ?]', $params)."\n" ?>
<?php else: ?>
<li class="sf_admin_action_<?php echo $params['class_suffix'] ?>">
+[?php if (method_exists($helper, 'linkTo<?php echo $method = ucfirst(sfInflector::classify(preg_replace('/^_(.*)/i', '$1', $name))) ?>')): ?]
+ <?php echo $this->addCredentialCondition('[?php echo $helper->linkTo'.$method.'('.$this->asPhp($params).') ?]', $params) ?>
+
+[?php else: ?]
<?php echo $this->addCredentialCondition($this->getLinkToAction($name, $params, false), $params)."\n" ?>
+
+[?php endif; ?]
</li>
<?php endif; ?>
<?php endforeach; ?>
Please sign in to comment.
Something went wrong with that request. Please try again.