Commit 9aac2a31 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Changes reverted - please use current_web_section in widgets

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12232 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ee248ee7
...@@ -85,10 +85,7 @@ translateString = context.Base_translateString\n ...@@ -85,10 +85,7 @@ translateString = context.Base_translateString\n
result = []\n result = []\n
portal_type = context.getPortalType()\n portal_type = context.getPortalType()\n
request = context.REQUEST\n request = context.REQUEST\n
if(portal_type == \'Web Page\'):\n current_web_section = request.current_web_section\n
current_web_section = context.getParent()\n
else:\n
current_web_section = request.current_web_section\n
current_web_section_pt = current_web_section.getPortalType()\n current_web_section_pt = current_web_section.getPortalType()\n
action_dict = request.get(\'actions\', {}) # actions needs to be renamed to action_dict\n action_dict = request.get(\'actions\', {}) # actions needs to be renamed to action_dict\n
exchange_action_list = action_dict.get(\'object_exchange\', [])\n exchange_action_list = action_dict.get(\'object_exchange\', [])\n
...@@ -103,12 +100,12 @@ editable_absolute_url = getattr(context, \'editable_absolute_url\', absolute_url ...@@ -103,12 +100,12 @@ editable_absolute_url = getattr(context, \'editable_absolute_url\', absolute_url
\n \n
\n \n
# Append a button to edit the current document\n # Append a button to edit the current document\n
if not request.form.get(\'editable_mode\', 0): \n if not request.form.get(\'editable_mode\', 0): result.append(dict(\n
result.append(dict(\n
url = "%s/view?editable_mode:int=1&%s" % (editable_absolute_url, http_parameters),\n url = "%s/view?editable_mode:int=1&%s" % (editable_absolute_url, http_parameters),\n
icon = context.getIcon() or \'file_icon.gif\',\n icon = context.getIcon() or \'file_icon.gif\',\n
title = translateString("Edit ${portal_type}", mapping=dict(portal_type=portal_type)),\n title = translateString("Edit ${portal_type}", mapping=dict(portal_type=portal_type)),\n
label = "%s Icon" % portal_type,))\n label = "%s Icon" % portal_type,\n
))\n
else: result.append(dict(\n else: result.append(dict(\n
url = "%s/view?editable_mode=&%s" % (editable_absolute_url, http_parameters),\n url = "%s/view?editable_mode=&%s" % (editable_absolute_url, http_parameters),\n
icon = context.getIcon() or \'file_icon.gif\',\n icon = context.getIcon() or \'file_icon.gif\',\n
......
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