Skip to content
Permalink
Browse files

removed a not used $i, spacing between actions.

removed a not used $i, spacing between actions. changed to single quotes
  • Loading branch information...
andraskende committed Nov 24, 2012
1 parent 0d29861 commit b191f42cc836579c5ea24c156e45d376d41ab2eb
Showing with 7 additions and 8 deletions.
  1. +7 −8 lib/Cake/View/Scaffolds/index.ctp
@@ -26,29 +26,28 @@
<th><?php echo __d('cake', 'Actions'); ?></th>
</tr>
<?php
$i = 0;
foreach (${$pluralVar} as ${$singularVar}):
echo "<tr>";
echo '<tr>';
foreach ($scaffoldFields as $_field) {
$isKey = false;
if (!empty($associations['belongsTo'])) {
foreach ($associations['belongsTo'] as $_alias => $_details) {
if ($_field === $_details['foreignKey']) {
$isKey = true;
echo "<td>" . $this->Html->link(${$singularVar}[$_alias][$_details['displayField']], array('controller' => $_details['controller'], 'action' => 'view', ${$singularVar}[$_alias][$_details['primaryKey']])) . "</td>";
echo '<td>' . $this->Html->link(${$singularVar}[$_alias][$_details['displayField']], array('controller' => $_details['controller'], 'action' => 'view', ${$singularVar}[$_alias][$_details['primaryKey']])) . '</td>';
break;
}
}
}
if ($isKey !== true) {
echo "<td>" . h(${$singularVar}[$modelClass][$_field]) . "</td>";
echo '<td>' . h(${$singularVar}[$modelClass][$_field]) . '</td>';
}
}
echo '<td class="actions">';
echo $this->Html->link(__d('cake', 'View'), array('action' => 'view', ${$singularVar}[$modelClass][$primaryKey]));
echo $this->Html->link(__d('cake', 'Edit'), array('action' => 'edit', ${$singularVar}[$modelClass][$primaryKey]));
echo $this->Form->postLink(
echo ' ' . $this->Html->link(__d('cake', 'Edit'), array('action' => 'edit', ${$singularVar}[$modelClass][$primaryKey]));
echo ' ' . $this->Form->postLink(
__d('cake', 'Delete'),
array('action' => 'delete', ${$singularVar}[$modelClass][$primaryKey]),
null,
@@ -83,8 +82,8 @@ endforeach;
foreach ($associations as $_type => $_data) {
foreach ($_data as $_alias => $_details) {
if ($_details['controller'] != $this->name && !in_array($_details['controller'], $done)) {
echo "<li>" . $this->Html->link(__d('cake', 'List %s', Inflector::humanize($_details['controller'])), array('controller' => $_details['controller'], 'action' => 'index')) . "</li>";
echo "<li>" . $this->Html->link(__d('cake', 'New %s', Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' => 'add')) . "</li>";
echo '<li>' . $this->Html->link(__d('cake', 'List %s', Inflector::humanize($_details['controller'])), array('controller' => $_details['controller'], 'action' => 'index')) . '</li>';
echo '<li>' . $this->Html->link(__d('cake', 'New %s', Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' => 'add')) . '</li>';
$done[] = $_details['controller'];
}
}

0 comments on commit b191f42

Please sign in to comment.
You can’t perform that action at this time.