/var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/bake/templates/bake/Template
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/bake/templates/bake/Template/index.twig (3809B)
{#
/**
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (https://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. (https://cakefoundation.org)
* @link https://cakephp.org CakePHP(tm) Project
* @since 2.0.0
* @license https://www.opensource.org/licenses/mit-license.php MIT License
*/
#}
${{ pluralVar }}
*/
?>
{% set fields = Bake.filterFields(fields, schema, modelObject, indexColumns, ['binary', 'text']) %}
= $this->Html->link(__('New {{ singularHumanName }}'), ['action' => 'add'], ['class' => 'button float-right']) ?>
{% set done = [] %}
= __('{{ pluralHumanName }}') ?>
{% for field in fields %}
| = $this->Paginator->sort('{{ field }}') ?> |
{% endfor %}
= __('Actions') ?> |
{% for field in fields %}
{% set isKey = false %}
{% if associations.BelongsTo is defined %}
{% for alias, details in associations.BelongsTo %}
{% if 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] }}]) : '' ?> |
{% endif %}
{% 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 }}) ?> |
{% elseif columnData.null %}
= ${{ singularVar }}->{{ field }} === null ? '' : $this->Number->format(${{ singularVar }}->{{ field }}) ?> |
{% else %}
= $this->Number->format(${{ singularVar }}->{{ field }}) ?> |
{% endif %}
{% endif %}
{% endfor %}
{% set pk = '$' ~ singularVar ~ '->' ~ primaryKey[0] %}
= $this->Html->link(__('View'), ['action' => 'view', {{ pk|raw }}]) ?>
= $this->Html->link(__('Edit'), ['action' => 'edit', {{ pk|raw }}]) ?>
= $this->Form->postLink(__('Delete'), ['action' => 'delete', {{ pk|raw }}], ['confirm' => __('Are you sure you want to delete # {0}?', {{ pk|raw }})]) ?>
|
= $this->Paginator->counter(__('Page {{ '{{' }}page{{ '}}' }} of {{ '{{' }}pages{{ '}}' }}, showing {{ '{{' }}current{{ '}}' }} record(s) out of {{ '{{' }}count{{ '}}' }} total')) ?>