Skip to content

Commit

Permalink
Fixing more problems in the bake view template
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Nov 16, 2014
1 parent a2bd413 commit 5de782a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Template/Bake/Template/view.ctp
Expand Up @@ -121,7 +121,7 @@ $pk = "\$$singularVar->{$primaryKey[0]}";
<% foreach ($groupedFields['text'] as $field) : %>
<div class="row texts">
<div class="columns large-9">
<h6 class="subheader"><?= __('<$= Inflector::humanize($field) %>') ?></h6>
<h6 class="subheader"><?= __('<%= Inflector::humanize($field) %>') ?></h6>
<?= $this->Text->autoParagraph(h($<%= $singularVar %>-><%= $field %>)); ?>

</div>
Expand All @@ -148,11 +148,11 @@ foreach ($relations as $alias => $details):
</tr>
<?php foreach ($<%= $singularVar %>-><%= $details['property'] %> as $<%= $otherSingularVar %>): ?>
<tr>
<% foreach ($details['fields'] as $field): %>
<%- foreach ($details['fields'] as $field): %>
<td><?= h($<%= $otherSingularVar %>-><%= $field %>) ?></td>
<% endforeach; %>
<%- endforeach; %>

<% $otherPk = "\${$otherSingularVar}->{$details['primaryKey'][0]}"; %>
<%- $otherPk = "\${$otherSingularVar}->{$details['primaryKey'][0]}"; %>
<td class="actions">
<?= $this->Html->link(__('View'), ['controller' => '<%= $details['controller'] %>', 'action' => 'view', <%= $otherPk %>]) %>
<?= $this->Html->link(__('Edit'), ['controller' => '<%= $details['controller'] %>', 'action' => 'edit', <%= $otherPk %>]) %>
Expand Down

0 comments on commit 5de782a

Please sign in to comment.