Commit 4dd8c8ff authored by Sven Franck's avatar Sven Franck

erp5_corporate_identity: make remaining urls relative to pass tests

parent 6ee4412c
...@@ -37,20 +37,19 @@ if theme is not None: ...@@ -37,20 +37,19 @@ if theme is not None:
theme_logo_url = logo_prefix + theme.capitalize() theme_logo_url = logo_prefix + theme.capitalize()
try: try:
theme_logo = context.restrictedTraverse(theme_logo_url) theme_logo = context.restrictedTraverse(theme_logo_url)
theme_logo_relative_url = theme_logo.getRelativeUrl()
theme_logo_description = theme_logo.getDescription()
except LookupError: except LookupError:
#__traceback_info__ = "theme_logo_url: %r" % (theme_logo_url,) #__traceback_info__ = "theme_logo_url: %r" % (theme_logo_url,)
#raise Exception("%s and context: %r" % (theme_logo_url, context.restrictedTraverse(theme_logo_url),)) #raise Exception("%s and context: %r" % (theme_logo_url, context.restrictedTraverse(theme_logo_url),))
theme_logo = None theme_logo = None
if theme_logo:
theme_logo_description = theme_logo.getDescription()
if theme is None: if theme is None:
theme = "default" theme = "default"
theme_dict = {} theme_dict = {}
theme_dict["theme"] = theme theme_dict["theme"] = theme
theme_dict["theme_logo_description"] = theme_logo_description theme_dict["theme_logo_description"] = theme_logo_description
theme_dict["theme_logo_url"] = (theme_logo_url + param) if theme_logo_url is not None else context.Base_getCustomTemplateParameter("fallback_image") theme_dict["theme_logo_url"] = (theme_logo_relative_url + param) if theme_logo_relative_url is not None else context.Base_getCustomTemplateParameter("fallback_image")
theme_dict["template_css_url"] = css_path + pdf + ".css" theme_dict["template_css_url"] = css_path + pdf + ".css"
theme_dict["fallback_img_url"] = context.Base_getCustomTemplateParameter("fallback_image") or blank theme_dict["fallback_img_url"] = context.Base_getCustomTemplateParameter("fallback_image") or blank
theme_dict["theme_css_font_list"] = context.Base_getCustomTemplateParameter(font) or [] theme_dict["theme_css_font_list"] = context.Base_getCustomTemplateParameter(font) or []
......
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