[Alba-desarrollo] SVN Alba r5000 - in prosistem/alba/trunk/alba:
apps/principal/modules/alumno/templates lib/model
commits en pressenter.com.ar
commits en pressenter.com.ar
Lun Ago 27 15:46:24 CEST 2007
Author: josx
Date: 2007-08-27 10:46:23 -0300 (Mon, 27 Aug 2007)
New Revision: 5000
Modified:
prosistem/alba/trunk/alba/apps/principal/modules/alumno/templates/_pais_id.php
prosistem/alba/trunk/alba/apps/principal/modules/alumno/templates/editSuccess.php
prosistem/alba/trunk/alba/lib/model/PaisPeer.php
prosistem/alba/trunk/alba/lib/model/TipodocumentoPeer.php
Log:
Se han agregado al modelo para tipo documento y paises un metodo llamado getEnorden para poder usar los selects en orden segun el campo orden. Se ha implementado en alumno (#243)
Modified: prosistem/alba/trunk/alba/apps/principal/modules/alumno/templates/_pais_id.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/alumno/templates/_pais_id.php 2007-08-24 19:36:18 UTC (rev 4999)
+++ prosistem/alba/trunk/alba/apps/principal/modules/alumno/templates/_pais_id.php 2007-08-27 13:46:23 UTC (rev 5000)
@@ -11,8 +11,8 @@
$provincia_id = 0;
}
- echo select_tag('pais_id',objects_for_select($paises,'getId','getNombreLargo',$pais_selected));
-
+ echo select_tag('pais_id',objects_for_select(PaisPeer::getEnOrden(),'getId','getNombreLargo',$pais_selected));
+
echo observe_field('pais_id', array(
'update' => 'item_provincia',
'url' => 'alumno/cambiarPais',
Modified: prosistem/alba/trunk/alba/apps/principal/modules/alumno/templates/editSuccess.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/alumno/templates/editSuccess.php 2007-08-24 19:36:18 UTC (rev 4999)
+++ prosistem/alba/trunk/alba/apps/principal/modules/alumno/templates/editSuccess.php 2007-08-27 13:46:23 UTC (rev 5000)
@@ -96,6 +96,7 @@
<?php echo object_select_tag($alumno, 'getFkTipodocumentoId', array (
'related_class' => 'Tipodocumento',
+ 'peer_method' => 'getEnOrden',
'control_name' => 'alumno[fk_tipodocumento_id]',
)) ?>
</div>
@@ -154,6 +155,7 @@
<?php $value = object_select_tag($alumno, 'getFkPaisId', array (
'related_class' => 'Pais',
+ 'peer_method' => 'getEnOrden',
'control_name' => 'alumno[fk_pais_id]',
)); echo $value ? $value : ' ' ?>
Modified: prosistem/alba/trunk/alba/lib/model/PaisPeer.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/PaisPeer.php 2007-08-24 19:36:18 UTC (rev 4999)
+++ prosistem/alba/trunk/alba/lib/model/PaisPeer.php 2007-08-27 13:46:23 UTC (rev 5000)
@@ -20,4 +20,10 @@
*/
class PaisPeer extends BasePaisPeer {
+ public static function getEnOrden() {
+ $c = new Criteria();
+ $c->addAscendingOrderByColumn(PaisPeer::ORDEN);
+ return PaisPeer::populateObjects(PaisPeer::doSelectRS($c, null));
+ }
+
} // PaisPeer
Modified: prosistem/alba/trunk/alba/lib/model/TipodocumentoPeer.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/TipodocumentoPeer.php 2007-08-24 19:36:18 UTC (rev 4999)
+++ prosistem/alba/trunk/alba/lib/model/TipodocumentoPeer.php 2007-08-27 13:46:23 UTC (rev 5000)
@@ -20,4 +20,10 @@
*/
class TipodocumentoPeer extends BaseTipodocumentoPeer {
+ public static function getEnOrden() {
+ $c = new Criteria();
+ $c->addAscendingOrderByColumn(TipodocumentoPeer::ORDEN);
+ return TipodocumentoPeer::populateObjects(TipodocumentoPeer::doSelectRS($c, null));
+ }
+
} // TipodocumentoPeer
Más información sobre la lista de distribución Alba-desarrollo