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,8 +90,7 @@ def getModuleItemList(user=None, portal_path=None, filter=filter):\n ...@@ -95,8 +90,7 @@ 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
except ConflictError : raise\n except ConflictError : raise\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>
......
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