Skip to content

Commit

Permalink
Same fix for the view template
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Aug 12, 2014
1 parent 10ae8e0 commit 8051888
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Template/Bake/default/views/view.ctp
Expand Up @@ -25,7 +25,7 @@ foreach ($fields as $field) {
if ($field === $details['foreignKey']) {
$isKey = true;
echo "\t\t<dt><?= __('" . Inflector::humanize(Inflector::underscore($details['property'])) . "'); ?></dt>\n";
echo "\t\t<dd>\n\t\t\t<?= \$this->Html->link(\${$singularVar}->{$details['property']}->{$details['displayField']}, ['controller' => '{$details['controller']}', 'action' => 'view', \${$singularVar}->{$details['property']}->{$details['primaryKey'][0]}]); ?>\n\t\t\t&nbsp;\n\t\t</dd>\n";
echo "\t\t<dd>\n\t\t\t<?= \${$singularVar}->has('{$details['property']}') ? \$this->Html->link(\${$singularVar}->{$details['property']}->{$details['displayField']}, ['controller' => '{$details['controller']}', 'action' => 'view', \${$singularVar}->{$details['property']}->{$details['primaryKey'][0]}]) : ''; ?>\n\t\t\t&nbsp;\n\t\t</dd>\n";
break;
}
}
Expand Down

0 comments on commit 8051888

Please sign in to comment.