[Alba-desarrollo] SVN Alba r5029 - in prosistem/alba/trunk/alba/apps/principal/modules: alumno/templates cuenta/actions cuenta/templates

commits en pressenter.com.ar commits en pressenter.com.ar
Mie Ago 29 19:05:07 CEST 2007


Author: josx
Date: 2007-08-29 14:05:03 -0300 (Wed, 29 Aug 2007)
New Revision: 5029

Added:
   prosistem/alba/trunk/alba/apps/principal/modules/cuenta/templates/autocompletarSuccess.php
Modified:
   prosistem/alba/trunk/alba/apps/principal/modules/alumno/templates/_buscarCuenta.php
   prosistem/alba/trunk/alba/apps/principal/modules/alumno/templates/_verCuenta.php
   prosistem/alba/trunk/alba/apps/principal/modules/cuenta/actions/actions.class.php
Log:
Se agrego autocompletar a busqueda de cuenta desde la carga de alumno

Modified: prosistem/alba/trunk/alba/apps/principal/modules/alumno/templates/_buscarCuenta.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/alumno/templates/_buscarCuenta.php	2007-08-29 17:05:00 UTC (rev 5028)
+++ prosistem/alba/trunk/alba/apps/principal/modules/alumno/templates/_buscarCuenta.php	2007-08-29 17:05:03 UTC (rev 5029)
@@ -1,4 +1,12 @@
 <?php use_helper('Javascript') ?>  
-<?php echo input_tag('txt_cuenta') ?>
+
+ <?php
+echo input_auto_complete_tag('txt_cuenta', '',
+'cuenta/autocompletar',
+array('autocomplete' => 'off'),
+array('use_style' => true)
+)
+?>
+
 <?php echo submit_to_remote('ajax_submit', 'Buscar cuenta', array('update'   => 'item_list', 'url'      => 'alumno/buscar',)) ?>
 <div id="item_list"></div>

Modified: prosistem/alba/trunk/alba/apps/principal/modules/alumno/templates/_verCuenta.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/alumno/templates/_verCuenta.php	2007-08-29 17:05:00 UTC (rev 5028)
+++ prosistem/alba/trunk/alba/apps/principal/modules/alumno/templates/_verCuenta.php	2007-08-29 17:05:03 UTC (rev 5029)
@@ -3,6 +3,6 @@
 <table cellspacing="0" width="30%">
     <tr class="sf_admin_row_1">
         <td><?php echo $cuenta_nombre; ?></td>
-        <td><?php echo link_to_remote('Cambiar', array('update' => 'cuenta', 'url' => 'alumno/cambiarCuenta' )); ?></td>
+        <td><?php echo link_to_remote('Cambiar', array('update' => 'cuenta', 'url' => 'alumno/cambiarCuenta', 'script' => true )); ?></td>
     </tr>
 </table>

Modified: prosistem/alba/trunk/alba/apps/principal/modules/cuenta/actions/actions.class.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/cuenta/actions/actions.class.php	2007-08-29 17:05:00 UTC (rev 5028)
+++ prosistem/alba/trunk/alba/apps/principal/modules/cuenta/actions/actions.class.php	2007-08-29 17:05:03 UTC (rev 5029)
@@ -73,6 +73,18 @@
         $c->add(ProvinciaPeer::FK_PAIS_ID, $this->pais_id);
         $this->provincias = ProvinciaPeer::getEnOrden($c);
     }
+
+    public function executeAutocompletar() {
+        $txt_cuenta = $this->getRequestParameter('txt_cuenta');
+        $criteria = new Criteria();
+        $criteria->add(CuentaPeer::NOMBRE, "$txt_cuenta%", Criteria::LIKE);
+        $cuentas = CuentaPeer::doSelect($criteria);
+        $this->forward404Unless($cuentas);
+        $this->aCuenta = $cuentas;
+    }
+
+
+
 }
 
 ?>

Added: prosistem/alba/trunk/alba/apps/principal/modules/cuenta/templates/autocompletarSuccess.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/cuenta/templates/autocompletarSuccess.php	2007-08-29 17:05:00 UTC (rev 5028)
+++ prosistem/alba/trunk/alba/apps/principal/modules/cuenta/templates/autocompletarSuccess.php	2007-08-29 17:05:03 UTC (rev 5029)
@@ -0,0 +1,5 @@
+<ul>
+<?php foreach ($aCuenta as $key => $value): ?>
+  <li id="<?php echo $key ?>"><?php echo $value->getNombre() ?></li>
+<?php endforeach; ?>
+</ul>
\ No newline at end of file


Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/cuenta/templates/autocompletarSuccess.php
___________________________________________________________________
Name: svn:keywords
   + "Id Author URL Date Rev"




Más información sobre la lista de distribución Alba-desarrollo