|
1 | 1 | <div class="<?php echo $pluralVar; ?> index"> |
2 | | - <h2><?php echo "<?php echo __('{$pluralHumanName}'); ?>"; ?></h2> |
3 | | - <?php echo "<?php echo \$this->Html->link('New', array('action'=>'add'), array('title'=>'Add new','class'=>'btn add-button'));?>\n";?> |
| 2 | + <h2><?php echo "<?php echo __('{$pluralHumanName}'); ?>"; ?></h2> |
| 3 | + <?php echo "<?php echo \$this->Html->link('New', array('action'=>'add'), array('title'=>'Add new','class'=>'btn add-button'));?>\n"; ?> |
4 | 4 |
|
5 | | - <?php echo "<?php echo \$this->Form->postLink(\"Purge (\$purgeable)\", array('action'=>'purge'), array('class' => 'btn btn-small btn-danger purge-button'), 'Are you sure you want to purge? This will remove records permanently!');?>\n";?> |
6 | | - <?php echo "<?php echo \$this->Html->link(\"Deleted (\$deleted)\", array('action'=>'deleted'), array('title'=>\"Deleted (\$deleted)\", 'class' => 'btn btn-small btn-primary deleted-button'));?>\n";?> |
| 5 | + <?php echo "<?php echo \$this->Form->postLink(\"Purge (\$purgeable)\", array('action'=>'purge'), array('class' => 'btn btn-small btn-danger purge-button'), 'Are you sure you want to purge? This will remove records permanently!');?>\n"; ?> |
| 6 | + <?php echo "<?php echo \$this->Html->link(\"Deleted (\$deleted)\", array('action'=>'deleted'), array('title'=>\"Deleted (\$deleted)\", 'class' => 'btn btn-small btn-primary deleted-button'));?>\n"; ?> |
7 | 7 |
|
8 | | - <table cellpadding="0" cellspacing="0" class="table table-bordered table-striped"> |
9 | | - <tr> |
10 | | - <?php foreach ($fields as $field): |
11 | | - if (!in_array($field, array('created', 'deleted', 'deleted_date'))) { |
12 | | - ?> |
13 | | - <th><?php echo "<?php echo \$this->Paginator->sort('{$field}'); ?>"; ?></th> |
| 8 | + <table cellpadding="0" cellspacing="0" class="table table-bordered table-striped"> |
| 9 | + <tr> |
14 | 10 | <?php |
15 | | - } |
16 | | - endforeach; ?> |
17 | | - <th class="actions"><?php echo "<?php echo __('Actions'); ?>"; ?></th> |
18 | | - </tr> |
19 | | - <?php |
20 | | - echo "<?php foreach (\${$pluralVar} as \${$singularVar}): ?>\n"; |
21 | | - echo "\t<tr>\n"; |
22 | | - foreach ($fields as $field) { |
23 | | - if (!in_array($field, array('created', 'deleted', 'deleted_date'))){ |
| 11 | + foreach ($fields as $field): |
| 12 | + if (!in_array($field, array('created', 'deleted', 'deleted_date'))) { |
| 13 | + ?> |
| 14 | + <th><?php echo "<?php echo \$this->Paginator->sort('{$field}'); ?>"; ?></th> |
| 15 | + <?php |
| 16 | + } |
| 17 | + endforeach; |
| 18 | + ?> |
| 19 | + <th class="actions"><?php echo "<?php echo __('Actions'); ?>"; ?></th> |
| 20 | + </tr> |
| 21 | + <?php |
| 22 | + echo "<?php foreach (\${$pluralVar} as \${$singularVar}): ?>\n"; |
| 23 | + echo "\t<tr>\n"; |
| 24 | + foreach ($fields as $field) { |
| 25 | + if (!in_array($field, array('created', 'deleted', 'deleted_date'))) { |
24 | 26 | $isKey = false; |
25 | 27 | if (!empty($associations['belongsTo'])) { |
26 | 28 | foreach ($associations['belongsTo'] as $alias => $details) { |
27 | 29 | if ($field === $details['foreignKey']) { |
28 | 30 | $isKey = true; |
29 | 31 | if ($field == 'status_id') { |
30 | | - echo "\t\t<td><?php echo \$this->StatusLights->status(\${$singularVar}['{$alias}']['{$details['primaryKey']}']);?></td>"; |
| 32 | + echo "\t\t<td><?php echo \$this->StatusLights->status(\${$singularVar}['{$alias}']['{$details['primaryKey']}']);?></td>\n"; |
31 | 33 | } else { |
32 | 34 | echo "\t\t<td>\n\t\t\t<?php echo \$this->Html->link(\${$singularVar}['{$alias}']['{$details['displayField']}'], array('controller' => '{$details['controller']}', 'action' => 'edit', \${$singularVar}['{$alias}']['{$details['primaryKey']}'])); ?>\n\t\t</td>\n"; |
33 | 35 | } |
|
41 | 43 | echo "\t\t<td><?php echo h(\${$singularVar}['{$modelClass}']['{$field}']); ?> </td>\n"; |
42 | 44 | } |
43 | 45 | } |
44 | | - } |
| 46 | + } |
45 | 47 |
|
46 | | - echo "\t\t<td class=\"actions\">\n"; |
47 | | - echo "<?php echo \$this->Actions->actions(\${$singularVar}['{$modelClass}']['{$primaryKey}'], array('e','d'));?>\n"; |
48 | | - echo "\t\t</td>\n"; |
49 | | - echo "\t</tr>\n"; |
| 48 | + echo "\t\t<td class=\"actions\">\n"; |
| 49 | + echo "\t\t\t<?php echo \$this->Actions->actions(\${$singularVar}['{$modelClass}']['{$primaryKey}'], array('e','d'));?>\n"; |
| 50 | + echo "\t\t</td>\n"; |
| 51 | + echo "\t</tr>\n"; |
50 | 52 |
|
51 | | - echo "<?php endforeach; ?>\n"; |
52 | | - ?> |
53 | | - </table> |
54 | | - <p> |
55 | | - <?php echo "<?php |
| 53 | + echo "<?php endforeach; ?>\n"; |
| 54 | + ?> |
| 55 | + </table> |
| 56 | + <p> |
| 57 | + <?php echo "<?php |
56 | 58 | echo \$this->Paginator->counter(array( |
57 | 59 | 'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}') |
58 | 60 | )); |
59 | 61 | ?>"; ?> |
60 | | - </p> |
61 | | - <div class="paging"> |
62 | | - <?php |
63 | | - echo "<?php\n"; |
64 | | - echo "\t\techo \$this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));\n"; |
65 | | - echo "\t\techo \$this->Paginator->numbers(array('separator' => ''));\n"; |
66 | | - echo "\t\techo \$this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));\n"; |
67 | | - echo "\t?>\n"; |
68 | | - ?> |
69 | | - </div> |
| 62 | + </p> |
| 63 | + <div class="paging"> |
| 64 | + <?php |
| 65 | + echo "<?php\n"; |
| 66 | + echo "\t\techo \$this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));\n"; |
| 67 | + echo "\t\techo \$this->Paginator->numbers(array('separator' => ''));\n"; |
| 68 | + echo "\t\techo \$this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));\n"; |
| 69 | + echo "\t?>\n"; |
| 70 | + ?> |
| 71 | + </div> |
70 | 72 | </div> |
0 commit comments