-action != 'add'):?>
- - Html->link(__('Delete'), array('action' => 'delete', $this->Form->value($modelClass.'.'.$primaryKey)), null, __('Are you sure you want to delete').' #' . $this->Form->value($modelClass.'.'.$primaryKey)); ?>
+request->action != 'add'): ?>
+ - Form->postLink(
+ __('Delete'),
+ array('action' => 'delete', $this->Form->value($modelClass . '.' . $primaryKey)),
+ null,
+ __('Are you sure you want to delete # %s?', $this->Form->value($modelClass . '.' . $primaryKey)));
+ ?>
- - Html->link(__('List').' '.$pluralHumanName, array('action' => 'index'));?>
+ - Html->link(__('List') . ' ' . $pluralHumanName, array('action' => 'index'));?>
$_data) {
diff --git a/cake/libs/view/scaffolds/index.ctp b/cake/libs/view/scaffolds/index.ctp
index 7a4f49aef..d92b88320 100644
--- a/cake/libs/view/scaffolds/index.ctp
+++ b/cake/libs/view/scaffolds/index.ctp
@@ -33,33 +33,37 @@ foreach (${$pluralVar} as ${$singularVar}):
if ($i++ % 2 == 0) {
$class = ' class="altrow"';
}
-echo "\n";
- echo "\t\n";
+ echo "
";
foreach ($scaffoldFields as $_field) {
$isKey = false;
if (!empty($associations['belongsTo'])) {
foreach ($associations['belongsTo'] as $_alias => $_details) {
if ($_field === $_details['foreignKey']) {
$isKey = true;
- echo "\t\t\n\t\t\t" . $this->Html->link(${$singularVar}[$_alias][$_details['displayField']], array('controller' => $_details['controller'], 'action' => 'view', ${$singularVar}[$_alias][$_details['primaryKey']])) . "\n\t\t | \n";
+ echo "" . $this->Html->link(${$singularVar}[$_alias][$_details['displayField']], array('controller' => $_details['controller'], 'action' => 'view', ${$singularVar}[$_alias][$_details['primaryKey']])) . " | ";
break;
}
}
}
if ($isKey !== true) {
- echo "\t\t" . h(${$singularVar}[$modelClass][$_field]) . " | \n";
+ echo "" . h(${$singularVar}[$modelClass][$_field]) . " | ";
}
}
- echo "\t\t\n";
- echo "\t\t\t" . $this->Html->link(__('View'), array('action' => 'view', ${$singularVar}[$modelClass][$primaryKey])) . "\n";
- echo "\t\t\t" . $this->Html->link(__('Edit'), array('action' => 'edit', ${$singularVar}[$modelClass][$primaryKey])) . "\n";
- echo "\t\t\t" . $this->Html->link(__('Delete'), array('action' => 'delete', ${$singularVar}[$modelClass][$primaryKey]), null, __('Are you sure you want to delete').' #' . ${$singularVar}[$modelClass][$primaryKey]) . "\n";
- echo "\t\t | \n";
- echo "\t
\n";
+ echo '';
+ echo $this->Html->link(__('View'), array('action' => 'view', ${$singularVar}[$modelClass][$primaryKey]));
+ echo $this->Html->link(__('Edit'), array('action' => 'edit', ${$singularVar}[$modelClass][$primaryKey]));
+ echo $this->Form->postLink(
+ __('Delete'),
+ array('action' => 'delete', ${$singularVar}[$modelClass][$primaryKey]),
+ null,
+ __('Are you sure you want to delete').' #' . ${$singularVar}[$modelClass][$primaryKey]
+ );
+ echo ' | ';
+ echo '';
endforeach;
-echo "\n";
+
?>
- Paginator->prev('<< ' . __('previous'), array(), null, array('class' => 'disabled')) . "\n";?>
- | Paginator->numbers() . "\n"?>
- Paginator->next(__('next') .' >>', array(), null, array('class' => 'disabled')) . "\n";?>
+ Paginator->prev('<< ' . __('previous'), array(), null, array('class' => 'disabled')); ?>
+ | Paginator->numbers(); ?>
+ Paginator->next(__('next') .' >>', array(), null, array('class' => 'disabled')); ?>