Commit c822ffa5 authored by Jérome Perrin's avatar Jérome Perrin

don't use ERP5Site_getAbsoluteUrl but REQUEST['BASEPATH1'], it's what's used by

zope to include icons from misc_, and it works under apache RewriteRule



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23745 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a7226db0
...@@ -422,8 +422,6 @@ class OOoChartWidget(Widget.Widget): ...@@ -422,8 +422,6 @@ class OOoChartWidget(Widget.Widget):
here = getattr(form, 'aq_parent', REQUEST) here = getattr(form, 'aq_parent', REQUEST)
# Update the render format based on REQUEST parameters # Update the render format based on REQUEST parameters
render_format = getattr(REQUEST, 'render_format', render_format) render_format = getattr(REQUEST, 'render_format', render_format)
UrlIconOOo='%s/misc_/ERP5OOo/OOo.png' % here.ERP5Site_getAbsoluteUrl()
UrlIconPdf='%s/misc_/ERP5Form/PDF.png' % here.ERP5Site_getAbsoluteUrl()
if render_format == 'html': if render_format == 'html':
field_absolute_url = '%s/%s/%s' % (here.absolute_url(), field_absolute_url = '%s/%s/%s' % (here.absolute_url(),
form.getId(), form.getId(),
...@@ -442,6 +440,7 @@ class OOoChartWidget(Widget.Widget): ...@@ -442,6 +440,7 @@ class OOoChartWidget(Widget.Widget):
alt) alt)
return main_content return main_content
elif format == 'raw': elif format == 'raw':
UrlIconOOo = '%s/misc_/ERP5OOo/OOo.png' % REQUEST['BASEPATH1']
main_content = '''<div class="OOoChartContent"> main_content = '''<div class="OOoChartContent">
<a href="%s?render_format=&display=%s"><img src="%s" alt="OOo"/></a></div> <a href="%s?render_format=&display=%s"><img src="%s" alt="OOo"/></a></div>
''' % (field_absolute_url, ''' % (field_absolute_url,
...@@ -449,6 +448,7 @@ class OOoChartWidget(Widget.Widget): ...@@ -449,6 +448,7 @@ class OOoChartWidget(Widget.Widget):
UrlIconOOo) UrlIconOOo)
return main_content return main_content
elif format == 'pdf': elif format == 'pdf':
UrlIconPdf = '%s/misc_/ERP5Form/PDF.png' % REQUEST['BASEPATH1']
main_content = '''<div class="OOoChartContent"> main_content = '''<div class="OOoChartContent">
<a href="%s?render_format=pdf&display=%s"><img src="%s" alt="PDF" /></a> <a href="%s?render_format=pdf&display=%s"><img src="%s" alt="PDF" /></a>
</div>''' % (field_absolute_url, </div>''' % (field_absolute_url,
......
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