Commit 15f41862 authored by Ivan Tyagov's avatar Ivan Tyagov

When we generate "editable" link always use direct url in case we have...

When we generate "editable" link always use direct url in case we have referenced an object through a permanent URL.
parent 229c6aa4
...@@ -49,11 +49,17 @@ ...@@ -49,11 +49,17 @@
<tal:block\n <tal:block\n
tal:define="is_web_mode python: True;\n tal:define="is_web_mode python: True;\n
actions request/actions | python:\n actions request/actions | python:\n
here.Base_filterDuplicateActions(\n here.Base_filterDuplicateActions(here.portal_actions.listFilteredActionsFor(here));\n
here.portal_actions.listFilteredActionsFor(here));\n
dummy python:request.set(\'actions\', actions);\n dummy python:request.set(\'actions\', actions);\n
portal_url python: getattr(here, \'getWebSiteValue\', here.getPortalObject)().absolute_url();\n portal_url python: getattr(here, \'getWebSiteValue\', here.getPortalObject)().absolute_url();\n
portal_type here/getPortalType">\n portal_type here/getPortalType;\n
absolute_url here/absolute_url;\n
is_permanent_document python: getattr(here, \'editable_absolute_url\', None) is not None;\n
document_url python: test(is_permanent_document, \n
getattr(here, \'editable_absolute_url\', absolute_url), \n
absolute_url);\n
http_parameters string:${request/http_parameters}">\n
\n
<ul>\n <ul>\n
<!-- Edit button menu -->\n <!-- Edit button menu -->\n
<li class="toolboxSection" id="edit-document-toolbox">\n <li class="toolboxSection" id="edit-document-toolbox">\n
...@@ -61,7 +67,9 @@ ...@@ -61,7 +67,9 @@
<div class="menu">\n <div class="menu">\n
<ul tal:define="edit_link_list python: here.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 class="menu-link"\n
tal:attributes="href python: link[\'url\'];\n
title python: link[\'title\']">\n
<span>\n <span>\n
<img tal:attributes="src python: link[\'icon\'];\n <img tal:attributes="src python: link[\'icon\'];\n
title python: link[\'label\'];\n title python: link[\'label\'];\n
...@@ -89,28 +97,32 @@ ...@@ -89,28 +97,32 @@
<ul>\n <ul>\n
<tal:block tal:define="allowed_content_type_list here/getVisibleAllowedContentTypeList | python:[] ">\n <tal:block tal:define="allowed_content_type_list here/getVisibleAllowedContentTypeList | python:[] ">\n
<li tal:repeat="content_id allowed_content_type_list">\n <li tal:repeat="content_id allowed_content_type_list">\n
<button class="menu-link" \n \n
<a class="menu-link" \n
tal:attributes="title string:Add ${content_id};\n tal:attributes="title string:Add ${content_id};\n
name python:\'Base_doAction:method\';\n href string:${document_url}/Base_doAction?select_action=add ${content_id}"\n
value python: \'add %s\' % (content_id,) "\n
i18n:translate="" i18n:domain="ui">\n i18n:translate="" i18n:domain="ui">\n
<span>\n
Add <tal:block tal:content="content_id"\n Add <tal:block tal:content="content_id"\n
i18n:name="portal_type" \n i18n:name="portal_type" \n
i18n:translate="" i18n:domain="ui" />\n i18n:translate="" i18n:domain="ui" />\n
</button>\n </span>\n
</a>\n
</li>\n </li>\n
</tal:block>\n </tal:block>\n
<tal:block tal:define="document_template_list here/getDocumentTemplateList | nothing"\n <tal:block tal:define="document_template_list here/getDocumentTemplateList | nothing"\n
tal:condition="document_template_list">\n tal:condition="document_template_list">\n
<li tal:repeat="document_template document_template_list">\n <li tal:repeat="document_template document_template_list">\n
<button class="menu-link"\n \n
<a class="menu-link" \n
tal:attributes="title string:Add ${document_template/getTitle};\n tal:attributes="title string:Add ${document_template/getTitle};\n
name python:\'Base_doAction:method\';\n href string:${document_url}/Base_doAction?select_action=template ${document_template/getRelativeUrl}}"\n
value python:\'template %s\' % (document_template.getRelativeUrl(), )"\n
i18n:translate="" i18n:domain="ui">\n i18n:translate="" i18n:domain="ui">\n
<span>\n
Add <tal:block tal:content="document_template/getTitle"\n Add <tal:block tal:content="document_template/getTitle"\n
i18n:name="document_template" />\n i18n:name="document_template" />\n
</button>\n </span>\n
</a>\n
</li>\n </li>\n
</tal:block>\n </tal:block>\n
</ul>\n </ul>\n
...@@ -118,33 +130,41 @@ ...@@ -118,33 +130,41 @@
<label i18n:translate="" i18n:domain="ui">Workflows</label>\n <label i18n:translate="" i18n:domain="ui">Workflows</label>\n
<ul>\n <ul>\n
<li tal:repeat="action actions/workflow">\n <li tal:repeat="action actions/workflow">\n
<button class="menu-link" tal:content="action/name"\n <tal:block tal:define="action_url python: action[\'url\'].replace(absolute_url, document_url);">\n
<a class="menu-link" \n
tal:attributes="title action/name;\n tal:attributes="title action/name;\n
name python:\'Base_doAction:method\';\n href string:${document_url}/Base_doAction?select_action=workflow ${action_url}&${http_parameters}"\n
value python:\'workflow %s\' % (action[\'url\'], )"\n
i18n:translate="" i18n:domain="ui">\n i18n:translate="" i18n:domain="ui">\n
</button>\n <span tal:content="action/name"/>\n
</a>\n
</tal:block>\n
</li>\n </li>\n
</ul>\n </ul>\n
\n \n
<label i18n:translate="" i18n:domain="ui">Object</label>\n <label i18n:translate="" i18n:domain="ui">Object</label>\n
<ul>\n <ul>\n
<li tal:repeat="action actions/object_action | nothing">\n <li tal:repeat="action actions/object_action | nothing">\n
<button class="menu-link" tal:content="action/name"\n <tal:block tal:define="action_url python: action[\'url\'].replace(absolute_url, document_url);">\n
<a class="menu-link" \n
tal:attributes="title action/name;\n tal:attributes="title action/name;\n
name python:\'Base_doAction:method\';\n href string:${document_url}/Base_doAction?select_action=object ${action_url}&${http_parameters}"\n
value python:\'object %s\' % (action[\'url\'], )"\n i18n:translate="" i18n:domain="ui">\n
i18n:translate="" i18n:domain="ui"></button>\n <span tal:content="action/name"/>\n
</a>\n
</tal:block>\n
</li>\n </li>\n
<tal:block tal:define="object_view_list actions/object_view|nothing;\n <tal:block tal:define="object_view_list actions/object_view|nothing;\n
module_view_list python:[i for i in object_view_list if i[\'id\']==\'module_view\']"\n module_view_list python:[i for i in object_view_list if i[\'id\']==\'module_view\']"\n
tal:condition="module_view_list">\n tal:condition="module_view_list">\n
<li tal:repeat="action module_view_list">\n <li tal:repeat="action module_view_list">\n
<button class="menu-link" tal:content="action/name"\n <tal:block tal:define="action_url python: action[\'url\'].replace(absolute_url, document_url);">\n
<a class="menu-link" \n
tal:attributes="title action/name;\n tal:attributes="title action/name;\n
name python:\'Base_doAction:method\';\n href string:${document_url}/Base_doAction?select_action=object ${action_url}&${http_parameters}"\n
value python:\'object %s\' % (action[\'url\'], )"\n i18n:translate="" i18n:domain="ui">\n
i18n:translate="" i18n:domain="ui"></button>\n <span tal:content="action/name"/>\n
</a>\n
</tal:block>\n
</li>\n </li>\n
</tal:block>\n </tal:block>\n
</ul>\n </ul>\n
...@@ -250,11 +270,18 @@ ...@@ -250,11 +270,18 @@
<ul>\n <ul>\n
<li tal:define="module_list here/WebSection_getToolbarModuleItemList"\n <li tal:define="module_list here/WebSection_getToolbarModuleItemList"\n
tal:repeat="module module_list">\n tal:repeat="module module_list">\n
<button class="menu-link"\n \n
<a class="menu-link" \n
tal:attributes="title python: module[0];\n
href python: \'Base_doModule?select_module=%s\' %module[1]"\n
i18n:translate="" i18n:domain="ui">\n
<span tal:content="python: module[0]"/>\n
</a>\n
<!-- <button class="menu-link"\n
tal:attributes="name string:Base_doModule:method;\n tal:attributes="name string:Base_doModule:method;\n
value python: module[1];\n value python: module[1];\n
title python: module[0]"\n title python: module[0]"\n
tal:content="python: module[0]"></button>\n tal:content="python: module[0]"></button>-->\n
</li>\n </li>\n
</ul>\n </ul>\n
</div>\n </div>\n
......
1054 1055
\ No newline at end of file \ No newline at end of file
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