From 287148df65d7829508de4c1f0f04de92791287c8 Mon Sep 17 00:00:00 2001
From: Jean-Paul Smets <jp@nexedi.com>
Date: Mon, 14 Apr 2008 17:07:47 +0000
Subject: [PATCH] Order setting of actions. New expressions for action display
 or not.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20509 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../portal_types/File/web_view.xml            | 23 ++++++-----------
 .../portal_types/Image/web_view.xml           | 25 ++++++-------------
 2 files changed, 15 insertions(+), 33 deletions(-)

diff --git a/bt5/erp5_web/ActionTemplateItem/portal_types/File/web_view.xml b/bt5/erp5_web/ActionTemplateItem/portal_types/File/web_view.xml
index 8395d35fe6..f573acd6ba 100644
--- a/bt5/erp5_web/ActionTemplateItem/portal_types/File/web_view.xml
+++ b/bt5/erp5_web/ActionTemplateItem/portal_types/File/web_view.xml
@@ -3,11 +3,8 @@
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.CMFCore.ActionInformation</string>
-          <string>ActionInformation</string>
-        </tuple>
-        <none/>
+        <global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
@@ -72,11 +69,8 @@
   <record id="2" aka="AAAAAAAAAAI=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.CMFCore.Expression</string>
-          <string>Expression</string>
-        </tuple>
-        <none/>
+        <global name="Expression" module="Products.CMFCore.Expression"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
@@ -91,18 +85,15 @@
   <record id="3" aka="AAAAAAAAAAM=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.CMFCore.Expression</string>
-          <string>Expression</string>
-        </tuple>
-        <none/>
+        <global name="Expression" module="Products.CMFCore.Expression"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
       <dictionary>
         <item>
             <key> <string>text</string> </key>
-            <value> <string>object/isWebMode</string> </value>
+            <value> <string>python:object is not None and object.isWebMode() and object.hasData()</string> </value>
         </item>
       </dictionary>
     </pickle>
diff --git a/bt5/erp5_web/ActionTemplateItem/portal_types/Image/web_view.xml b/bt5/erp5_web/ActionTemplateItem/portal_types/Image/web_view.xml
index 7a4284d669..30353ff05e 100644
--- a/bt5/erp5_web/ActionTemplateItem/portal_types/Image/web_view.xml
+++ b/bt5/erp5_web/ActionTemplateItem/portal_types/Image/web_view.xml
@@ -3,11 +3,8 @@
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.CMFCore.ActionInformation</string>
-          <string>ActionInformation</string>
-        </tuple>
-        <none/>
+        <global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
@@ -56,7 +53,7 @@
         </item>
         <item>
             <key> <string>priority</string> </key>
-            <value> <float>1.0</float> </value>
+            <value> <float>0.5</float> </value>
         </item>
         <item>
             <key> <string>title</string> </key>
@@ -72,11 +69,8 @@
   <record id="2" aka="AAAAAAAAAAI=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.CMFCore.Expression</string>
-          <string>Expression</string>
-        </tuple>
-        <none/>
+        <global name="Expression" module="Products.CMFCore.Expression"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
@@ -91,18 +85,15 @@
   <record id="3" aka="AAAAAAAAAAM=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.CMFCore.Expression</string>
-          <string>Expression</string>
-        </tuple>
-        <none/>
+        <global name="Expression" module="Products.CMFCore.Expression"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
       <dictionary>
         <item>
             <key> <string>text</string> </key>
-            <value> <string>object/isWebMode</string> </value>
+            <value> <string>python:object is not None and object.isWebMode() and object.hasData()</string> </value>
         </item>
       </dictionary>
     </pickle>
-- 
2.30.9