[Erp5-report] r28782 - /erp5/trunk/products/ERP5/Document/BusinessTemplate.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Sep 3 14:43:49 CEST 2009


Author: romain
Date: Thu Sep  3 14:43:49 2009
New Revision: 28782

URL: http://svn.erp5.org?rev=28782&view=rev
Log:
Allow to sort the skin folder when creating a new skin selection.

Modified:
    erp5/trunk/products/ERP5/Document/BusinessTemplate.py

Modified: erp5/trunk/products/ERP5/Document/BusinessTemplate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/BusinessTemplate.py?rev=28782&r1=28781&r2=28782&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] Thu Sep  3 14:43:49 2009
@@ -210,12 +210,13 @@
 
     selection = skin_tool.getSkinPath(skin_name) or ''
     selection_list = selection.split(',')
-    if (skin_folder_id not in selection_list) and (skin_name in skin_layer_list):
+    if (skin_folder_id not in selection_list):
       selection_list.insert(0, skin_folder_id)
-      if reorder_skin_selection:
-        selection_list.sort(
-          key=lambda x: x in skin_tool.objectIds() and -skin_tool[x].getProperty(
-          'business_template_skin_layer_priority', 0) or 0)
+    if reorder_skin_selection:
+      selection_list.sort(
+        key=lambda x: x in skin_tool.objectIds() and -skin_tool[x].getProperty(
+        'business_template_skin_layer_priority', 0) or 0)
+    if (skin_name in skin_layer_list):
       skin_tool.manage_skinLayers(skinpath=selection_list,
                                   skinname=skin_name, add_skin=1)
       skin_tool.getPortalObject().changeSkin(None)




More information about the Erp5-report mailing list