[Alba-desarrollo] SVN Alba r4151 - in
prosistem/alba/trunk/alba/apps/principal/modules:
cuenta/actions responsable/actions
commits en pressenter.com.ar
commits en pressenter.com.ar
Vie Feb 2 20:54:49 CET 2007
Author: ftoledo
Date: 2007-02-02 16:54:46 -0300 (Fri, 02 Feb 2007)
New Revision: 4151
Modified:
prosistem/alba/trunk/alba/apps/principal/modules/cuenta/actions/actions.class.php
prosistem/alba/trunk/alba/apps/principal/modules/responsable/actions/actions.class.php
Log:
ordenes por defecto en cuenta y responsable
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-02-02 19:27:12 UTC (rev 4150)
+++ prosistem/alba/trunk/alba/apps/principal/modules/cuenta/actions/actions.class.php 2007-02-02 19:54:46 UTC (rev 4151)
@@ -55,7 +55,22 @@
$this->aResponsable = ResponsablePeer::doSelect($c);
}
+ protected function addSortCriteria (&$c)
+ {
+ if ($sort_column = $this->getUser()->getAttribute('sort', 'nombre', 'sf_admin/cuenta/sort'))
+ {
+ $sort_column = Propel::getDB($c->getDbName())->quoteIdentifier($sort_column);
+ if ($this->getUser()->getAttribute('type', 'asc', 'sf_admin/cuenta/sort') == 'asc')
+ {
+ $c->addAscendingOrderByColumn($sort_column);
+ }
+ else
+ {
+ $c->addDescendingOrderByColumn($sort_column);
+ }
+ }
+ }
}
-?>
\ No newline at end of file
+?>
Modified: prosistem/alba/trunk/alba/apps/principal/modules/responsable/actions/actions.class.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/responsable/actions/actions.class.php 2007-02-02 19:27:12 UTC (rev 4150)
+++ prosistem/alba/trunk/alba/apps/principal/modules/responsable/actions/actions.class.php 2007-02-02 19:54:46 UTC (rev 4151)
@@ -30,20 +30,27 @@
* @license GPL
*/
-class responsableActions extends autoresponsableActions
-{
+class responsableActions extends autoresponsableActions {
public function preExecute() {
$this->vista = $this->getRequestParameter('vista');
}
- function executeIrCuenta(){
- //Obtener el id de cuenta.
-
- $c = new Criteria();
- $c->add(ResponsablePeer::ID, $this->getRequestParameter('id'));
- $Resp = ResponsablePeer::doSelectOne($c);
- $this->redirect('cuenta/verCompleta?id='.$Resp->getFkCuentaId());
- }
+ function executeIrCuenta(){
+ //Obtener el id de cuenta.
+ $c = new Criteria();
+ $c->add(ResponsablePeer::ID, $this->getRequestParameter('id'));
+ $Resp = ResponsablePeer::doSelectOne($c);
+ $this->redirect('cuenta/verCompleta?id='.$Resp->getFkCuentaId());
+ }
+ protected function addSortCriteria (&$c) {
+ if ($sort_column = $this->getUser()->getAttribute('sort', 'apellido', 'sf_admin/responsable/sort')) {
+ $sort_column = Propel::getDB($c->getDbName())->quoteIdentifier($sort_column);
+ if ($this->getUser()->getAttribute('type', 'asc', 'sf_admin/responsable/sort') == 'asc') {
+ $c->addAscendingOrderByColumn($sort_column);
+ }
+ else
+ $c->addDescendingOrderByColumn($sort_column);
+ }
+ }
}
-
?>
\ No newline at end of file
Más información sobre la lista de distribución Alba-desarrollo