/
var
/
www
/
vhosts
/
ihelp.ro
/
httpdocs
/
plugins
/
AdminLTE
/
templates
/
bake
/
Template
/
/var/www/vhosts/ihelp.ro/httpdocs/plugins/AdminLTE/templates/bake/Template
mkdir
upload
Name
Size
Mode
Actions
add.twig
725
0644
edit
dl
rm
edit.twig
724
0644
edit
dl
rm
index.twig
4018
0644
edit
dl
rm
view.twig
6314
0644
edit
dl
rm
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']) %} <!-- Content Header (Page header) --> <section class="content-header"> <h1> {{ pluralHumanName }} <div class="pull-right"><?php echo $this->Html->link(__('New'), ['action' => 'add'], ['class'=>'btn btn-success btn-xs']) ?></div> </h1> </section> <!-- Main content --> <section class="content"> <div class="row"> <div class="col-xs-12"> <div class="box"> <div class="box-header"> <h3 class="box-title"><?php echo __('List'); ?></h3> <div class="box-tools"> <form action="<?php echo $this->Url->build(); ?>" method="POST"> <div class="input-group input-group-sm" style="width: 150px;"> <input type="text" name="table_search" class="form-control pull-right" placeholder="<?php echo __('Search'); ?>"> <div class="input-group-btn"> <button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button> </div> </div> </form> </div> </div> <!-- /.box-header --> <div class="box-body table-responsive no-padding"> <table class="table table-hover"> <thead> <tr> {% for field in fields %} <th scope="col"><?= $this->Paginator->sort('{{ field }}') ?></th> {% endfor %} <th scope="col" class="actions text-center"><?= __('Actions') ?></th> </tr> </thead> <tbody> <?php foreach (${{ pluralVar }} as ${{ singularVar }}): ?> <tr> {% for field in fields %} {% set isKey = false %} {% if associations.BelongsTo %} {% for alias, details in associations.BelongsTo|filter(field == details.foreignKey) %} {% set isKey = true %} <td><?= ${{ singularVar }}->has('{{ details.property }}') ? $this->Html->link(${{ singularVar }}->{{ details.property }}->{{ details.displayField }}, ['controller' => '{{ details.controller }}', 'action' => 'view', ${{ singularVar }}->{{ details.property }}->{{ details.primaryKey[0] }}]) : '' ?></td> {% 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'] %} <td><?= h(${{ singularVar }}->{{ field }}) ?></td> {% else %} <td><?= $this->Number->format(${{ singularVar }}->{{ field }}) ?></td> {% endif %} {% endif %} {% endfor %} {% set pk = '$' ~ singularVar ~ '->' ~ primaryKey[0] %} <td class="actions text-right"> <?= $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']) ?> </td> </tr> <?php endforeach; ?> </tbody> </table> </div> <!-- /.box-body --> </div> <!-- /.box --> </div> </div> </section>
Save
cmd:
run