Commit 834427b9 authored by Jérome Perrin's avatar Jérome Perrin

remove preferred visible modules


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6191 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 91b29ecc
...@@ -73,11 +73,6 @@ user = context.portal_membership.getAuthenticatedMember().getUserName()\n ...@@ -73,11 +73,6 @@ user = context.portal_membership.getAuthenticatedMember().getUserName()\n
\n \n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
\n \n
# (BIG) HACK : we invalidate cache if we are call without filter\n
# (ie when we are editing the PreferredVisibleModuleList)\n
if not filter : \n
clearCache()\n
\n
## do not filter when there is no visible module selected\n ## do not filter when there is no visible module selected\n
try : \n try : \n
if len(portal.portal_preferences.getPreferredVisibleModuleList()) == 0 : \n if len(portal.portal_preferences.getPreferredVisibleModuleList()) == 0 : \n
...@@ -85,7 +80,7 @@ try : \n ...@@ -85,7 +80,7 @@ try : \n
except ConflictError : raise\n except ConflictError : raise\n
except : filter = 0\n except : filter = 0\n
\n \n
def getModuleItemList(user=None, portal_path=None, filter=filter):\n def getModuleItemList(user=None, portal_path=None):\n
gettext = context.Localizer.erp5_ui.gettext\n gettext = context.Localizer.erp5_ui.gettext\n
item_list = []\n item_list = []\n
try :\n try :\n
...@@ -95,7 +90,6 @@ def getModuleItemList(user=None, portal_path=None, filter=filter):\n ...@@ -95,7 +90,6 @@ def getModuleItemList(user=None, portal_path=None, filter=filter):\n
url = module.getPath()\n url = module.getPath()\n
label = module.getTitleOrId()\n label = module.getTitleOrId()\n
label = gettext(label)\n label = gettext(label)\n
if not filter or url in portal.portal_preferences.getPreferredVisibleModuleList() : \n
item_list.append((label, url))\n item_list.append((label, url))\n
except ConflictError : raise\n except ConflictError : raise\n
except: pass\n except: pass\n
...@@ -108,7 +102,7 @@ def getModuleItemList(user=None, portal_path=None, filter=filter):\n ...@@ -108,7 +102,7 @@ def getModuleItemList(user=None, portal_path=None, filter=filter):\n
\n \n
getModuleItemList = CachingMethod(getModuleItemList, id=\'ERP5Site_getModuleItemList\')\n getModuleItemList = CachingMethod(getModuleItemList, id=\'ERP5Site_getModuleItemList\')\n
portal_path = context.getPortalObject().getPhysicalPath()\n portal_path = context.getPortalObject().getPhysicalPath()\n
return getModuleItemList(user=user, portal_path=portal_path, filter=filter)\n return getModuleItemList(user=user, portal_path=portal_path)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -123,7 +117,7 @@ return getModuleItemList(user=user, portal_path=portal_path, filter=filter)\n ...@@ -123,7 +117,7 @@ return getModuleItemList(user=user, portal_path=portal_path, filter=filter)\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>filter=1</string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -143,13 +137,12 @@ return getModuleItemList(user=user, portal_path=portal_path, filter=filter)\n ...@@ -143,13 +137,12 @@ return getModuleItemList(user=user, portal_path=portal_path, filter=filter)\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>1</int> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>filter</string>
<string>Products.ERP5Type.Cache</string> <string>Products.ERP5Type.Cache</string>
<string>CachingMethod</string> <string>CachingMethod</string>
<string>clearCache</string> <string>clearCache</string>
...@@ -160,6 +153,7 @@ return getModuleItemList(user=user, portal_path=portal_path, filter=filter)\n ...@@ -160,6 +153,7 @@ return getModuleItemList(user=user, portal_path=portal_path, filter=filter)\n
<string>user</string> <string>user</string>
<string>portal</string> <string>portal</string>
<string>len</string> <string>len</string>
<string>filter</string>
<string>None</string> <string>None</string>
<string>getModuleItemList</string> <string>getModuleItemList</string>
<string>portal_path</string> <string>portal_path</string>
...@@ -174,9 +168,7 @@ return getModuleItemList(user=user, portal_path=portal_path, filter=filter)\n ...@@ -174,9 +168,7 @@ return getModuleItemList(user=user, portal_path=portal_path, filter=filter)\n
<item> <item>
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<tuple> <none/>
<int>1</int>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -106,7 +106,6 @@ ...@@ -106,7 +106,6 @@
<value> <value>
<list> <list>
<string>my_priority</string> <string>my_priority</string>
<string>my_preferred_visible_module_list</string>
<string>my_preferred_section_category</string> <string>my_preferred_section_category</string>
</list> </list>
</value> </value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.StandardFields</string>
<string>MultiListField</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_preferred_visible_module_list</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>unknown_selection</string> </key>
<value> <string>You selected an item that was not in the list.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<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>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>view_separator</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<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>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>view_separator</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Modules that are visible from the main page</string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<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>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>7</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Visible Modules</string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>view_separator</string> </key>
<value> <string encoding="cdata"><![CDATA[
<br />
]]></string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<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:here.ERP5Site_getModuleItemList(filter=0)</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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