/var/www/vhosts/ihelp.ro/httpdocs/plugins/AdminLTE/templates/bake/Template
Edit: /var/www/vhosts/ihelp.ro/httpdocs/plugins/AdminLTE/templates/bake/Template/index.twig (4018B)
{#
/**
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @since 2.0.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
#}
{% set fields = Bake.filterFields(fields, schema, modelObject, indexColumns, ['binary', 'text']) %}
{% for field in fields %}
| = $this->Paginator->sort('{{ field }}') ?> |
{% endfor %}
= __('Actions') ?> |
{% for field in fields %}
{% set isKey = false %}
{% if associations.BelongsTo %}
{% for alias, details in associations.BelongsTo|filter(field == details.foreignKey) %}
{% set isKey = true %}
| = ${{ singularVar }}->has('{{ details.property }}') ? $this->Html->link(${{ singularVar }}->{{ details.property }}->{{ details.displayField }}, ['controller' => '{{ details.controller }}', 'action' => 'view', ${{ singularVar }}->{{ details.property }}->{{ details.primaryKey[0] }}]) : '' ?> |
{% endfor %}
{% endif %}
{% if isKey is not same as(true) %}
{% set columnData = Bake.columnData(field, schema) %}
{% if columnData.type not in ['integer', 'float', 'decimal', 'biginteger', 'smallinteger', 'tinyinteger'] %}
= h(${{ singularVar }}->{{ field }}) ?> |
{% else %}
= $this->Number->format(${{ singularVar }}->{{ field }}) ?> |
{% endif %}
{% endif %}
{% endfor %}
{% set pk = '$' ~ singularVar ~ '->' ~ primaryKey[0] %}
= $this->Html->link(__('View'), ['action' => 'view', {{ pk|raw }}], ['class'=>'btn btn-info btn-xs']) ?>
= $this->Html->link(__('Edit'), ['action' => 'edit', {{ pk|raw }}], ['class'=>'btn btn-warning btn-xs']) ?>
= $this->Form->postLink(__('Delete'), ['action' => 'delete', {{ pk|raw }}], ['confirm' => __('Are you sure you want to delete # {0}?', {{ pk|raw }}), 'class'=>'btn btn-danger btn-xs']) ?>
|