Commit 9a61c497 authored by Jérome Perrin's avatar Jérome Perrin

Sometimes context_box_render page template is called on the context of the...

Sometimes context_box_render page template is called on the context of the ERP5 Site, then ERP5 type methods like getPortalType, getParentValue are not available, it's then safer to use their CMF/Zope equivalents getPortalTypeName and aq_parent.




git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8727 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bb809df3
......@@ -90,9 +90,9 @@ XXX: Folder_filter accesses selection directly\n
<option tal:attributes="value jump/url"\n
tal:content="jump/name"></option>\n
</tal:block>\n
<tal:block tal:condition="python: here.getPortalType() in here.portal_types.objectIds() and here.portal_types[here.getPortalType()].Base_getSourceVisibility()">\n
<option tal:attributes="value python: \'%s/manage_workspace\' % (here.portal_types[here.getPortalType()].absolute_url(),)"\n
tal:content="python: \'Edit Portal Type \\\'%s\\\'\' % (here.getPortalType(),)"\n
<tal:block tal:condition="python: here.getPortalTypeName() in here.portal_types.objectIds() and here.portal_types.getTypeInfo(here).Base_getSourceVisibility()">\n
<option tal:attributes="value python: \'%s/manage_workspace\' % (here.portal_types.getTypeInfo(here).absolute_url(),)"\n
tal:content="python: \'Edit Portal Type \\\'%s\\\'\' % (here.getPortalTypeName(),)"\n
i18n:translate="" i18n:domain="ui"></option>\n
</tal:block>\n
<tal:block tal:condition="here/portal_workflow/Base_getSourceVisibility">\n
......@@ -117,8 +117,8 @@ XXX: Folder_filter accesses selection directly\n
<option selected="selected" value=""\n
i18n:translate="" i18n:domain="ui">Action...</option>\n
<tal:block tal:repeat="content here/allowedContentTypes | nothing">\n
<tal:block tal:condition="python: not content.id in here.portal_types.getTypeInfo(here).getHiddenContentTypeList()">\n
<option tal:attributes="value python: \'add \' + content.id"\n
<tal:block tal:condition="python: not content.getId() in here.portal_types.getTypeInfo(here).getHiddenContentTypeList()">\n
<option tal:attributes="value python: \'add \' + content.getId()"\n
i18n:translate="" i18n:domain="ui">\n
Add <tal:block tal:content="content/Title"\n
i18n:name="portal_type" i18n:translate="" i18n:domain="ui"></tal:block>\n
......@@ -198,7 +198,7 @@ XXX: Folder_filter accesses selection directly\n
<span class="description" i18n:translate="" i18n:domain="ui">Print</span>\n
</button>\n
<button class="new" type="submit" title="New"\n
tal:attributes="name python: hasattr(here.getParent(), \'getLastId\') and \'Base_createNewDocument:method\' or \'Folder_create:method\'"\n
tal:attributes="name python: hasattr(here.aq_parent, \'getLastId\') and \'Base_createNewDocument:method\' or \'Folder_create:method\'"\n
i18n:attributes="title" i18n:domain="ui">\n
<span class="image"></span>\n
<span class="description" i18n:translate="" i18n:domain="ui">New</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