[Erp5-report] r11954 - /erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/porta...

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Jan 9 11:15:55 CET 2007


Author: jp
Date: Tue Jan  9 11:15:41 2007
New Revision: 11954

URL: http://svn.erp5.org?rev=11954&view=rev
Log:
2007-01-09 JPS - support of ordering types

Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_configureSortOn.xml

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_configureSortOn.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_configureSortOn.xml?rev=11954&r1=11953&r2=11954&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_configureSortOn.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_configureSortOn.xml Tue Jan  9 11:15:41 2007
@@ -74,8 +74,8 @@
 \n
 from Products.Formulator.Errors import ValidationError, FormValidationError\n
 \n
-request=context.REQUEST\n
-\n
+request = context.REQUEST\n
+field_sort_type = request.form.get(\'field_sort_type\', None)\n
 \n
 try:\n
   # No validation for now\n
@@ -84,8 +84,13 @@
   i = 0\n
   for k in field_sort_on:\n
     if k != \'None\':\n
-      v = field_sort_order[i]\n
-      sort_on += [(k,v)]\n
+      if field_sort_type is None:\n
+        v = field_sort_order[i]\n
+        sort_on += [(k,v)]\n
+      else:\n
+        v = field_sort_order[i]\n
+        t = field_sort_type[i]\n
+        sort_on += [(k, v, t)]\n
     i += 1\n
   context.portal_selections.setSelectionSortOrder(selection_name, sort_on)\n
 except FormValidationError, validation_errors:\n
@@ -149,12 +154,15 @@
                             <string>_getattr_</string>
                             <string>context</string>
                             <string>request</string>
+                            <string>None</string>
+                            <string>field_sort_type</string>
                             <string>sort_on</string>
                             <string>i</string>
                             <string>_getiter_</string>
                             <string>k</string>
                             <string>_getitem_</string>
                             <string>v</string>
+                            <string>t</string>
                             <string>validation_errors</string>
                             <string>form</string>
                             <string>field_errors</string>




More information about the Erp5-report mailing list