Commit fc8c83b8 authored by Mame Coumba Sall's avatar Mame Coumba Sall

Revert back to before 32892 as getCompactTranslatedTitle should not be used


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45793 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ac59fad2
...@@ -2,7 +2,10 @@ ...@@ -2,7 +2,10 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -170,7 +173,7 @@ ...@@ -170,7 +173,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>"Modified version for ERP5 to append the ignore_layout parameter etc. in the URL."\n <value> <string>"Modified version for ERP5 to append the default action (/view) in the URL."\n
\n \n
from Products.CMFCore.utils import getToolByName\n from Products.CMFCore.utils import getToolByName\n
ptool = getToolByName(script, \'portal_properties\')\n ptool = getToolByName(script, \'portal_properties\')\n
...@@ -181,7 +184,7 @@ param = int(context.REQUEST.get(\'ignore_layout\', 0)) and \'?ignore_layout:int= ...@@ -181,7 +184,7 @@ param = int(context.REQUEST.get(\'ignore_layout\', 0)) and \'?ignore_layout:int=
if include_root:\n if include_root:\n
result.append( { \'id\' : \'root\'\n result.append( { \'id\' : \'root\'\n
, \'title\' : ptool.title()\n , \'title\' : ptool.title()\n
, \'url\' : \'%s%s\' % (portal_url, param)\n , \'url\' : \'%s/view%s\' % (portal_url, param)\n
}\n }\n
)\n )\n
\n \n
...@@ -190,30 +193,107 @@ portal = utool.getPortalObject()\n ...@@ -190,30 +193,107 @@ portal = utool.getPortalObject()\n
\n \n
obj = portal\n obj = portal\n
now = []\n now = []\n
module = True\n
for name in relative:\n for name in relative:\n
obj = obj.restrictedTraverse(name)\n obj = obj.restrictedTraverse(name)\n
now.append(name)\n now.append(name)\n
if module:\n
try:\n try:\n
title = obj.getCompactTranslatedTitle()\n title = obj.getTranslatedTitleOrId()\n
except AttributeError:\n except AttributeError:\n
# Some objects do not have getCompactTranslatedTitle.\n title = obj.Title()\n
# UI related codes must run at any cases even if context is non-erp5 objects.\n else:\n
# Otherwise some error messages can be overridden by getCompactTranslatedTitle attribute error.\n
title = obj.Title()\n title = obj.Title()\n
if not name == \'talkback\':\n if not name == \'talkback\':\n
result.append( { \'id\' : name\n result.append( { \'id\' : name\n
, \'title\' : title\n , \'title\' : title\n
, \'url\' : \'%s/%s%s\' % (portal_url, \'/\'.join(now), param)\n , \'url\' : \'%s/%s/view%s\' % (portal_url, \'/\'.join(now), param)\n
}\n }\n
)\n )\n
module = False\n
\n \n
return result\n return result\n
</string> </value> </string> </value>
</item> </item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>include_root=1</string> </value> <value> <string>include_root=1</string> </value>
</item> </item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>include_root</string>
<string>Products.CMFCore.utils</string>
<string>getToolByName</string>
<string>script</string>
<string>ptool</string>
<string>utool</string>
<string>portal_url</string>
<string>result</string>
<string>int</string>
<string>_getattr_</string>
<string>context</string>
<string>param</string>
<string>relative</string>
<string>portal</string>
<string>obj</string>
<string>now</string>
<string>True</string>
<string>module</string>
<string>_getiter_</string>
<string>name</string>
<string>title</string>
<string>AttributeError</string>
<string>False</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<int>1</int>
</tuple>
</value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>breadcrumbs</string> </value> <value> <string>breadcrumbs</string> </value>
...@@ -222,6 +302,12 @@ return result\n ...@@ -222,6 +302,12 @@ return result\n
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Return breadcrumbs</string> </value> <value> <string>Return breadcrumbs</string> </value>
</item> </item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
......
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