Commit 2882aa1c authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

make shorter url for empty selection_name case.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38582 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f7ccefeb
...@@ -2426,16 +2426,21 @@ class ListBoxHTMLRendererLine(ListBoxRendererLine): ...@@ -2426,16 +2426,21 @@ class ListBoxHTMLRendererLine(ListBoxRendererLine):
error = sys.exc_info()) error = sys.exc_info())
else: else:
try: try:
url = '%s/view?ignore_layout:int=%s&reset:int=1' % ( url = '%s/view' % (
# brain.absolute_url() is slow because it invokes # brain.absolute_url() is slow because it invokes
# _aq_dynamic() every time to get brain.REQUEST, # _aq_dynamic() every time to get brain.REQUEST,
# so we call request.physicalPathToURL() directly # so we call request.physicalPathToURL() directly
# instead of brain.absolute_url(). # instead of brain.absolute_url().
request.physicalPathToURL(brain.getPath()), request.physicalPathToURL(brain.getPath()),)
ignore_layout) params = []
if ignore_layout:
params.append('ignore_layout:int=1')
if selection_name: if selection_name:
url += '&selection_index=%s&selection_name=%s' % ( params.extend(('selection_name=%s' % selection_name,
self.index, selection_name) 'selection_index=%s' % self.index,
'reset:int=1'))
if params:
url = '%s?%s' % (url, '&'.join(params))
except AttributeError: except AttributeError:
pass pass
......
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