buenas estoy haciendo un paginado con ajax par mi administrador, ya que voy
a cargar un volumen siempre grande de datos, la cosa es que como estoy
usando un layout creado desde 0 cuando le doy clic a cualquiera de las
acciones, se me carga absolutamente toda la pagina, que puedo hacer para
mitigar este problema, claro esta sin tener que usar el layout default
<?php
$this->Paginator->options(array(
'update' => '#contenedor-clientes',
'before' => $this->Js->get("#procesando")->effect('fadeIn',
array('buffer' => false)),
'complete' => $this->Js->get("#procesando")->effect('fadeOut',
array('buffer' => false))
));
?>
<div id="contenedor-clientes">
<div class="page-header">
<h2><?php echo __('Clientes'); ?></h2>
</div>
<div class="col-md-12">
<div class="progress oculto" id="procesando">
<div class="progress-bar progress-bar-striped active" role="progressbar"
aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width:
100%">
<span class="sr-only">100% Complete</span>
</div>
</div>
<table class="table table-striped">
<thead>
<tr>
<th><?php echo $this->Paginator->sort('id','<button class="btn
btn-default">Id</button>',array('escape' => false)); ?></th>
<th><?php echo $this->Paginator->sort('nombres','<button class="btn
btn-default">nombres</button>',array('escape' => false)); ?></th>
<th><?php echo $this->Paginator->sort('cedula','<button class="btn
btn-default">Cedula</button>',array('escape' => false));?></th>
<th><?php echo $this->Paginator->sort('telefono','<button class="btn
btn-default">Telefono</button>',array('escape' => false));; ?></th>
<th><?php echo $this->Paginator->sort('correo','<button class="btn
btn-default">Correo</button>',array('escape' => false)); ?></th>
<th class="actions"><?php echo __('Acciones'); ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($clientes as $cliente): ?>
<tr>
<td><?php echo h($cliente['Cliente']['id']); ?> </td>
<td><?php echo h($cliente['Cliente']['nombres']); ?> </td>
<td><?php echo h($cliente['Cliente']['cedula']); ?> </td>
<td><?php echo h($cliente['Cliente']['telefono']); ?> </td>
<td><?php echo h($cliente['Cliente']['correo']); ?> </td>
<td class="actions">
<?php echo $this->Html->link(__('View'), array('action' => 'view',
$cliente['Cliente']['id'])); ?>
<?php echo $this->Html->link(__('Edit'), array('action' => 'edit',
$cliente['Cliente']['id'])); ?>
<?php
if($current_user['role']=='Administrador'){
echo $this->Form->postLink(__('Delete'),
array('action' => 'delete', $cliente['Cliente']['id']), array('confirm' =>
__('Are you sure you want to delete # %s?', $cliente['Cliente']['id'])));
}
?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php
echo $this->Paginator->counter(array(
'format' => __('Page {:page} of {:pages}, showing {:current} records out of
{:count} total, starting on record {:start}, ending on {:end}')
));
?> </p>
<ul class="pagination">
<li> <?php echo $this->Paginator->prev('< ' . __('previous'), array('tag'
=> false), null, array('class' => 'prev disabled')); ?> </li>
<?php echo $this->Paginator->numbers(array('separator' => '', 'tag' =>
'li', 'currentTag' => 'a', 'currentClass' => 'active')); ?>
<li> <?php echo $this->Paginator->next(__('next') . ' >', array('tag' =>
false), null, array('class' => 'next disabled')); ?> </li>
</ul>
<?php echo $this->Js->writeBuffer(); ?>
</div>
--
Has recibido este mensaje porque estás suscrito al grupo "CakePHP-es" de Grupos
de Google.
Para anular la suscripción a este grupo y dejar de recibir sus mensajes, envía
un correo electrónico a [email protected].
Para publicar una entrada en este grupo, envía un correo electrónico a
[email protected].
Visita este grupo en http://groups.google.com/group/cakephp-es.
Para obtener más opciones, visita https://groups.google.com/d/optout.