Commit 57d1e34b authored by Romain Courteaud's avatar Romain Courteaud

erp5_hal_json_style: XXX hack to edit web site/section

parent 283198e8
...@@ -296,7 +296,7 @@ def selectKwargsForCallable(func, initial_kwargs, kwargs_dict): ...@@ -296,7 +296,7 @@ def selectKwargsForCallable(func, initial_kwargs, kwargs_dict):
url_template_dict = { url_template_dict = {
"form_action": "%(traversed_document_url)s/%(action_id)s", "form_action": "%(traversed_document_url)s/%(action_id)s?portal_skin=HalRestricted",
"traverse_generator": "%(root_url)s/%(script_id)s?mode=traverse" + \ "traverse_generator": "%(root_url)s/%(script_id)s?mode=traverse" + \
"&relative_url=%(relative_url)s&view=%(view)s", "&relative_url=%(relative_url)s&view=%(view)s",
"traverse_generator_action": "%(root_url)s/%(script_id)s?mode=traverse" + \ "traverse_generator_action": "%(root_url)s/%(script_id)s?mode=traverse" + \
...@@ -2397,6 +2397,7 @@ is_web_mode = (context.REQUEST.get('current_web_section', None) is not None) or ...@@ -2397,6 +2397,7 @@ is_web_mode = (context.REQUEST.get('current_web_section', None) is not None) or
# is_web_mode = traversed_document.isWebMode() # is_web_mode = traversed_document.isWebMode()
if is_web_mode: if is_web_mode:
site_root = context.getWebSectionValue() site_root = context.getWebSectionValue()
site_root = portal.web_site_module.renderjs_runner.hateoas
view_action_type = site_root.getLayoutProperty("configuration_view_action_category", default='object_view') view_action_type = site_root.getLayoutProperty("configuration_view_action_category", default='object_view')
else: else:
site_root = portal site_root = portal
......
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