removed a not used $i, spacing between actions.

removed a not used $i, spacing between actions. changed to single quotes
This commit is contained in:
Andras Kende 2012-11-23 16:01:04 -08:00
parent 0d29861423
commit b191f42cc8

View file

@ -26,29 +26,28 @@
<th><?php echo __d('cake', 'Actions'); ?></th> <th><?php echo __d('cake', 'Actions'); ?></th>
</tr> </tr>
<?php <?php
$i = 0;
foreach (${$pluralVar} as ${$singularVar}): foreach (${$pluralVar} as ${$singularVar}):
echo "<tr>"; echo '<tr>';
foreach ($scaffoldFields as $_field) { foreach ($scaffoldFields as $_field) {
$isKey = false; $isKey = false;
if (!empty($associations['belongsTo'])) { if (!empty($associations['belongsTo'])) {
foreach ($associations['belongsTo'] as $_alias => $_details) { foreach ($associations['belongsTo'] as $_alias => $_details) {
if ($_field === $_details['foreignKey']) { if ($_field === $_details['foreignKey']) {
$isKey = true; $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; break;
} }
} }
} }
if ($isKey !== true) { if ($isKey !== true) {
echo "<td>" . h(${$singularVar}[$modelClass][$_field]) . "</td>"; echo '<td>' . h(${$singularVar}[$modelClass][$_field]) . '</td>';
} }
} }
echo '<td class="actions">'; echo '<td class="actions">';
echo $this->Html->link(__d('cake', 'View'), array('action' => 'view', ${$singularVar}[$modelClass][$primaryKey])); 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->Html->link(__d('cake', 'Edit'), array('action' => 'edit', ${$singularVar}[$modelClass][$primaryKey]));
echo $this->Form->postLink( echo ' ' . $this->Form->postLink(
__d('cake', 'Delete'), __d('cake', 'Delete'),
array('action' => 'delete', ${$singularVar}[$modelClass][$primaryKey]), array('action' => 'delete', ${$singularVar}[$modelClass][$primaryKey]),
null, null,
@ -83,8 +82,8 @@ endforeach;
foreach ($associations as $_type => $_data) { foreach ($associations as $_type => $_data) {
foreach ($_data as $_alias => $_details) { foreach ($_data as $_alias => $_details) {
if ($_details['controller'] != $this->name && !in_array($_details['controller'], $done)) { 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', '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', 'New %s', Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' => 'add')) . '</li>';
$done[] = $_details['controller']; $done[] = $_details['controller'];
} }
} }