diff --git a/src/Template/Bake/Element/form.ctp b/src/Template/Bake/Element/form.ctp index 8dc64e15..9e4ef6bf 100644 --- a/src/Template/Bake/Element/form.ctp +++ b/src/Template/Bake/Element/form.ctp @@ -12,25 +12,26 @@ $this->extend('../Layout/TwitterBootstrap/dashboard'); $this->start('tb_actions'); ?> <% if (strpos($action, 'add') === false): %> -
= $this->Paginator->sort('<%= $field %>'); ?> | - <% endforeach; %> +<% endforeach; %>= __('Actions'); ?> | |
---|---|---|
- = $<%= $singularVar %>->has('<%= $details['property'] %>') ? $this->Html->link($<%= $singularVar %>-><%= $details['property'] %>-><%= $details['displayField'] %>, ['controller' => '<%= $details['controller'] %>', 'action' => 'view', $<%= $singularVar %>-><%= $details['property'] %>-><%= $details['primaryKey'][0] %>]) : '' ?> - | - <% + = $<%= $singularVar %>->has('<%= $details['property'] %>') ? $this->Html->link($<%= $singularVar %>-><%= $details['property'] %>-><%= $details['displayField'] %>, ['controller' => '<%= $details['controller'] %>', 'action' => 'view', $<%= $singularVar %>-><%= $details['property'] %>-><%= $details['primaryKey'][0] %>]) : '' ?> + +<% break; } } @@ -63,11 +63,11 @@ $fields = collection($fields) if (!in_array($schema->columnType($field), ['integer', 'biginteger', 'decimal', 'float'])) { %>= h($<%= $singularVar %>-><%= $field %>) ?> | - <% +<% } else { %>= $this->Number->format($<%= $singularVar %>-><%= $field %>) ?> | - <% +<% } } } @@ -80,7 +80,6 @@ $fields = collection($fields) = $this->Form->postLink('', ['action' => 'delete', <%= $pk %>], ['confirm' => __('Are you sure you want to delete # {0}?', <%= $pk %>), 'title' => __('Delete'), 'class' => 'btn btn-default glyphicon glyphicon-trash']) ?>
= $<%= $singularVar %>->has('<%= $details['property'] %>') ? $this->Html->link($<%= $singularVar %>-><%= $details['property'] %>-><%= $details['displayField'] %>, ['controller' => '<%= $details['controller'] %>', 'action' => 'view', $<%= $singularVar %>-><%= $details['property'] %>-><%= $details['primaryKey'][0] %>]) : '' ?>
- <% else : %> += $<%= $singularVar %>->has('<%= $details['property'] %>') ? $this->Html->link($<%= $singularVar %>-><%= $details['property'] %>-><%= $details['displayField'] %>, ['controller' => '<%= $details['controller'] %>', 'action' => 'view', $<%= $singularVar %>-><%= $details['property'] %>-><%= $details['primaryKey'][0] %>]) : '' ?>
+<% else : %>= h($<%= $singularVar %>-><%= $field %>) ?>
- <% endif; %> - <% endforeach; %> += h($<%= $singularVar %>-><%= $field %>) ?>
+<% endif; %> +<% endforeach; %>= $this->Number->format($<%= $singularVar %>-><%= $field %>) ?>
- <% endforeach; %> += $this->Number->format($<%= $singularVar %>-><%= $field %>) ?>
+<% endforeach; %>= h($<%= $singularVar %>-><%= $field %>) ?>
- <% endforeach; %> += h($<%= $singularVar %>-><%= $field %>) ?>
+<% endforeach; %>= $<%= $singularVar %>-><%= $field %> ? __('Yes') : __('No'); ?>
- <% endforeach; %> += $<%= $singularVar %>-><%= $field %> ? __('Yes') : __('No'); ?>
+<% endforeach; %>