Commit f4448b22 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

cleanup PreferenceTool_viewPreferenceList.

* display priority as text even for Manager.
* remove (already disactivated) owner and portal_type column.
* modify a column name from 'Active' to 'Status'.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25529 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dd6e0735
......@@ -72,9 +72,7 @@
<item>
<key> <string>hidden</string> </key>
<value>
<list>
<string>listbox_owner</string>
</list>
<list/>
</value>
</item>
</dictionary>
......
......@@ -313,36 +313,7 @@
<item>
<key> <string>all_columns</string> </key>
<value>
<list>
<tuple>
<string>id</string>
<string>ID</string>
</tuple>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>description</string>
<string>Description</string>
</tuple>
<tuple>
<string>translated_preference_state_title</string>
<string>Active</string>
</tuple>
<tuple>
<string>Preference_getPriorityAsText</string>
<string>Level</string>
</tuple>
<tuple>
<string>owner</string>
<string>Owner</string>
</tuple>
<tuple>
<string>portal_type</string>
<string>Type</string>
</tuple>
</list>
<list/>
</value>
</item>
<item>
......@@ -373,7 +344,7 @@
</tuple>
<tuple>
<string>translated_preference_state_title</string>
<string>Active</string>
<string>Status</string>
</tuple>
<tuple>
<string>Preference_getPriorityAsText</string>
......@@ -456,7 +427,7 @@
</item>
<item>
<key> <string>list_action</string> </key>
<value> <string>list</string> </value>
<value> <string>PreferenceTool_viewPreferenceList</string> </value>
</item>
<item>
<key> <string>list_cookie</string> </key>
......@@ -567,6 +538,12 @@
<key> <string>title</string> </key>
<value> <string>Preferences</string> </value>
</item>
<item>
<key> <string>untranslatable_columns</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>url_columns</string> </key>
<value>
......
......@@ -53,18 +53,11 @@
</item>
<item>
<key> <string>_body</string> </key>
<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
else : \n
return "User"\n
<value> <string>priority_dict = {\n
1:\'Site\',\n
2:\'Group\',\n
}\n
return priority_dict.get(context.getPriority(), \'User\')\n
</string> </value>
</item>
<item>
......@@ -101,6 +94,7 @@ else : \n
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>priority_dict</string>
<string>_getattr_</string>
<string>context</string>
</tuple>
......
1085
\ No newline at end of file
1086
\ No newline at end of file
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