Hola Lista
Tengo un codigo que he generado con CakeBake, en el mismo tengo una pagina
para buscar expedientes, cuando ingreso a esa pagina me lista
automáticamente todos los expedientes que tiene la base de datos, no quiero
me muestre esto, quiero que al insertar el codigo "Search" que conseguí de
http://www.designaeon.com/cake-php-search-component/ . me muestre solo lo
que busco y no todo
Alguno tiene idea de como lograrlo?
Inserto el codigo
--------------
expedientecontroller
<?php
class ExpedientesController extends AppController {
var $components=array('Search');
var $name = 'Expedientes';
function index($id = null) {
$this->Expediente->recursive = 0;
$conditions=$this->Search->getConditions();
$this->set('expedientes', $this->paginate(null,$conditions));
}
.
.
.
.
.
----------
codigo archivo index.ctp
*<div class="expedientes index">*
*<?php echo $this->element('searchForm/setting_pagination_named');?>*
*<?php echo $this->element('searchForm/form');?>*
* <h2><?php __('Expedientes');?></h2>*
* <table cellpadding="0" cellspacing="0">*
* <tr>*
* <th><?php echo $this->Paginator->sort('id');?></th>*
* <th><?php echo $this->Paginator->sort('padron');?></th>*
* <th><?php echo $this->Paginator->sort('titular');?></th>*
* <th><?php echo $this->Paginator->sort('poseedor');?></th>*
* <th><?php echo $this->Paginator->sort('expediente');?></th>*
* <th><?php echo $this->Paginator->sort('NomCatastral');?></th>*
* <th><?php echo $this->Paginator->sort('fecha');?></th>*
* <th><?php echo $this->Paginator->sort('estado');?></th>*
* <th><?php echo $this->Paginator->sort('domicilio');?></th>*
* <th><?php echo $this->Paginator->sort('zona');?></th>*
* *
* <th class="actions"><?php __('Actions');?></th>*
* </tr>*
* <?php*
* $i = 0;*
* foreach ($expedientes as $expediente):*
* $class = null;*
* if ($i++ % 2 == 0) {*
* $class = ' class="altrow"';*
* }*
* ?>*
* <tr<?php echo $class;?>>*
* <td><?php echo $expediente['Expediente']['id']; ?> </td>*
* <td><?php echo $expediente['Expediente']['padron']; ?> </td>*
* <td><?php echo $expediente['Expediente']['titular']; ?> </td>*
* <td><?php echo $expediente['Expediente']['poseedor']; ?> </td>*
* <td><?php echo $expediente['Expediente']['expediente']; ?> </td>*
* <td><?php echo $expediente['Expediente']['NomCatastral']; ?> </td>*
* <td><?php echo $expediente['Expediente']['fecha']; ?> </td>*
* <td><?php echo $expediente['Expediente']['estado']; ?> </td>*
* <td><?php echo $expediente['Expediente']['domicilio']; ?> </td>*
* <td><?php echo $expediente['Expediente']['zona']; ?> </td>*
* *
* <td class="actions">*
* <?php echo $this->Html->link(__('View', true), array('action' => 'view',
$expediente['Expediente']['id'])); ?>*
* <?php echo $this->Html->link(__('Mostrar', true), array('action' =>
'mostrar', $expediente['Expediente']['id'])); ?>*
* </td>*
* </tr>*
*<?php endforeach; ?>*
* </table>*
* <p>*
* <?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%', true)*
* ));*
* ?> </p>*
*
*
* <div class="paging">*
* <?php echo $this->Paginator->prev('<< ' . __('previous', true), array(),
null, array('class'=>'disabled'));?>*
* | <?php echo $this->Paginator->numbers();?>*
* |*
* <?php echo $this->Paginator->next(__('next', true) . ' >>', array(),
null, array('class' => 'disabled'));?>*
* </div>*
*</div>*
*<div class="actions">*
* <h3><?php __('Acciones'); ?></h3>*
* <ul>*
* <li><?php echo $this->Html->link(__('Buscar por datos generales', true),
array('action' => 'buscar')); ?></li>*
* *
* </ul>*
*</div>*
*--------------*
*
*
*Gracias de antemano!!*
*
*
*Cristian*
--
Has recibido este mensaje porque estás suscrito al grupo "CakePHP-es" de Grupos
de Google.
Para ver este debate en la Web, visita
https://groups.google.com/d/msg/cakephp-es/-/DIGmLhEl5OMJ.
Para publicar una entrada en este grupo, envía un correo electrónico a
[email protected].
Para anular tu suscripción a este grupo, envía un correo electrónico a
[email protected]
Para tener acceso a más opciones, visita el grupo en
http://groups.google.com/group/cakephp-es?hl=es.