Commit d078c17d authored by Vincent Pelletier's avatar Vincent Pelletier

Implement erp5_web API.

Remove useless pythons scripts (related to a specific use of erp5_web).
Fix WebSite_createContent.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6105 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cca33e8d
<local_roles_item>
<local_roles>
<role id='jp'>
<role id='vincent'>
<item>Owner</item>
</role>
</local_roles>
......
......@@ -19,9 +19,6 @@
<permission>
<name>Access session data</name>
</permission>
<permission>
<name>AccessContentsInformation</name>
</permission>
<permission>
<name>Add Accelerated HTTP Cache Managers</name>
</permission>
......@@ -29,10 +26,10 @@
<name>Add BTreeFolder2s</name>
</permission>
<permission>
<name>Add Base18 Tools</name>
<name>Add Browser Id Manager</name>
</permission>
<permission>
<name>Add Browser Id Manager</name>
<name>Add CMF Action Icons Tools</name>
</permission>
<permission>
<name>Add CMF Active Processs</name>
......@@ -40,32 +37,38 @@
<permission>
<name>Add CMF Caching Policy Managers</name>
</permission>
<permission>
<name>Add CMF Calendar Tools</name>
</permission>
<permission>
<name>Add CMF Core Tools</name>
</permission>
<permission>
<name>Add CMF Default Tools</name>
</permission>
<permission>
<name>Add CMF Report Tools</name>
</permission>
<permission>
<name>Add CMF Sites</name>
<name>Add CMF Setup Tools</name>
</permission>
<permission>
<name>Add CMFActivity Tools</name>
<name>Add CMF Sites</name>
</permission>
<permission>
<name>Add CMFCalendar Tools</name>
<name>Add CMF Unique Id Tools</name>
</permission>
<permission>
<name>Add CMFCategory Tools</name>
<name>Add CMFActivity Tools</name>
</permission>
<permission>
<name>Add CMFDefault Tools</name>
<name>Add CMFCategory Tools</name>
</permission>
<permission>
<name>Add CMFMailIn Tools</name>
</permission>
<permission>
<name>Add CMFWiki Comment</name>
<name>Add Configured CMF Sites</name>
</permission>
<permission>
<name>Add Content Type Registrys</name>
......@@ -115,9 +118,6 @@
<permission>
<name>Add ERP5Form Tools</name>
</permission>
<permission>
<name>Add ERP5Shop Tools</name>
</permission>
<permission>
<name>Add ERP5SyncML Tools</name>
</permission>
......@@ -151,9 +151,6 @@
<permission>
<name>Add Localizers</name>
</permission>
<permission>
<name>Add MMM Shop Toolss</name>
</permission>
<permission>
<name>Add MailHost objects</name>
</permission>
......@@ -173,7 +170,7 @@
<name>Add Pluggable Index</name>
</permission>
<permission>
<name>Add Portal ZSyncer Tools</name>
<name>Add Plugin Registrys</name>
</permission>
<permission>
<name>Add Python Scripts</name>
......@@ -226,9 +223,6 @@
<permission>
<name>Add ZODB Mount Points</name>
</permission>
<permission>
<name>Add ZSyncers</name>
</permission>
<permission>
<name>Add Zope Tutorials</name>
</permission>
......@@ -247,15 +241,9 @@
<permission>
<name>Add portal topics</name>
</permission>
<permission>
<name>Add shop category</name>
</permission>
<permission>
<name>Change Browser Id Manager</name>
</permission>
<permission>
<name>Change CMFWiki Regulations</name>
</permission>
<permission>
<name>Change DTML Documents</name>
</permission>
......@@ -319,6 +307,9 @@
<permission>
<name>Change configuration</name>
</permission>
<permission>
<name>Change local roles</name>
</permission>
<permission>
<name>Change permissions</name>
</permission>
......@@ -331,15 +322,9 @@
<permission>
<name>Change proxy roles</name>
</permission>
<permission>
<name>Checkout shopping cart</name>
</permission>
<permission>
<name>Copy or Move</name>
</permission>
<permission>
<name>Create CMFWiki Page</name>
</permission>
<permission>
<name>Create Transient Objects</name>
</permission>
......@@ -355,12 +340,6 @@
<permission>
<name>Download ExtFile/ExtImage</name>
</permission>
<permission>
<name>Download Product</name>
</permission>
<permission>
<name>Edit CMFWiki Page</name>
</permission>
<permission>
<name>Edit Factories</name>
</permission>
......@@ -397,9 +376,15 @@
<permission>
<name>Manage Access Rules</name>
</permission>
<permission>
<name>Manage Groups</name>
</permission>
<permission>
<name>Manage Transient Object Container</name>
</permission>
<permission>
<name>Manage Translation Services</name>
</permission>
<permission>
<name>Manage Vocabulary</name>
</permission>
......@@ -415,12 +400,6 @@
<permission>
<name>Manage ZCatalogIndex Entries</name>
</permission>
<permission>
<name>Manage currencies</name>
</permission>
<permission>
<name>Manage extensions</name>
</permission>
<permission>
<name>Manage languages</name>
</permission>
......@@ -433,30 +412,15 @@
<permission>
<name>Manage properties</name>
</permission>
<permission>
<name>Manage shop</name>
</permission>
<permission>
<name>Manage shop catalog</name>
</permission>
<permission>
<name>Manage shop category</name>
</permission>
<permission>
<name>Manage users</name>
</permission>
<permission>
<name>Manage_messages</name>
</permission>
<permission>
<name>Modify Cookie Crumblers</name>
</permission>
<permission>
<name>Modify portal content</name>
</permission>
<permission>
<name>Move CMFWiki Page</name>
</permission>
<permission>
<name>Open/Close Database Connection</name>
</permission>
......@@ -484,6 +448,9 @@
<permission>
<name>Search ZCatalog</name>
</permission>
<permission>
<name>Search for principals</name>
</permission>
<permission>
<name>Set own password</name>
</permission>
......@@ -532,15 +499,6 @@
<permission>
<name>WebDAV access</name>
</permission>
<permission>
<name>ZSyncer: Use ZSyncer</name>
</permission>
<permission>
<name>ZopeProfiler: manage</name>
</permission>
<permission>
<name>ZopeProfiler: view</name>
</permission>
</permission_list>
<portal_type>Web Page Module</portal_type>
<title>Web Pages</title>
......
......@@ -19,9 +19,6 @@
<permission>
<name>Access session data</name>
</permission>
<permission>
<name>AccessContentsInformation</name>
</permission>
<permission>
<name>Add Accelerated HTTP Cache Managers</name>
</permission>
......@@ -29,10 +26,10 @@
<name>Add BTreeFolder2s</name>
</permission>
<permission>
<name>Add Base18 Tools</name>
<name>Add Browser Id Manager</name>
</permission>
<permission>
<name>Add Browser Id Manager</name>
<name>Add CMF Action Icons Tools</name>
</permission>
<permission>
<name>Add CMF Active Processs</name>
......@@ -40,32 +37,38 @@
<permission>
<name>Add CMF Caching Policy Managers</name>
</permission>
<permission>
<name>Add CMF Calendar Tools</name>
</permission>
<permission>
<name>Add CMF Core Tools</name>
</permission>
<permission>
<name>Add CMF Default Tools</name>
</permission>
<permission>
<name>Add CMF Report Tools</name>
</permission>
<permission>
<name>Add CMF Sites</name>
<name>Add CMF Setup Tools</name>
</permission>
<permission>
<name>Add CMFActivity Tools</name>
<name>Add CMF Sites</name>
</permission>
<permission>
<name>Add CMFCalendar Tools</name>
<name>Add CMF Unique Id Tools</name>
</permission>
<permission>
<name>Add CMFCategory Tools</name>
<name>Add CMFActivity Tools</name>
</permission>
<permission>
<name>Add CMFDefault Tools</name>
<name>Add CMFCategory Tools</name>
</permission>
<permission>
<name>Add CMFMailIn Tools</name>
</permission>
<permission>
<name>Add CMFWiki Comment</name>
<name>Add Configured CMF Sites</name>
</permission>
<permission>
<name>Add Content Type Registrys</name>
......@@ -115,9 +118,6 @@
<permission>
<name>Add ERP5Form Tools</name>
</permission>
<permission>
<name>Add ERP5Shop Tools</name>
</permission>
<permission>
<name>Add ERP5SyncML Tools</name>
</permission>
......@@ -151,9 +151,6 @@
<permission>
<name>Add Localizers</name>
</permission>
<permission>
<name>Add MMM Shop Toolss</name>
</permission>
<permission>
<name>Add MailHost objects</name>
</permission>
......@@ -173,7 +170,7 @@
<name>Add Pluggable Index</name>
</permission>
<permission>
<name>Add Portal ZSyncer Tools</name>
<name>Add Plugin Registrys</name>
</permission>
<permission>
<name>Add Python Scripts</name>
......@@ -226,9 +223,6 @@
<permission>
<name>Add ZODB Mount Points</name>
</permission>
<permission>
<name>Add ZSyncers</name>
</permission>
<permission>
<name>Add Zope Tutorials</name>
</permission>
......@@ -247,15 +241,9 @@
<permission>
<name>Add portal topics</name>
</permission>
<permission>
<name>Add shop category</name>
</permission>
<permission>
<name>Change Browser Id Manager</name>
</permission>
<permission>
<name>Change CMFWiki Regulations</name>
</permission>
<permission>
<name>Change DTML Documents</name>
</permission>
......@@ -319,6 +307,9 @@
<permission>
<name>Change configuration</name>
</permission>
<permission>
<name>Change local roles</name>
</permission>
<permission>
<name>Change permissions</name>
</permission>
......@@ -331,15 +322,9 @@
<permission>
<name>Change proxy roles</name>
</permission>
<permission>
<name>Checkout shopping cart</name>
</permission>
<permission>
<name>Copy or Move</name>
</permission>
<permission>
<name>Create CMFWiki Page</name>
</permission>
<permission>
<name>Create Transient Objects</name>
</permission>
......@@ -355,12 +340,6 @@
<permission>
<name>Download ExtFile/ExtImage</name>
</permission>
<permission>
<name>Download Product</name>
</permission>
<permission>
<name>Edit CMFWiki Page</name>
</permission>
<permission>
<name>Edit Factories</name>
</permission>
......@@ -397,9 +376,15 @@
<permission>
<name>Manage Access Rules</name>
</permission>
<permission>
<name>Manage Groups</name>
</permission>
<permission>
<name>Manage Transient Object Container</name>
</permission>
<permission>
<name>Manage Translation Services</name>
</permission>
<permission>
<name>Manage Vocabulary</name>
</permission>
......@@ -415,12 +400,6 @@
<permission>
<name>Manage ZCatalogIndex Entries</name>
</permission>
<permission>
<name>Manage currencies</name>
</permission>
<permission>
<name>Manage extensions</name>
</permission>
<permission>
<name>Manage languages</name>
</permission>
......@@ -433,30 +412,15 @@
<permission>
<name>Manage properties</name>
</permission>
<permission>
<name>Manage shop</name>
</permission>
<permission>
<name>Manage shop catalog</name>
</permission>
<permission>
<name>Manage shop category</name>
</permission>
<permission>
<name>Manage users</name>
</permission>
<permission>
<name>Manage_messages</name>
</permission>
<permission>
<name>Modify Cookie Crumblers</name>
</permission>
<permission>
<name>Modify portal content</name>
</permission>
<permission>
<name>Move CMFWiki Page</name>
</permission>
<permission>
<name>Open/Close Database Connection</name>
</permission>
......@@ -484,6 +448,9 @@
<permission>
<name>Search ZCatalog</name>
</permission>
<permission>
<name>Search for principals</name>
</permission>
<permission>
<name>Set own password</name>
</permission>
......@@ -532,15 +499,6 @@
<permission>
<name>WebDAV access</name>
</permission>
<permission>
<name>ZSyncer: Use ZSyncer</name>
</permission>
<permission>
<name>ZopeProfiler: manage</name>
</permission>
<permission>
<name>ZopeProfiler: view</name>
</permission>
</permission_list>
<portal_type>Web Site Module</portal_type>
<title>Web Sites</title>
......
......@@ -26,7 +26,7 @@
</item>
<item>
<key> <string>connection_string</string> </key>
<value> <string>erp5 erp5 erp5</string> </value>
<value> <string>website2 erp5 erp5</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -565,7 +565,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>WebSite_getDocumentList</string> </value>
<value> <string>WebSite_getDocumentValueList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -14,7 +14,7 @@
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value> <string encoding="base64">O/INCg==</string> </value>
<value> <string encoding="base64">bfINCg==</string> </value>
</item>
<item>
<key> <string>Script_magic</string> </key>
......@@ -66,29 +66,27 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>if create or duplicate:\n
type_name=\'Web Page\'\n
else:\n
<value> <string>portal_type = context.getPortalType()\n
if portal_type not in (\'Web Page\', \'Web Section\'):\n
context.log(\'WebSite_createContent\', \'Unable to clone type %s. Nothing done.\' % type_name)\n
return\n
\n
request = context.REQUEST\n
\n
module = context.getDefaultModule(portal_type=type_name)\n
module = context.getDefaultModule(portal_type=portal_type)\n
new_id = module.generateNewId()\n
new_content = module.newContent(portal_type=type_name,\n
new_content = module.newContent(portal_type=portal_type,\n
container=module,\n
id=str(new_id))\n
new_content.setCategories(context.getCategories())\n
new_content.setReference(reference)\n
new_content.setTitle(title)\n
new_content.setShortTitle(short_title)\n
new_content.setVersion(version)\n
#new_content.setLanguage(language)\n
if duplicate:\n
new_content.setTextContent(context.getTextContent())\n
new_content.setLanguage(language)\n
new_content.setTextContent(context.getTextContent())\n
\n
#redirect_url = new_content.WebSite_getDocumentUrl()\n
redirect_url = "%s/%s" % (request.URL2,new_content.getReference())\n
redirect_url = new_content.WebSite_getDocumentUrl()\n
context.log(\'WebSite_createContent\',\'redirect_url = %s\' % redirect_url)\n
return request.RESPONSE.redirect( redirect_url )\n
</string> </value>
</item>
......@@ -100,7 +98,7 @@ return request.RESPONSE.redirect( redirect_url )\n
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/nexedi/portal_skins/erp5_web/WebSite_createContent</string> </value>
<value> <string>Script (Python):/erp5/portal_skins/erp5_web/WebSite_createContent</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
......@@ -110,7 +108,7 @@ return request.RESPONSE.redirect( redirect_url )\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>reference=\'\', version=\'\', language=\'\', title=\'\', short_title=\'\', create=None, duplicate=None</string> </value>
<value> <string>parent_url=\'\', reference=\'\', version=\'\', language=\'\', short_title=\'\'</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -130,22 +128,21 @@ return request.RESPONSE.redirect( redirect_url )\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>7</int> </value>
<value> <int>5</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>parent_url</string>
<string>reference</string>
<string>version</string>
<string>language</string>
<string>title</string>
<string>short_title</string>
<string>create</string>
<string>duplicate</string>
<string>type_name</string>
<string>_getattr_</string>
<string>context</string>
<string>portal_type</string>
<string>type_name</string>
<string>request</string>
<string>module</string>
<string>new_id</string>
......@@ -169,8 +166,6 @@ return request.RESPONSE.redirect( redirect_url )\n
<string></string>
<string></string>
<string></string>
<none/>
<none/>
</tuple>
</value>
</item>
......
......@@ -14,7 +14,7 @@
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value> <string encoding="base64">O/INCg==</string> </value>
<value> <string encoding="base64">bfINCg==</string> </value>
</item>
<item>
<key> <string>Script_magic</string> </key>
......@@ -68,23 +68,16 @@
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
current_section = context\n
if current_section.getPortalType() in (\'Web Site\', \'Web Section\'):\n
breadcrumb_list = []\n
else:\n
breadcrumb_list = [\'<a href="%s">%s</a>\' % (current_section.WebSite_getDocumentUrl(), current_section.getTitle())]\n
while current_section is not None and current_section.getPortalType() != \'Web Site\':\n
if current_section.getPortalType() == \'Web Section\':\n
breadcrumb_list.append(\'<a href="%s">%s</a>\' % (current_section.WebSite_getDocumentUrl(), current_section.getTitle()))\n
previous_section = current_section\n
current_section = current_section.getParent()\n
html_list = []\n
\n
if current_section.getPortalType() == \'Web Site\':\n
breadcrumb_list.append(\'<a href="%s">%s</a>\' % (current_section.WebSite_getDocumentUrl(), current_section.getTitle()))\n
for crumb in context.WebSite_getBreadcrumbValue():\n
if crumb.getTitle() is None or crumb.getTitle() == \'\':\n
text = crumb.getId()\n
else:\n
text = crumb.getTitle()\n
html_list.append(\'<a href="%s">%s</a>\' % (crumb.WebSite_getUrl(), text))\n
\n
breadcrumb_list.reverse()\n
\n
return \' &gt; \'.join(breadcrumb_list)\n
return \' &gt; \'.join(html_list)\n
]]></string> </value>
......@@ -97,7 +90,7 @@ return \' &gt; \'.join(breadcrumb_list)\n
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/nexedi/portal_skins/erp5_web/WebSite_getBreadcrumb</string> </value>
<value> <string>Script (Python):/erp5/portal_skins/erp5_web/WebSite_getBreadcrumb</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
......@@ -127,12 +120,13 @@ return \' &gt; \'.join(breadcrumb_list)\n
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>context</string>
<string>current_section</string>
<string>html_list</string>
<string>_getiter_</string>
<string>_getattr_</string>
<string>breadcrumb_list</string>
<string>context</string>
<string>crumb</string>
<string>None</string>
<string>previous_section</string>
<string>text</string>
</tuple>
</value>
</item>
......
......@@ -14,7 +14,7 @@
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value> <string encoding="base64">O/INCg==</string> </value>
<value> <string encoding="base64">bfINCg==</string> </value>
</item>
<item>
<key> <string>Script_magic</string> </key>
......@@ -66,18 +66,19 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>current_section = context\n
if current_section.getPortalType() == \'Web Section\':\n
previous_section = current_section\n
else:\n
previous_section = None\n
while current_section is not None and current_section.getPortalType() != \'Web Site\':\n
if current_section.getPortalType() == \'Web Section\':\n
previous_section = current_section\n
current_section = current_section.getParent()\n
<value> <string>crumb = context\n
crumb_list = []\n
\n
section_list = current_section.objectValues(portal_type = \'Web Section\', sort_on=\'int_index\')\n
return filter(lambda x: x.isVisible(), section_list)\n
while hasattr(crumb,\'getPortalType\'):\n
crumb_list.append(crumb)\n
if crumb.getPortalType() == \'Web Site\':\n
crumb = None # Don\'t go higher than the first Web Site found\n
else:\n
crumb = crumb.getParent()\n
\n
crumb_list.reverse()\n
\n
return crumb_list\n
</string> </value>
</item>
<item>
......@@ -88,7 +89,13 @@ return filter(lambda x: x.isVisible(), section_list)\n
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/nexedi/portal_skins/erp5_web/WebSite_getMainSectionList</string> </value>
<value> <string>Script (Python):/erp5/portal_skins/erp5_web/WebSite_getBreadcrumbValue</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
......@@ -119,12 +126,11 @@ return filter(lambda x: x.isVisible(), section_list)\n
<value>
<tuple>
<string>context</string>
<string>current_section</string>
<string>crumb</string>
<string>crumb_list</string>
<string>hasattr</string>
<string>_getattr_</string>
<string>previous_section</string>
<string>None</string>
<string>section_list</string>
<string>filter</string>
</tuple>
</value>
</item>
......@@ -141,7 +147,7 @@ return filter(lambda x: x.isVisible(), section_list)\n
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSite_getMainSectionList</string> </value>
<value> <string>WebSite_getBreadcrumbValue</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value> <string encoding="base64">bfINCg==</string> </value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>portal_catalog = portal.portal_catalog\n
\n
# First try to get a published document\n
matching_document_list = portal_catalog(reference = \'%s\' % name, portal_type=(\'Web Page\',), validation_state=\'published\')\n
if len(matching_document_list):\n
return matching_document_list[0].getObject()\n
# Then try to get any document\n
matching_document_list = portal_catalog(reference = \'%s\' % name, portal_type=(\'Web Page\',))\n
if len(matching_document_list):\n
return matching_document_list[0].getObject()\n
return None\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/erp5/portal_skins/erp5_web/WebSite_getDocument</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>portal, name</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>portal</string>
<string>name</string>
<string>_getattr_</string>
<string>portal_catalog</string>
<string>matching_document_list</string>
<string>len</string>
<string>_getitem_</string>
<string>None</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSite_getDocument</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value> <string encoding="base64">bfINCg==</string> </value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>if reference_path is None:\n
reference_path = context\n
if context.WebSite_getDocumentValue() is not None:\n
return "%s/%s" % (reference_path.WebSite_getSectionValue().WebSite_getUrl(),context.WebSite_getDocumentValue().getRelativeUrl())\n
return None\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/erp5/portal_skins/erp5_web/WebSite_getDocumentPhysicalPath</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>reference_path = None</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>reference_path</string>
<string>None</string>
<string>context</string>
<string>_getattr_</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<none/>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSite_getDocumentPhysicalPath</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -14,7 +14,7 @@
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value> <string encoding="base64">O/INCg==</string> </value>
<value> <string encoding="base64">bfINCg==</string> </value>
</item>
<item>
<key> <string>Script_magic</string> </key>
......@@ -66,17 +66,9 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>current_section = context\n
if current_section.getPortalType() == \'Web Section\':\n
previous_section = current_section\n
else:\n
previous_section = None\n
while current_section is not None and current_section.getPortalType() != \'Web Site\':\n
if current_section.getPortalType() == \'Web Section\':\n
previous_section = current_section\n
current_section = current_section.getParent()\n
\n
return previous_section\n
<value> <string>if context.WebSite_getDocumentValue() is not None:\n
return context.WebSite_getDocumentValue().WebSite_getUrl()\n
return context.WebSite_getUrl()\n
</string> </value>
</item>
<item>
......@@ -87,7 +79,13 @@ return previous_section\n
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/nexedi/portal_skins/erp5_web/WebSite_getMainSection</string> </value>
<value> <string>Script (Python):/erp5/portal_skins/erp5_web/WebSite_getDocumentUrl</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
......@@ -117,10 +115,8 @@ return previous_section\n
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>context</string>
<string>current_section</string>
<string>_getattr_</string>
<string>previous_section</string>
<string>context</string>
<string>None</string>
</tuple>
</value>
......@@ -138,7 +134,7 @@ return previous_section\n
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSite_getMainSection</string> </value>
<value> <string>WebSite_getDocumentUrl</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value> <string encoding="base64">bfINCg==</string> </value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>portal_type = context.getPortalType()\n
if portal_type == \'Web Site\':\n
return None\n
if portal_type == \'Web Section\':\n
return context.getDefaultSourceValue()\n
return context\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/erp5/portal_skins/erp5_web/WebSite_getDocumentValue</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>_getattr_</string>
<string>context</string>
<string>portal_type</string>
<string>None</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSite_getDocumentValue</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -14,7 +14,7 @@
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value> <string encoding="base64">O/INCg==</string> </value>
<value> <string encoding="base64">bfINCg==</string> </value>
</item>
<item>
<key> <string>Script_magic</string> </key>
......@@ -76,7 +76,7 @@ def content_cmp(c1, c2):\n
c2_value = c2.getObject() \n
#if hasattr(c1, \'getShortTitle\') and c1.getShortTitle() == \'Overview\': return -1\n
#if hasattr(c2, \'getShortTitle\') and c2.getShortTitle() == \'Overview\': return 1\n
return cmp(c1_value.getIntIndex(), c2_value.getIntIndex()) \n
return cmp(c1_value.getIntIndex(), c2_value.getIntIndex())\n
\n
if context.getMembershipCriterionCategoryList():\n
domain = DomainSelection(domain_dict = {\'web_site\': context})\n
......@@ -120,7 +120,7 @@ return brain_list\n
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/nexedi/portal_skins/erp5_web/WebSite_getDocumentList</string> </value>
<value> <string>Script (Python):/erp5/portal_skins/erp5_web/WebSite_getDocumentValueList</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
......@@ -186,7 +186,7 @@ return brain_list\n
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSite_getDocumentList</string> </value>
<value> <string>WebSite_getDocumentValueList</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value> <string encoding="base64">bfINCg==</string> </value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>if context.WebSite_getSectionValue() is not None:\n
return context.WebSite_getSectionValue().getTitle()\n
return None\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/erp5/portal_skins/erp5_web/WebSite_getSection</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>_getattr_</string>
<string>context</string>
<string>None</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSite_getSection</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value> <string encoding="base64">bfINCg==</string> </value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>while context is not None and context.getPortalType() not in (\'Web Section\', \'Web Site\'):\n
context = context.getParent()\n
\n
if context is None:\n
return None\n
if context.getPortalType() == \'Web Site\':\n
return None\n
return context\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/erp5/portal_skins/erp5_web/WebSite_getSectionValue</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>context</string>
<string>None</string>
<string>_getattr_</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSite_getSectionValue</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -14,7 +14,7 @@
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value> <string encoding="base64">O/INCg==</string> </value>
<value> <string encoding="base64">bfINCg==</string> </value>
</item>
<item>
<key> <string>Script_magic</string> </key>
......@@ -81,7 +81,7 @@ return current_section\n
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/nexedi/portal_skins/erp5_web/WebSite_getSite</string> </value>
<value> <string>Script (Python):/erp5/portal_skins/erp5_web/WebSite_getSite</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value> <string encoding="base64">bfINCg==</string> </value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>path_list = []\n
\n
for crumb in context.WebSite_getBreadcrumbValue():\n
if crumb.getPortalType() == \'Web Site\':\n
path_list = [context.WebSite_getSite().absolute_url()]\n
elif hasattr(crumb, \'default_reference\') and \\\n
crumb.getPortalType() == \'Web Page\' and \\\n
\'Module\' not in crumb.getParent().getPortalType():\n
path_list.append(crumb.getReference())\n
else:\n
path_list.append(crumb.getId())\n
\n
return \'/\'.join(path_list)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/erp5/portal_skins/erp5_web/WebSite_getUrl</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>path_list</string>
<string>_getiter_</string>
<string>_getattr_</string>
<string>context</string>
<string>crumb</string>
<string>hasattr</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSite_getUrl</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PageTemplates.ZopePageTemplate</string>
<string>ZopePageTemplate</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<tal:block metal:define-macro="global_definition"\n
tal:define="filtered_actions python:context.portal_actions.listFilteredActionsFor(context);\n
object_actions filtered_actions/object_action | nothing;\n
global object_actions python: context.WebSite_replaceActionUrl(object_actions);\n
workflow_actions filtered_actions/workflow | nothing;\n
global workflow_actions python: context.WebSite_replaceActionUrl(workflow_actions);\n
jump_actions filtered_actions/object_jump | nothing;\n
global jump_actions python: context.WebSite_replaceActionUrl(jump_actions);\n
view_actions filtered_actions/object_view | nothing;\n
global view_actions python: context.WebSite_replaceActionUrl(view_actions);\n
"/>
]]></string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSite_globalDefinition</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value> <string encoding="base64">bfINCg==</string> </value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>if action is not None:\n
for pos in range(len(action)):\n
if action[pos].has_key(\'url\'):\n
#context.log(\'WebSite_replaceActionUrl\',\'before : %s\' % action[pos][\'url\'])\n
action[pos].update({\'url\' : action[pos][\'url\'].replace(context.absolute_url(),context.WebSite_getDocumentPhysicalPath())})\n
context.log(\'WebSite_replaceActionUrl\',\'after : %s\' % action[pos][\'url\'])\n
\n
return action\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/erp5/portal_skins/erp5_web/WebSite_replaceActionUrl</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>action</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>action</string>
<string>None</string>
<string>_getiter_</string>
<string>range</string>
<string>len</string>
<string>pos</string>
<string>_getattr_</string>
<string>_getitem_</string>
<string>context</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSite_replaceActionUrl</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -64,10 +64,11 @@
<tal:block metal:fill-slot="main">\n
<tal:block tal:condition="not: editable_mode">\n
<tal:block tal:condition="python:(not ignore_layout) and default_content">\n
<tal:block tal:define="global here python:default_content;\n
global form python:here.WebPage_view;\n
global default_content_title python:here.getTitle()" />\n
<tal:block metal:use-macro="here/form_view/macros/form_render" />\n
<tal:block tal:define="here python:default_content;\n
form python:here.WebPage_view;\n
default_content_title python:here.getTitle()">\n
<tal:block metal:use-macro="here/form_view/macros/form_render" />\n
</tal:block>\n
</tal:block>\n
<tal:block tal:condition="python: ignore_layout or (not default_content)">\n
<tal:block metal:use-macro="here/form_view/macros/form_render" />\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