From 0191a23ec29bfa38102c8956cfa4be4d67d5b39b Mon Sep 17 00:00:00 2001
From: Ivan Tyagov <ivan@nexedi.com>
Date: Mon, 17 Jun 2013 09:05:33 +0300
Subject: [PATCH] improve actions.

---
 .../position_workflow/states/cancelled.xml    | 16 +++++
 .../position_workflow/states/draft.xml        |  2 +
 .../transitions/close_action.xml              | 64 +++++++++++++++++++
 bt5/erp5_hr/bt/revision                       |  2 +-
 4 files changed, 83 insertions(+), 1 deletion(-)

diff --git a/bt5/erp5_hr/WorkflowTemplateItem/portal_workflow/position_workflow/states/cancelled.xml b/bt5/erp5_hr/WorkflowTemplateItem/portal_workflow/position_workflow/states/cancelled.xml
index 863e8cb0fd..dbc084d4e2 100644
--- a/bt5/erp5_hr/WorkflowTemplateItem/portal_workflow/position_workflow/states/cancelled.xml
+++ b/bt5/erp5_hr/WorkflowTemplateItem/portal_workflow/position_workflow/states/cancelled.xml
@@ -6,6 +6,10 @@
     </pickle>
     <pickle>
       <dictionary>
+        <item>
+            <key> <string>description</string> </key>
+            <value> <string></string> </value>
+        </item>
         <item>
             <key> <string>id</string> </key>
             <value> <string>cancelled</string> </value>
@@ -14,6 +18,18 @@
             <key> <string>title</string> </key>
             <value> <string>Cancelled</string> </value>
         </item>
+        <item>
+            <key> <string>transitions</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>type_list</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
       </dictionary>
     </pickle>
   </record>
diff --git a/bt5/erp5_hr/WorkflowTemplateItem/portal_workflow/position_workflow/states/draft.xml b/bt5/erp5_hr/WorkflowTemplateItem/portal_workflow/position_workflow/states/draft.xml
index b94cf0917e..54c4fc28a3 100644
--- a/bt5/erp5_hr/WorkflowTemplateItem/portal_workflow/position_workflow/states/draft.xml
+++ b/bt5/erp5_hr/WorkflowTemplateItem/portal_workflow/position_workflow/states/draft.xml
@@ -30,6 +30,8 @@
               <tuple>
                 <string>delete</string>
                 <string>delete_action</string>
+                <string>open</string>
+                <string>open_action</string>
                 <string>submit</string>
                 <string>submit_action</string>
               </tuple>
diff --git a/bt5/erp5_hr/WorkflowTemplateItem/portal_workflow/position_workflow/transitions/close_action.xml b/bt5/erp5_hr/WorkflowTemplateItem/portal_workflow/position_workflow/transitions/close_action.xml
index f490d9560d..2feb6955f9 100644
--- a/bt5/erp5_hr/WorkflowTemplateItem/portal_workflow/position_workflow/transitions/close_action.xml
+++ b/bt5/erp5_hr/WorkflowTemplateItem/portal_workflow/position_workflow/transitions/close_action.xml
@@ -6,10 +6,74 @@
     </pickle>
     <pickle>
       <dictionary>
+        <item>
+            <key> <string>actbox_category</string> </key>
+            <value> <string>workflow</string> </value>
+        </item>
+        <item>
+            <key> <string>actbox_icon</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>actbox_name</string> </key>
+            <value> <string>Close</string> </value>
+        </item>
+        <item>
+            <key> <string>actbox_url</string> </key>
+            <value> <string>%(content_url)s/Base_viewWorkflowActionDialog?workflow_action=close_action</string> </value>
+        </item>
+        <item>
+            <key> <string>after_script_name</string> </key>
+            <value> <string>close</string> </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>guard</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+            </value>
+        </item>
         <item>
             <key> <string>id</string> </key>
             <value> <string>close_action</string> </value>
         </item>
+        <item>
+            <key> <string>new_state_id</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>script_name</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>trigger_type</string> </key>
+            <value> <int>1</int> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <global name="Guard" module="Products.DCWorkflow.Guard"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>roles</string> </key>
+            <value>
+              <tuple>
+                <string>Assignor</string>
+                <string>Assignee</string>
+              </tuple>
+            </value>
+        </item>
       </dictionary>
     </pickle>
   </record>
diff --git a/bt5/erp5_hr/bt/revision b/bt5/erp5_hr/bt/revision
index 19c7bdba7b..8e2afd3427 100644
--- a/bt5/erp5_hr/bt/revision
+++ b/bt5/erp5_hr/bt/revision
@@ -1 +1 @@
-16
\ No newline at end of file
+17
\ No newline at end of file
-- 
2.30.9