diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Preference_getPriorityAsText.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Preference_getPriorityAsText.xml index 73d2b349516d12bbc7d1354b8642f9f96a20ee96..3a8f1220a36b06d4f645ef32fdaab49018d91d6d 100755 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Preference_getPriorityAsText.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Preference_getPriorityAsText.xml @@ -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 diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Preference_view/my_priority.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Preference_view/my_priority.xml index 559d618151027dccd0e541f51728d87d4bb0ac36..e629e803783786b6adf79a4e17bf24a5794c5159 100755 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Preference_view/my_priority.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Preference_view/my_priority.xml @@ -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>