Skip to content

Commit

Permalink
Fixing multiple problems in the index bake template
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Nov 16, 2014
1 parent bdb1d03 commit 14b8d46
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Template/Bake/Template/index.ctp
Expand Up @@ -45,7 +45,7 @@ $fields = collection($fields)
<thead>
<tr>
<% foreach ($fields as $field): %>
<th><?= $this->Paginator->sort('<%= $field %>') %>"; ?></th>
<th><?= $this->Paginator->sort('<%= $field %>') ?></th>
<% endforeach; %>
<th class="actions"><?= __('Actions') ?></th>
</tr>
Expand All @@ -71,7 +71,7 @@ $fields = collection($fields)
if ($isKey !== true) {
if (!in_array($schema->columnType($field), ['integer', 'biginteger', 'decimal', 'float'])) {
%>
<td><?= h($<%= $singularVar %>-><%= $field %>) '></td>
<td><?= h($<%= $singularVar %>-><%= $field %>) ?></td>
<%
} else {
%>
Expand All @@ -81,7 +81,7 @@ $fields = collection($fields)
}
}

$pk = "\$<%= $singularVar %>-><%= $primaryKey[0] %>";
$pk = '$' . $singularVar . '->' . $primaryKey[0];
%>
<td class="actions">
<?= $this->Html->link(__('View'), ['action' => 'view', <%= $pk %>]) ?>
Expand All @@ -96,7 +96,7 @@ $fields = collection($fields)
<div class="paginator">
<ul class="pagination">
<?= $this->Paginator->prev('< ' . __('previous')); ?>
<?= this->Paginator->numbers(); ?>
<?= $this->Paginator->numbers(); ?>
<?= $this->Paginator->next(__('next') . ' >'); ?>
</ul>
<p><?= $this->Paginator->counter(); ?></p>
Expand Down

0 comments on commit 14b8d46

Please sign in to comment.