[Erp5-report] r23124 - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplateItem/p...

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Aug 22 18:13:04 CEST 2008


Author: jerome
Date: Fri Aug 22 18:13:04 2008
New Revision: 23124

URL: http://svn.erp5.org?rev=23124&view=rev
Log:
simplify a bit TemplateTool_installBusinessTemplateListAction and redirect to /view

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

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_installBusinessTemplateListAction.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_installBusinessTemplateListAction.xml?rev=23124&r1=23123&r2=23124&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_installBusinessTemplateListAction.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_installBusinessTemplateListAction.xml Fri Aug 22 18:13:04 2008
@@ -74,11 +74,7 @@
 object_to_update = {}\n
 for item in listbox:\n
   bt_id, object_id = item[\'listbox_key\'].split(\'|\')\n
-  if bt_dict.has_key(bt_id):\n
-    bt_dict[bt_id][object_id] = item[\'choice\'][0]\n
-  else:\n
-    bt_dict[bt_id] = {}\n
-    bt_dict[bt_id][object_id] = item[\'choice\'][0]\n
+  bt_dict.setdefault(bt_id, dict())[object_id] = item[\'choice\'][0]\n
 \n
 bt_title_list = []\n
 for bt_id in bt_id_list:\n
@@ -94,7 +90,7 @@
 REQUEST = container.REQUEST\n
 RESPONSE = REQUEST.RESPONSE\n
 \n
-return RESPONSE.redirect("%s?portal_status_message=Business+Template+%s+installed" % \\\n
+return RESPONSE.redirect("%s/view?portal_status_message=Business+Template+%s+installed" % \\\n
                          (context.absolute_url(), \',+\'.join(bt_title_list)))\n
 </string> </value>
         </item>
@@ -160,6 +156,7 @@
                             <string>bt_id</string>
                             <string>object_id</string>
                             <string>_write_</string>
+                            <string>dict</string>
                             <string>bt_title_list</string>
                             <string>object_list</string>
                             <string>bt</string>

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=23124&r1=23123&r2=23124&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision Fri Aug 22 18:13:04 2008
@@ -1,1 +1,1 @@
-937
+938




More information about the Erp5-report mailing list