Commit 0837773d authored by Jean-Paul Smets's avatar Jean-Paul Smets

made admin_toolbox renderer gadget compliant by calculating actions if not provided in the request

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20312 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6efbc340
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<string>Products.PythonScripts.PythonScript</string> <tuple/>
<string>PythonScript</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -91,7 +88,7 @@ action_dict = request.get(\'actions\', {}) # XXX actions needs to be renamed to ...@@ -91,7 +88,7 @@ action_dict = request.get(\'actions\', {}) # XXX actions needs to be renamed to
exchange_action_list = action_dict.get(\'object_exchange\', [])\n exchange_action_list = action_dict.get(\'object_exchange\', [])\n
button_action_list = action_dict.get(\'object_button\', [])\n button_action_list = action_dict.get(\'object_button\', [])\n
portal_url = context.portal_url()\n portal_url = context.portal_url()\n
http_parameters = request.get(\'http_parameters\')\n http_parameters = request.get(\'http_parameters\', \'\')\n
http_parameters = http_parameters.replace(\'editable_mode\', \'dummy_editable_mode\')\n http_parameters = http_parameters.replace(\'editable_mode\', \'dummy_editable_mode\')\n
\n \n
# Try to get the original absolute_url if this is a permanent URL\n # Try to get the original absolute_url if this is a permanent URL\n
......
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
<string>Products.PageTemplates.ZopePageTemplate</string> <tuple/>
<string>ZopePageTemplate</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -60,7 +57,10 @@ ...@@ -60,7 +57,10 @@
\n \n
<tal:block\n <tal:block\n
tal:define="is_web_mode python: True;\n tal:define="is_web_mode python: True;\n
portal_type python: here.getPortalType()">\n portal_type python: here.getPortalType();\n
actions request/actions | python:\n
here.Base_filterDuplicateActions(here.portal_actions.listFilteredActionsFor(here));\n
dummy python:request.set(\'actions\', actions);">\n
\n \n
<!-- XXX is this really useful - called how many times ?? - tried to removed but failed -->\n <!-- XXX is this really useful - called how many times ?? - tried to removed but failed -->\n
<!-- <tal:block metal:use-macro="here/global_definitions/macros/header_definitions"/> -->\n <!-- <tal:block metal:use-macro="here/global_definitions/macros/header_definitions"/> -->\n
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<!-- Edit button menu -->\n <!-- Edit button menu -->\n
<div name="adminSection" class="adminSection">\n <div name="adminSection" class="adminSection">\n
<h3 i18n:translate="" i18n:domain="ui">Edit</h3>\n <h3 i18n:translate="" i18n:domain="ui">Edit</h3>\n
<ul tal:define="edit_link_list python: context.Base_getAdminToolboxEditShortcutList()">\n <ul tal:define="edit_link_list python: here.Base_getAdminToolboxEditShortcutList()">\n
<li tal:repeat="link edit_link_list">\n <li tal:repeat="link edit_link_list">\n
<a tal:attributes="href python: link[\'url\']">\n <a tal:attributes="href python: link[\'url\']">\n
<img tal:attributes="src python: link[\'icon\'];\n <img tal:attributes="src python: link[\'icon\'];\n
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
\n \n
We need to setup the actions variable from the request because\n We need to setup the actions variable from the request because\n
this template is called from outside the main rendering process-->\n this template is called from outside the main rendering process-->\n
<div name="adminSection" class="adminSection" tal:define="actions request/actions">\n <div name="adminSection" class="adminSection">\n
<h3><tal:block tal:content="portal_type"/> Actions</h3>\n <h3><tal:block tal:content="portal_type"/> Actions</h3>\n
<tal:block metal:use-macro="here/context_box_render/macros/action"/>\n <tal:block metal:use-macro="here/context_box_render/macros/action"/>\n
</div>\n </div>\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