Skip to content

Commit

Permalink
Merge pull request #5277 from AD7six/3.0-bake-view-fix
Browse files Browse the repository at this point in the history
Remove extra php close tag from view bake template
  • Loading branch information
markstory committed Nov 27, 2014
2 parents a182a33 + 03902f5 commit e409034
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Template/Bake/Template/view.ctp
Expand Up @@ -84,7 +84,7 @@ $pk = "\$$singularVar->{$primaryKey[0]}";
$details = $associationFields[$field];
%>
<h6 class="subheader"><?= __('<%= Inflector::humanize($details['property']) %>') ?></h6>
<p><?= $<%= $singularVar %>->has('<%= $details['property'] %>') ? $this->Html->link($<%= $singularVar %>-><%= $details['property'] %>-><%= $details['displayField'] %>, ['controller' => '<%= $details['controller'] %>', 'action' => 'view', $<%= $singularVar %>-><%= $details['property'] %>-><%= $details['primaryKey'][0] %>]) : '' %>" ?></p>
<p><?= $<%= $singularVar %>->has('<%= $details['property'] %>') ? $this->Html->link($<%= $singularVar %>-><%= $details['property'] %>-><%= $details['displayField'] %>, ['controller' => '<%= $details['controller'] %>', 'action' => 'view', $<%= $singularVar %>-><%= $details['property'] %>-><%= $details['primaryKey'][0] %>]) : '' ?></p>
<% else : %>
<h6 class="subheader"><?= __('<%= Inflector::humanize($field) %>') ?></h6>
<p><?= h($<%= $singularVar %>-><%= $field %>) ?></p>
Expand Down
2 changes: 1 addition & 1 deletion tests/bake_compare/View/testBakeView.ctp
Expand Up @@ -14,7 +14,7 @@
<div class="row">
<div class="large-5 columns strings">
<h6 class="subheader"><?= __('Article') ?></h6>
<p><?= $viewTaskComment->has('article') ? $this->Html->link($viewTaskComment->article->title, ['controller' => 'Articles', 'action' => 'view', $viewTaskComment->article->id]) : '' ?>" ?></p>
<p><?= $viewTaskComment->has('article') ? $this->Html->link($viewTaskComment->article->title, ['controller' => 'Articles', 'action' => 'view', $viewTaskComment->article->id]) : '' ?></p>
<h6 class="subheader"><?= __('Published') ?></h6>
<p><?= h($viewTaskComment->published) ?></p>
</div>
Expand Down

0 comments on commit e409034

Please sign in to comment.