Converting scaffold URLs to array-based

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4107 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2006-12-17 15:33:21 +00:00
parent 54a5055fa4
commit eeec18d562

View file

@ -71,9 +71,10 @@ if(is_array($data)) {
</td> </td>
<?php } ?> <?php } ?>
<td class="actions"> <td class="actions">
<?php echo $html->link('View', $path . $viewPath."/view/{$row[$modelClass][$modelObj->primaryKey]}/")?> <?php $id = $row[$modelClass][$modelObj->primaryKey]; ?>
<?php echo $html->link('Edit', $path . $viewPath."/edit/{$row[$modelClass][$modelObj->primaryKey]}/")?> <?php echo $html->link('View', array('action' => 'view', $id)) ?>
<?php echo $html->link('Delete', $path . $viewPath."/delete/{$row[$modelClass][$modelObj->primaryKey]}/", null, 'Are you sure you want to delete id '.$row[$modelClass][$modelObj->primaryKey].' ?')?> <?php echo $html->link('Edit', array('action' => 'edit', $id)) ?>
<?php echo $html->link('Delete', array('action' => 'view', $id), null, 'Are you sure you want to delete id '.$id.' ?') ?>
</td> </td>
</tr> </tr>
<?php <?php
@ -82,5 +83,5 @@ if(is_array($data)) {
</tbody> </tbody>
</table> </table>
<ul class="actions"> <ul class="actions">
<li><?php echo $html->link('New '.$humanSingularName, $path . $viewPath.'/add'); ?></li> <li><?php echo $html->link('New '.$humanSingularName, array('action' => 'add')); ?></li>
</ul> </ul>