Commit 9dfca33e authored by Jérome Perrin's avatar Jérome Perrin

update Preference ui so that managers can directly set the priority


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5044 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent eddda564
......@@ -66,7 +66,13 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>if context.getPriority() == 1 :\n
<value> <string># managers can edit the priority field in Preference_view, so they need to have the value\n
if context.getPortalObject().portal_membership.checkPermission("Manage portal", context) :\n
#getAuthenticatedMember().hasRole(context, \'Manager\') :\n
return context.getPriority()\n
\n
# others just want a readable text.\n
if context.getPriority() == 1 :\n
return "Site"\n
elif context.getPriority() == 2 : \n
return "Group"\n
......
......@@ -5,13 +5,19 @@
<tuple>
<tuple>
<string>Products.Formulator.StandardFields</string>
<string>StringField</string>
<string>ListField</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_priority</string> </value>
......@@ -29,8 +35,8 @@
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>Too much input was given.</string> </value>
<key> <string>unknown_selection</string> </key>
<value> <string>You selected an item that was not in the list.</string> </value>
</item>
</dictionary>
</value>
......@@ -56,27 +62,27 @@
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<key> <string>extra_item</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<key> <string>first_item</string> </key>
<value> <string></string> </value>
</item>
<item>
......@@ -84,7 +90,7 @@
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<key> <string>items</string> </key>
<value> <string></string> </value>
</item>
<item>
......@@ -92,11 +98,11 @@
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<key> <string>size</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
......@@ -132,14 +138,6 @@
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value>
......@@ -159,23 +157,33 @@
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<key> <string>extra_item</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<key> <string>first_item</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<key> <string>size</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
......@@ -209,17 +217,9 @@
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
......@@ -233,25 +233,35 @@
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra_item</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>first_item</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
<key> <string>items</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Priority</string> </value>
<key> <string>size</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
<key> <string>title</string> </key>
<value> <string>Priority</string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
......@@ -281,7 +291,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.Preference_getPriorityAsText()</string> </value>
<value> <string>here/Preference_getPriorityAsText</string> </value>
</item>
</dictionary>
</pickle>
......@@ -300,7 +310,26 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.portal_membership.checkPermission("Manager", here)</string> </value>
<value> <string>python:here.getPortalObject().portal_membership.checkPermission("Manage portal", here)</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: [(\'Site\',1), (\'Group\',2), (\'User\',3)]</string> </value>
</item>
</dictionary>
</pickle>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment