Ajout css spécifique pour ckeditor. On réduit les marges de body.
[Plinn.git] / profiles / default / workflows / portfolio_workflow / definition.xml
1 <?xml version="1.0"?>
2 <dc-workflow workflow_id="portfolio_workflow"
3 title="Plinn folder workflow" description=""
4 state_variable="review_state"
5 initial_state="private" manager_bypass="False">
6
7 <permission>Add portal content</permission>
8 <permission>Change Images and Files</permission>
9 <permission>Delete Owned Objects</permission>
10 <permission>Delete objects</permission>
11 <permission>Manage properties</permission>
12 <permission>Modify portal content</permission>
13 <permission>View</permission>
14 <state state_id="pending" title="">
15 <exit-transition transition_id="publish"/>
16 <exit-transition transition_id="reject"/>
17 <exit-transition transition_id="retract"/>
18 <permission-map name="Add portal content" acquired="False">
19 <permission-role>Manager</permission-role>
20 </permission-map>
21 <permission-map name="Change Images and Files"
22 acquired="False">
23 <permission-role>Manager</permission-role>
24 <permission-role>Reviewer</permission-role>
25 </permission-map>
26 <permission-map name="Delete Owned Objects"
27 acquired="False">
28 <permission-role>Manager</permission-role>
29 </permission-map>
30 <permission-map name="Delete objects" acquired="False">
31 <permission-role>Manager</permission-role>
32 <permission-role>Reviewer</permission-role>
33 </permission-map>
34 <permission-map name="Manage properties" acquired="False">
35 <permission-role>Manager</permission-role>
36 <permission-role>Reviewer</permission-role>
37 </permission-map>
38 <permission-map name="Modify portal content"
39 acquired="False">
40 <permission-role>Manager</permission-role>
41 <permission-role>Reviewer</permission-role>
42 </permission-map>
43 <permission-map name="View" acquired="False">
44 <permission-role>Contributor</permission-role>
45 <permission-role>Manager</permission-role>
46 <permission-role>Owner</permission-role>
47 <permission-role>Reader</permission-role>
48 <permission-role>Reviewer</permission-role>
49 </permission-map>
50 </state>
51 <state state_id="private" title="">
52 <exit-transition transition_id="direct_publish"/>
53 <exit-transition transition_id="submit"/>
54 <permission-map name="Add portal content" acquired="False">
55 <permission-role>Contributor</permission-role>
56 <permission-role>Manager</permission-role>
57 <permission-role>Owner</permission-role>
58 </permission-map>
59 <permission-map name="Change Images and Files"
60 acquired="False">
61 <permission-role>Contributor</permission-role>
62 <permission-role>Manager</permission-role>
63 <permission-role>Owner</permission-role>
64 </permission-map>
65 <permission-map name="Delete Owned Objects"
66 acquired="False">
67 <permission-role>Contributor</permission-role>
68 <permission-role>Manager</permission-role>
69 <permission-role>Owner</permission-role>
70 </permission-map>
71 <permission-map name="Delete objects" acquired="False">
72 <permission-role>Manager</permission-role>
73 <permission-role>Owner</permission-role>
74 </permission-map>
75 <permission-map name="Manage properties" acquired="False">
76 <permission-role>Contributor</permission-role>
77 <permission-role>Manager</permission-role>
78 <permission-role>Owner</permission-role>
79 </permission-map>
80 <permission-map name="Modify portal content"
81 acquired="False">
82 <permission-role>Contributor</permission-role>
83 <permission-role>Manager</permission-role>
84 <permission-role>Owner</permission-role>
85 </permission-map>
86 <permission-map name="View" acquired="False">
87 <permission-role>Contributor</permission-role>
88 <permission-role>Manager</permission-role>
89 <permission-role>Owner</permission-role>
90 <permission-role>Reader</permission-role>
91 </permission-map>
92 </state>
93 <state state_id="published" title="">
94 <exit-transition transition_id="reject"/>
95 <exit-transition transition_id="retract"/>
96 <permission-map name="Add portal content" acquired="False">
97 <permission-role>Manager</permission-role>
98 </permission-map>
99 <permission-map name="Change Images and Files"
100 acquired="False">
101 <permission-role>Manager</permission-role>
102 </permission-map>
103 <permission-map name="Delete Owned Objects"
104 acquired="False">
105 <permission-role>Manager</permission-role>
106 </permission-map>
107 <permission-map name="Delete objects" acquired="False">
108 <permission-role>Manager</permission-role>
109 </permission-map>
110 <permission-map name="Manage properties" acquired="False">
111 <permission-role>Manager</permission-role>
112 </permission-map>
113 <permission-map name="Modify portal content"
114 acquired="False">
115 <permission-role>Manager</permission-role>
116 </permission-map>
117 <permission-map name="View" acquired="True">
118 <permission-role>Anonymous</permission-role>
119 </permission-map>
120 </state>
121 <transition transition_id="direct_publish"
122 title="Reviewer publishes content"
123 new_state="published" trigger="USER"
124 before_script="" after_script="">
125 <description>Reviewer can directly publish content if he have de Owner role (not necessarily ownership)</description>
126 <action url="%(content_url)s/content_publish_form?direct:boolean=True"
127 category="workflow">Publish</action>
128 <guard>
129 <guard-permission>Review portal content</guard-permission>
130 <guard-expression>python:user.allowed(here, ['Owner'])</guard-expression>
131 </guard>
132 </transition>
133 <transition transition_id="publish"
134 title="Reviewer publishes content"
135 new_state="published" trigger="USER"
136 before_script="" after_script="">
137 <action url="%(content_url)s/content_publish_form"
138 category="workflow">Publish</action>
139 <guard>
140 <guard-permission>Review portal content</guard-permission>
141 </guard>
142 </transition>
143 <transition transition_id="reject"
144 title="Reviewer rejects submission"
145 new_state="private" trigger="USER"
146 before_script="" after_script="">
147 <action url="%(content_url)s/content_reject_form"
148 category="workflow">Reject</action>
149 <guard>
150 <guard-permission>Review portal content</guard-permission>
151 </guard>
152 </transition>
153 <transition transition_id="retract"
154 title="Member retracts submission"
155 new_state="private" trigger="USER"
156 before_script="" after_script="">
157 <action url="%(content_url)s/content_retract_form"
158 category="workflow">Retract</action>
159 <guard>
160 <guard-permission>Request review</guard-permission>
161 <guard-expression>python:not(here.portal_membership.checkPermission('Review portal content', here))</guard-expression>
162 </guard>
163 </transition>
164 <transition transition_id="submit"
165 title="Member requests publishing"
166 new_state="pending" trigger="USER"
167 before_script="" after_script="">
168 <action url="%(content_url)s/content_submit_form"
169 category="workflow">Submit</action>
170 <guard>
171 <guard-permission>Request review</guard-permission>
172 </guard>
173 </transition>
174 <variable variable_id="action" for_catalog="False"
175 for_status="True" update_always="True">
176 <description>The last transition</description>
177 <default>
178
179 <expression>transition/getId|nothing</expression>
180 </default>
181 <guard>
182 </guard>
183 </variable>
184 <variable variable_id="actor" for_catalog="False"
185 for_status="True" update_always="True">
186 <description>The ID of the user who performed the last transition</description>
187 <default>
188
189 <expression>user/getId</expression>
190 </default>
191 <guard>
192 </guard>
193 </variable>
194 <variable variable_id="comments" for_catalog="False"
195 for_status="True" update_always="True">
196 <description>Comments about the last transition</description>
197 <default>
198
199 <expression>python:state_change.kwargs.get('comment', '')</expression>
200 </default>
201 <guard>
202 </guard>
203 </variable>
204 <variable variable_id="email_sent" for_catalog="False"
205 for_status="True" update_always="True">
206 <default>
207
208 <expression>python:scripts.sendNotificationEmail(state_change) or state_change.kwargs.get('email_sent', [])</expression>
209 </default>
210 <guard>
211 </guard>
212 </variable>
213 <variable variable_id="review_history" for_catalog="False"
214 for_status="False" update_always="False">
215 <description>Provides access to workflow history</description>
216 <default>
217
218 <expression>state_change/getHistory</expression>
219 </default>
220 <guard>
221 <guard-permission>Request review</guard-permission>
222 <guard-permission>Review portal content</guard-permission>
223 </guard>
224 </variable>
225 <variable variable_id="time" for_catalog="False"
226 for_status="True" update_always="True">
227 <description>Time of the last transition</description>
228 <default>
229
230 <expression>state_change/getDateTime</expression>
231 </default>
232 <guard>
233 </guard>
234 </variable>
235 <script script_id="sendNotificationEmail"
236 type="Script (Python)"
237 filename="workflows/portfolio_workflow/scripts/sendNotificationEmail.py"
238 module="" function=""/>
239 </dc-workflow>