Commit 8d2e2742 authored by Vincent Pelletier's avatar Vincent Pelletier

Change some _filepath to start with /nexedi.

Add a sort for document in sections by last workflow transition date (ie publication date).
More robust global definition to handle the case where there is no default content (triggered at website creation for example).
Correct listbox lines links : call WebSite_getListboxUrl, and make this function pass editable_mode from pages to pages.
Protect against None references in documents.
Keep consistency among getSomething functions : return Urls, not titles/references.
Use translated titles in listbox.
Use WebSite_getDocumentValueList to get WebSite_getDefaultDocumentValue and hence WebSite_getDefaultDocument.
Add the variable 'error_message' in publication workflow.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6467 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 35714e67
...@@ -512,7 +512,28 @@ ...@@ -512,7 +512,28 @@
<item> <item>
<key> <string>url_columns</string> </key> <key> <string>url_columns</string> </key>
<value> <value>
<list/> <list>
<tuple>
<string>id</string>
<string>WebSite_getListboxUrl</string>
</tuple>
<tuple>
<string>title</string>
<string>WebSite_getListboxUrl</string>
</tuple>
<tuple>
<string>portal_type</string>
<string>WebSite_getListboxUrl</string>
</tuple>
<tuple>
<string>creation_date</string>
<string>WebSite_getListboxUrl</string>
</tuple>
<tuple>
<string>modification_date</string>
<string>WebSite_getListboxUrl</string>
</tuple>
</list>
</value> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -346,11 +346,11 @@ ...@@ -346,11 +346,11 @@
<string>Short Title</string> <string>Short Title</string>
</tuple> </tuple>
<tuple> <tuple>
<string>validation_state</string> <string>translated_validation_state_title</string>
<string>Valisation State</string> <string>Validation State</string>
</tuple> </tuple>
<tuple> <tuple>
<string>portal_type</string> <string>translated_portal_type</string>
<string>Type</string> <string>Type</string>
</tuple> </tuple>
<tuple> <tuple>
...@@ -379,12 +379,7 @@ ...@@ -379,12 +379,7 @@
<item> <item>
<key> <string>default_params</string> </key> <key> <string>default_params</string> </key>
<value> <value>
<list> <list/>
<tuple>
<string>validation_state</string>
<string>%</string>
</tuple>
</list>
</value> </value>
</item> </item>
<item> <item>
...@@ -540,11 +535,11 @@ ...@@ -540,11 +535,11 @@
<string>WebSite_getListboxUrl</string> <string>WebSite_getListboxUrl</string>
</tuple> </tuple>
<tuple> <tuple>
<string>validation_state</string> <string>translated_validation_state_title</string>
<string>WebSite_getListboxUrl</string> <string>WebSite_getListboxUrl</string>
</tuple> </tuple>
<tuple> <tuple>
<string>portal_type</string> <string>translated_portal_type</string>
<string>WebSite_getListboxUrl</string> <string>WebSite_getListboxUrl</string>
</tuple> </tuple>
<tuple> <tuple>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>Python_magic</string> </key> <key> <string>Python_magic</string> </key>
<value> <string encoding="base64">bfINCg==</string> </value> <value> <string encoding="base64">O/INCg==</string> </value>
</item> </item>
<item> <item>
<key> <string>Script_magic</string> </key> <key> <string>Script_magic</string> </key>
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
</item> </item>
<item> <item>
<key> <string>_filepath</string> </key> <key> <string>_filepath</string> </key>
<value> <string>Script (Python):/erp5/portal_skins/erp5_web/WebSite_getDefaultDocument</string> </value> <value> <string>Script (Python):/nexedi/portal_skins/erp5_web/WebSite_getDefaultDocument</string> </value>
</item> </item>
<item> <item>
<key> <string>_owner</string> </key> <key> <string>_owner</string> </key>
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
<value> <value>
<tuple> <tuple>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>Python_magic</string> </key> <key> <string>Python_magic</string> </key>
<value> <string encoding="base64">bfINCg==</string> </value> <value> <string encoding="base64">O/INCg==</string> </value>
</item> </item>
<item> <item>
<key> <string>Script_magic</string> </key> <key> <string>Script_magic</string> </key>
...@@ -75,11 +75,10 @@ ...@@ -75,11 +75,10 @@
\n \n
This method can be customised for every Web site\n This method can be customised for every Web site\n
"""\n """\n
source_value = context.WebSite_getDocumentValueList()\n
\n \n
source_value = context.getDefaultSourceValue()\n if source_value is not None and source_value != []:\n
\n return source_value[0].getObject()\n
if source_value is not None:\n
return source_value \n
\n \n
return None\n return None\n
</string> </value> </string> </value>
...@@ -92,7 +91,7 @@ return None\n ...@@ -92,7 +91,7 @@ return None\n
</item> </item>
<item> <item>
<key> <string>_filepath</string> </key> <key> <string>_filepath</string> </key>
<value> <string>Script (Python):/erp5/portal_skins/erp5_web/WebSite_getDefaultDocumentValue</string> </value> <value> <string>Script (Python):/nexedi/portal_skins/erp5_web/WebSite_getDefaultDocumentValue</string> </value>
</item> </item>
<item> <item>
<key> <string>_owner</string> </key> <key> <string>_owner</string> </key>
...@@ -132,6 +131,7 @@ return None\n ...@@ -132,6 +131,7 @@ return None\n
<string>context</string> <string>context</string>
<string>source_value</string> <string>source_value</string>
<string>None</string> <string>None</string>
<string>_getitem_</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>Python_magic</string> </key> <key> <string>Python_magic</string> </key>
<value> <string encoding="base64">bfINCg==</string> </value> <value> <string encoding="base64">O/INCg==</string> </value>
</item> </item>
<item> <item>
<key> <string>Script_magic</string> </key> <key> <string>Script_magic</string> </key>
...@@ -87,7 +87,7 @@ return None\n ...@@ -87,7 +87,7 @@ return None\n
</item> </item>
<item> <item>
<key> <string>_filepath</string> </key> <key> <string>_filepath</string> </key>
<value> <string>Script (Python):/erp5/portal_skins/erp5_web/WebSite_getDocument</string> </value> <value> <string>Script (Python):/nexedi/portal_skins/erp5_web/WebSite_getDocument</string> </value>
</item> </item>
<item> <item>
<key> <string>_owner</string> </key> <key> <string>_owner</string> </key>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>Python_magic</string> </key> <key> <string>Python_magic</string> </key>
<value> <string encoding="base64">bfINCg==</string> </value> <value> <string encoding="base64">O/INCg==</string> </value>
</item> </item>
<item> <item>
<key> <string>Script_magic</string> </key> <key> <string>Script_magic</string> </key>
...@@ -83,7 +83,7 @@ return None\n ...@@ -83,7 +83,7 @@ return None\n
</item> </item>
<item> <item>
<key> <string>_filepath</string> </key> <key> <string>_filepath</string> </key>
<value> <string>Script (Python):/erp5/portal_skins/erp5_web/WebSite_getDocumentPhysicalPath</string> </value> <value> <string>Script (Python):/nexedi/portal_skins/erp5_web/WebSite_getDocumentPhysicalPath</string> </value>
</item> </item>
<item> <item>
<key> <string>_owner</string> </key> <key> <string>_owner</string> </key>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>Python_magic</string> </key> <key> <string>Python_magic</string> </key>
<value> <string encoding="base64">bfINCg==</string> </value> <value> <string encoding="base64">O/INCg==</string> </value>
</item> </item>
<item> <item>
<key> <string>Script_magic</string> </key> <key> <string>Script_magic</string> </key>
...@@ -81,7 +81,7 @@ return context.WebSite_getUrl()\n ...@@ -81,7 +81,7 @@ return context.WebSite_getUrl()\n
</item> </item>
<item> <item>
<key> <string>_filepath</string> </key> <key> <string>_filepath</string> </key>
<value> <string>Script (Python):/erp5/portal_skins/erp5_web/WebSite_getDocumentUrl</string> </value> <value> <string>Script (Python):/nexedi/portal_skins/erp5_web/WebSite_getDocumentUrl</string> </value>
</item> </item>
<item> <item>
<key> <string>_owner</string> </key> <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">O/INCg==</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>return \' %s\' % context.WebSite_getDocumentValue()\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/nexedi/portal_skins/erp5_web/WebSite_getDocumentValueAsText</string> </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>
</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_getDocumentValueAsText</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>Python_magic</string> </key> <key> <string>Python_magic</string> </key>
<value> <string encoding="base64">bfINCg==</string> </value> <value> <string encoding="base64">O/INCg==</string> </value>
</item> </item>
<item> <item>
<key> <string>Script_magic</string> </key> <key> <string>Script_magic</string> </key>
...@@ -76,7 +76,13 @@ if not context.getMembershipCriterionCategoryList() and not context.getSourceLis ...@@ -76,7 +76,13 @@ if not context.getMembershipCriterionCategoryList() and not context.getSourceLis
def content_cmp(c1, c2):\n def content_cmp(c1, c2):\n
c1_value = c1.getObject()\n c1_value = c1.getObject()\n
c2_value = c2.getObject()\n c2_value = c2.getObject()\n
return cmp(c1_value.getIntIndex(), c2_value.getIntIndex())\n c1_index = c1_value.getIntIndex()\n
c2_index = c2_value.getIntIndex()\n
if c1_index != \'\' or c2_index != \'\':\n
return cmp(c1_index, c2_index)\n
c1_time = c1_value.portal_workflow.getInfoFor(ob = c1_value, name = \'time\')\n
c2_time = c2_value.portal_workflow.getInfoFor(ob = c2_value, name = \'time\')\n
return cmp(c1_time, c2_time)\n
\n \n
if context.getMembershipCriterionCategoryList():\n if context.getMembershipCriterionCategoryList():\n
domain = DomainSelection(domain_dict = {\'web_site\': context})\n domain = DomainSelection(domain_dict = {\'web_site\': context})\n
...@@ -129,7 +135,7 @@ return brain_list\n ...@@ -129,7 +135,7 @@ return brain_list\n
</item> </item>
<item> <item>
<key> <string>_filepath</string> </key> <key> <string>_filepath</string> </key>
<value> <string>Script (Python):/erp5/portal_skins/erp5_web/WebSite_getDocumentValueList</string> </value> <value> <string>Script (Python):/nexedi/portal_skins/erp5_web/WebSite_getDocumentValueList</string> </value>
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>Python_magic</string> </key> <key> <string>Python_magic</string> </key>
<value> <string encoding="base64">bfINCg==</string> </value> <value> <string encoding="base64">O/INCg==</string> </value>
</item> </item>
<item> <item>
<key> <string>Script_magic</string> </key> <key> <string>Script_magic</string> </key>
...@@ -66,9 +66,15 @@ ...@@ -66,9 +66,15 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>if brain is not None:\n <value> <string>url = None\n
return \'%s/%s\' % (context.REQUEST[\'URL0\'], brain.getRelativeUrl())\n if brain is not None:\n
return None\n o = brain.getObject()\n
context.log(\'WebSite_getListboxUrl\',\'context : %s\' % context.vincent_context())\n
context.log(\'WebSite_getListboxUrl\',\'brain : %s\' % brain.vincent_context())\n
url = \'%s/%s\' % (context.REQUEST[\'URL1\'], o.getRelativeUrl())\n
if context.REQUEST.has_key(\'editable_mode\') and context.REQUEST[\'editable_mode\']:\n
url = \'%s/view?editable_mode=%s\' % (url, context.REQUEST[\'editable_mode\'])\n
return url\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -79,7 +85,7 @@ return None\n ...@@ -79,7 +85,7 @@ return None\n
</item> </item>
<item> <item>
<key> <string>_filepath</string> </key> <key> <string>_filepath</string> </key>
<value> <string>Script (Python):/erp5/portal_skins/erp5_web/WebSite_getListboxUrl</string> </value> <value> <string>Script (Python):/nexedi/portal_skins/erp5_web/WebSite_getListboxUrl</string> </value>
</item> </item>
<item> <item>
<key> <string>_owner</string> </key> <key> <string>_owner</string> </key>
...@@ -118,9 +124,11 @@ return None\n ...@@ -118,9 +124,11 @@ return None\n
<string>brain</string> <string>brain</string>
<string>selection</string> <string>selection</string>
<string>None</string> <string>None</string>
<string>_getitem_</string> <string>url</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>o</string>
<string>context</string> <string>context</string>
<string>_getitem_</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
<?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">O/INCg==</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>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
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/nexedi/portal_skins/erp5_web/WebSite_getMainSection</string> </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>current_section</string>
<string>_getattr_</string>
<string>previous_section</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_getMainSection</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">O/INCg==</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>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
section_list = current_section.objectValues(portal_type = \'Web Section\', sort_on=\'int_index\')\n
return filter(lambda x: x.isVisible(), section_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):/nexedi/portal_skins/erp5_web/WebSite_getMainSectionList</string> </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>current_section</string>
<string>_getattr_</string>
<string>previous_section</string>
<string>None</string>
<string>section_list</string>
<string>filter</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_getMainSectionList</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>Python_magic</string> </key> <key> <string>Python_magic</string> </key>
<value> <string encoding="base64">bfINCg==</string> </value> <value> <string encoding="base64">O/INCg==</string> </value>
</item> </item>
<item> <item>
<key> <string>Script_magic</string> </key> <key> <string>Script_magic</string> </key>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>section = context.WebSite_getSectionValue()\n <value> <string>section = context.WebSite_getSectionValue()\n
if section is not None:\n if section is not None:\n
return section.WebSite_getUrl()\n return section.getTitle()\n
return None\n return None\n
</string> </value> </string> </value>
</item> </item>
...@@ -80,7 +80,7 @@ return None\n ...@@ -80,7 +80,7 @@ return None\n
</item> </item>
<item> <item>
<key> <string>_filepath</string> </key> <key> <string>_filepath</string> </key>
<value> <string>Script (Python):/erp5/portal_skins/erp5_web/WebSite_getSection</string> </value> <value> <string>Script (Python):/nexedi/portal_skins/erp5_web/WebSite_getSection</string> </value>
</item> </item>
<item> <item>
<key> <string>_owner</string> </key> <key> <string>_owner</string> </key>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>Python_magic</string> </key> <key> <string>Python_magic</string> </key>
<value> <string encoding="base64">bfINCg==</string> </value> <value> <string encoding="base64">O/INCg==</string> </value>
</item> </item>
<item> <item>
<key> <string>Script_magic</string> </key> <key> <string>Script_magic</string> </key>
...@@ -81,7 +81,7 @@ return None\n ...@@ -81,7 +81,7 @@ return None\n
</item> </item>
<item> <item>
<key> <string>_filepath</string> </key> <key> <string>_filepath</string> </key>
<value> <string>Script (Python):/erp5/portal_skins/erp5_web/WebSite_getSectionValue</string> </value> <value> <string>Script (Python):/nexedi/portal_skins/erp5_web/WebSite_getSectionValue</string> </value>
</item> </item>
<item> <item>
<key> <string>_owner</string> </key> <key> <string>_owner</string> </key>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>Python_magic</string> </key> <key> <string>Python_magic</string> </key>
<value> <string encoding="base64">bfINCg==</string> </value> <value> <string encoding="base64">O/INCg==</string> </value>
</item> </item>
<item> <item>
<key> <string>Script_magic</string> </key> <key> <string>Script_magic</string> </key>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>site = context.WebSite_getSiteValue()\n <value> <string>site = context.WebSite_getSiteValue()\n
if site is not None:\n if site is not None:\n
return site.getTitle()\n return site.WebSite_getUrl()\n
return None\n return None\n
</string> </value> </string> </value>
</item> </item>
...@@ -80,7 +80,7 @@ return None\n ...@@ -80,7 +80,7 @@ return None\n
</item> </item>
<item> <item>
<key> <string>_filepath</string> </key> <key> <string>_filepath</string> </key>
<value> <string>Script (Python):/erp5/portal_skins/erp5_web/WebSite_getSite</string> </value> <value> <string>Script (Python):/nexedi/portal_skins/erp5_web/WebSite_getSite</string> </value>
</item> </item>
<item> <item>
<key> <string>_owner</string> </key> <key> <string>_owner</string> </key>
...@@ -117,7 +117,7 @@ return None\n ...@@ -117,7 +117,7 @@ return None\n
<value> <value>
<tuple> <tuple>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>site</string> <string>site</string>
<string>None</string> <string>None</string>
</tuple> </tuple>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>Python_magic</string> </key> <key> <string>Python_magic</string> </key>
<value> <string encoding="base64">bfINCg==</string> </value> <value> <string encoding="base64">O/INCg==</string> </value>
</item> </item>
<item> <item>
<key> <string>Script_magic</string> </key> <key> <string>Script_magic</string> </key>
...@@ -81,7 +81,7 @@ return None\n ...@@ -81,7 +81,7 @@ return None\n
</item> </item>
<item> <item>
<key> <string>_filepath</string> </key> <key> <string>_filepath</string> </key>
<value> <string>Script (Python):/erp5/portal_skins/erp5_web/WebSite_getSiteValue</string> </value> <value> <string>Script (Python):/nexedi/portal_skins/erp5_web/WebSite_getSiteValue</string> </value>
</item> </item>
<item> <item>
<key> <string>_owner</string> </key> <key> <string>_owner</string> </key>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>Python_magic</string> </key> <key> <string>Python_magic</string> </key>
<value> <string encoding="base64">bfINCg==</string> </value> <value> <string encoding="base64">O/INCg==</string> </value>
</item> </item>
<item> <item>
<key> <string>Script_magic</string> </key> <key> <string>Script_magic</string> </key>
...@@ -76,7 +76,10 @@ for crumb in context.WebSite_getBreadcrumbValue():\n ...@@ -76,7 +76,10 @@ for crumb in context.WebSite_getBreadcrumbValue():\n
elif portal_type == \'Web Page\' and \\\n elif portal_type == \'Web Page\' and \\\n
hasattr(crumb, \'default_reference\') and \\\n hasattr(crumb, \'default_reference\') and \\\n
\'Module\' not in parent_portal_type:\n \'Module\' not in parent_portal_type:\n
path_list.append(crumb.getReference())\n ref = crumb.getReference()\n
if ref is None:\n
ref = crumb.getId()\n
path_list.append(ref)\n
else:\n else:\n
path_list.append(crumb.getId())\n path_list.append(crumb.getId())\n
parent_portal_type = portal_type\n parent_portal_type = portal_type\n
...@@ -92,7 +95,7 @@ return \'/\'.join(path_list)\n ...@@ -92,7 +95,7 @@ return \'/\'.join(path_list)\n
</item> </item>
<item> <item>
<key> <string>_filepath</string> </key> <key> <string>_filepath</string> </key>
<value> <string>Script (Python):/erp5/portal_skins/erp5_web/WebSite_getUrl</string> </value> <value> <string>Script (Python):/nexedi/portal_skins/erp5_web/WebSite_getUrl</string> </value>
</item> </item>
<item> <item>
<key> <string>_owner</string> </key> <key> <string>_owner</string> </key>
...@@ -136,6 +139,8 @@ return \'/\'.join(path_list)\n ...@@ -136,6 +139,8 @@ return \'/\'.join(path_list)\n
<string>crumb</string> <string>crumb</string>
<string>portal_type</string> <string>portal_type</string>
<string>hasattr</string> <string>hasattr</string>
<string>ref</string>
<string>None</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -54,18 +54,26 @@ ...@@ -54,18 +54,26 @@
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
<tal:block metal:define-macro="global_definition"\n <tal:block metal:define-macro="global_definition">\n
tal:define="document context/WebSite_getDocumentValue">\n <tal:block tal:define="document context/WebSite_getDocumentValue">\n
<tal:block tal:define="filtered_actions python:document.portal_actions.listFilteredActionsFor(document);\n <tal:block tal:define="global object_actions python: None;\n
object_actions filtered_actions/object_action | nothing;\n global workflow_actions python: None;\n
global object_actions python: document.WebSite_replaceActionUrl(object_actions);\n global jump_actions python: None;\n
workflow_actions filtered_actions/workflow | nothing;\n global view_actions python: None;\n
global workflow_actions python: document.WebSite_replaceActionUrl(workflow_actions);\n "/>\n
jump_actions filtered_actions/object_jump | nothing;\n <tal:block tal:condition="python: document is not None">\n
global jump_actions python: document.WebSite_replaceActionUrl(jump_actions);\n <tal:block tal:define="filtered_actions python:document.portal_actions.listFilteredActionsFor(document);\n
view_actions filtered_actions/object_view | nothing;\n object_actions filtered_actions/object_action | nothing;\n
global view_actions python: document.WebSite_replaceActionUrl(view_actions);\n global object_actions python: document.WebSite_replaceActionUrl(object_actions);\n
"/>\n workflow_actions filtered_actions/workflow | nothing;\n
global workflow_actions python: document.WebSite_replaceActionUrl(workflow_actions);\n
jump_actions filtered_actions/object_jump | nothing;\n
global jump_actions python: document.WebSite_replaceActionUrl(jump_actions);\n
view_actions filtered_actions/object_view | nothing;\n
global view_actions python: document.WebSite_replaceActionUrl(view_actions);\n
"/>\n
</tal:block>\n
</tal:block>\n
</tal:block> </tal:block>
]]></string> </value> ]]></string> </value>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>Python_magic</string> </key> <key> <string>Python_magic</string> </key>
<value> <string encoding="base64">bfINCg==</string> </value> <value> <string encoding="base64">O/INCg==</string> </value>
</item> </item>
<item> <item>
<key> <string>Script_magic</string> </key> <key> <string>Script_magic</string> </key>
...@@ -84,7 +84,7 @@ return action\n ...@@ -84,7 +84,7 @@ return action\n
</item> </item>
<item> <item>
<key> <string>_filepath</string> </key> <key> <string>_filepath</string> </key>
<value> <string>Script (Python):/erp5/portal_skins/erp5_web/WebSite_replaceActionUrl</string> </value> <value> <string>Script (Python):/nexedi/portal_skins/erp5_web/WebSite_replaceActionUrl</string> </value>
</item> </item>
<item> <item>
<key> <string>_owner</string> </key> <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">O/INCg==</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>return context.WebSite_viewSearchResultList(**kw)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/nexedi/portal_skins/erp5_web/WebSite_viewSearchResult</string> </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>_apply_</string>
<string>_getattr_</string>
<string>context</string>
<string>kw</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_viewSearchResult</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -510,15 +510,15 @@ ...@@ -510,15 +510,15 @@
<list> <list>
<tuple> <tuple>
<string>title_or_id</string> <string>title_or_id</string>
<string>WebSite_getDocumentUrl</string> <string>WebSite_getListboxUrl</string>
</tuple> </tuple>
<tuple> <tuple>
<string>description</string> <string>description</string>
<string>WebSite_getDocumentUrl</string> <string>WebSite_getListboxUrl</string>
</tuple> </tuple>
<tuple> <tuple>
<string>portal_type</string> <string>portal_type</string>
<string>WebSite_getDocumentUrl</string> <string>WebSite_getListboxUrl</string>
</tuple> </tuple>
</list> </list>
</value> </value>
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
layout_id layout_form/pt | default_layout;">\n layout_id layout_form/pt | default_layout;">\n
<tal:block metal:use-macro="python:getattr(here,layout_id).macros[\'master\']">\n <tal:block metal:use-macro="python:getattr(here,layout_id).macros[\'master\']">\n
<tal:block metal:fill-slot="main">\n <tal:block metal:fill-slot="main">\n
<tal:block tal:condition="python:(not editable_mode) and (not ignore_layout) and default_content is not None">\n <tal:block tal:condition="python:(not editable_mode) and (not ignore_layout) and (default_content is not None)">\n
<tal:block tal:define="global here python:default_content;\n <tal:block tal:define="global here python:default_content;\n
global form python:here.WebPage_view;\n global form python:here.WebPage_view;\n
global default_content_title python:here.getTitle()"/>\n global default_content_title python:here.getTitle()"/>\n
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.DCWorkflow.Variables</string>
<string>VariableDefinition</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>error_message</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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