Commit ea835668 authored by Kristian Rother's avatar Kristian Rother

2007-01-22 JPS

* Fix for Web Pages to work with the admin toolbox.

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