Commit 2f1fadb2 authored by Kevin Deldycke's avatar Kevin Deldycke

WebSite_getDocumentPhysicalPath() was changed and currently always return an...

WebSite_getDocumentPhysicalPath() was changed and currently always return an object. Use an alternate method to guess if we are at root or not.
Define globals even if no document found.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8768 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1bc43667
......@@ -61,7 +61,7 @@
global is_edit_mode python: not (not(hasattr(context.REQUEST, \'editable_mode\')) or not(context.REQUEST[\'editable_mode\']));\n
global is_section python: context.getPortalType() == \'Web Section\';\n
global is_webdoc python: context.getPortalType() == \'Web Page\';\n
global is_portal_root python: context.WebSite_getDocumentPhysicalPath() == None;\n
global is_portal_root python: not is_section and not is_webdoc;\n
global valid_default_doc python: default_doc != None and default_doc.getPortalType() == \'Web Page\';\n
">\n
<tal:block tal:condition="python: document is not None">\n
......@@ -77,6 +77,19 @@
global view_actions python: document.WebSite_replaceActionUrl(view_actions);\n
"/>\n
</tal:block>\n
<tal:block tal:condition="python: document is None">\n
<tal:block\n
tal:define=" filtered_actions python: here.portal_actions.listFilteredActionsFor(here);\n
object_actions filtered_actions/object_action | nothing;\n
workflow_actions filtered_actions/workflow | nothing;\n
jump_actions filtered_actions/object_jump | nothing;\n
view_actions filtered_actions/object_view | nothing;\n
global object_actions python: here.WebSite_replaceActionUrl(object_actions);\n
global workflow_actions python: here.WebSite_replaceActionUrl(workflow_actions);\n
global jump_actions python: here.WebSite_replaceActionUrl(jump_actions);\n
global view_actions python: here.WebSite_replaceActionUrl(view_actions);\n
"/>\n
</tal:block>\n
</tal:block>\n
</tal:block>
......
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