[Erp5-report] r36694 jerome - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplat...

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Jun 29 15:42:06 CEST 2010


Author: jerome
Date: Tue Jun 29 15:42:04 2010
New Revision: 36694

URL: http://svn.erp5.org?rev=36694&view=rev
Log:
redirect directly to the user preference (if any)

Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/personalize_form.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/personalize_form.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/personalize_form.xml?rev=36694&r1=36693&r2=36694&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/personalize_form.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/personalize_form.xml [utf8] Tue Jun 29 15:42:04 2010
@@ -55,13 +55,14 @@
             <key> <string>_body</string> </key>
             <value> <string># make default CMF personalize_form redirect to the preference tool\n
 \n
-from ZTUtils import make_query\n
-args = {}\n
-if portal_status_message is not None :\n
-  args[\'portal_status_message\'] = portal_status_message\n
+preference_tool = context.getPortalObject().portal_preferences\n
 \n
-context.REQUEST.RESPONSE.redirect(\n
-   "%s/portal_preferences/view?%s" % ( context.getPortalObject().absolute_url(), make_query(args)))\n
+preference = preference_tool.getActivePreference()\n
+\n
+if preference is not None and preference.getPriority() == 3: # XXX: 3 is Priority.USER\n
+  return preference.Base_redirect(\'view\')\n
+\n
+return preference_tool.Base_redirect(\'view\')\n
 </string> </value>
         </item>
         <item>
@@ -72,7 +73,7 @@ context.REQUEST.RESPONSE.redirect(\n
         </item>
         <item>
             <key> <string>_params</string> </key>
-            <value> <string>form=None, message=None, portal_status_message=None, **kw</string> </value>
+            <value> <string>**kw</string> </value>
         </item>
         <item>
             <key> <string>errors</string> </key>
@@ -92,23 +93,18 @@ context.REQUEST.RESPONSE.redirect(\n
                   <dictionary>
                     <item>
                         <key> <string>co_argcount</string> </key>
-                        <value> <int>3</int> </value>
+                        <value> <int>0</int> </value>
                     </item>
                     <item>
                         <key> <string>co_varnames</string> </key>
                         <value>
                           <tuple>
-                            <string>form</string>
-                            <string>message</string>
-                            <string>portal_status_message</string>
                             <string>kw</string>
-                            <string>ZTUtils</string>
-                            <string>make_query</string>
-                            <string>args</string>
-                            <string>None</string>
-                            <string>_write_</string>
                             <string>_getattr_</string>
                             <string>context</string>
+                            <string>preference_tool</string>
+                            <string>preference</string>
+                            <string>None</string>
                           </tuple>
                         </value>
                     </item>
@@ -120,11 +116,7 @@ context.REQUEST.RESPONSE.redirect(\n
         <item>
             <key> <string>func_defaults</string> </key>
             <value>
-              <tuple>
-                <none/>
-                <none/>
-                <none/>
-              </tuple>
+              <none/>
             </value>
         </item>
         <item>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=36694&r1=36693&r2=36694&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] Tue Jun 29 15:42:04 2010
@@ -1 +1 @@
-1619
\ No newline at end of file
+1622
\ No newline at end of file




More information about the Erp5-report mailing list