[Alba-desarrollo] SVN Alba r3995 - prosistem/alba/trunk/alba/apps/principal/modules/provincia/actions

commits en pressenter.com.ar commits en pressenter.com.ar
Mie Ene 10 20:28:07 CET 2007


Author: ftoledo
Date: 2007-01-10 16:28:07 -0300 (Wed, 10 Jan 2007)
New Revision: 3995

Modified:
   prosistem/alba/trunk/alba/apps/principal/modules/provincia/actions/actions.class.php
Log:
orden por defecto ticket #91


Modified: prosistem/alba/trunk/alba/apps/principal/modules/provincia/actions/actions.class.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/provincia/actions/actions.class.php	2007-01-10 18:47:00 UTC (rev 3994)
+++ prosistem/alba/trunk/alba/apps/principal/modules/provincia/actions/actions.class.php	2007-01-10 19:28:07 UTC (rev 3995)
@@ -31,8 +31,18 @@
  * @license GPL
  */
 
-class provinciaActions extends autoprovinciaActions
-{
+class provinciaActions extends autoprovinciaActions {
+    protected function addSortCriteria (&$c) {                                                                                                                          
+        if ($sort_column = $this->getUser()->getAttribute('sort', 'nombre_corto', 'sf_admin/provincia/sort')) {                                                                                                                        
+            $sort_column = Propel::getDB($c->getDbName())->quoteIdentifier($sort_column);                                          
+            if ($this->getUser()->getAttribute('type', 'asc', 'sf_admin/provincia/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