Commit 2a6df3b3 authored by Jean-Paul Smets's avatar Jean-Paul Smets

2007-01-19 JPS - More improvements

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12163 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fdd50175
......@@ -98,7 +98,7 @@
</item>
<item>
<key> <string>init_script</string> </key>
<value> <string></string> </value>
<value> <string>WebPage_init</string> </value>
</item>
<item>
<key> <string>permission</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>
<none/>
</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>context.setTextFormat(\'text/html\')\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</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>
</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>WebPage_init</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -61,7 +61,7 @@
<key> <string>group_list</string> </key>
<value>
<list>
<string>left webcontent</string>
<string>webcontent header bottom</string>
<string>bottom</string>
</list>
</value>
......@@ -79,7 +79,7 @@
</value>
</item>
<item>
<key> <string>left webcontent</string> </key>
<key> <string>webcontent header bottom</string> </key>
<value>
<list>
<string>my_title</string>
......
......@@ -215,7 +215,7 @@
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
......
......@@ -127,13 +127,15 @@ crumb_list = []\n
\n
# Implementation consists in browsing the aq_parent sequence\n
while crumb is not None:\n
crumb_list.append(( crumb.getProperty(\'translated_short_title\', None) or crumb.getTranslatedTitleOrId()\n
, crumb\n
))\n
crumb_list.append((crumb.getProperty(\'translated_short_title\', None) or\\\n
crumb.getProperty(\'translated_title_or_id\', None) or\\\n
crumb.title\n
, crumb\n
))\n
if crumb.getPortalType() == \'Web Site\':\n
crumb = None # Don\'t go higher than the first Web Site found\n
else:\n
crumb = crumb.getParentValue()\n
crumb = crumb.aq_parent # Acquisition through context\n
\n
crumb_list.reverse()\n
return crumb_list\n
......
......@@ -100,11 +100,11 @@ language = portal.Localizer.get_selected_language()\n
\n
# Search the catalog for all documents matching the reference\n
# this will only return documents which are accessible by the user\n
web_page_list = portal_catalog(reference=name, portal_type=valid_portal_type_list, \n
order_by=[(\'index\', \'descending\'), (\'version\', \'descending\')],\n
language=language)\n
# XXX - group_by is missing here\n
# portal_catalog extension required\n
web_page_list = portal_catalog(reference=name, portal_type=valid_portal_type_list,\n
language=language,\n
order_by=[(\'version\', \'descending\')],\n
group_by=(\'reference\',))\n
\n
try:\n
# Try to get the first page on the list\n
web_page = web_page_list[0]\n
......@@ -112,9 +112,8 @@ try:\n
except IndexError:\n
# Search again without the language\n
web_page_list = portal_catalog(reference=name, portal_type=\'Web Page\', \n
order_by=[(\'index\', \'descending\'), (\'version\', \'descending\')])\n
# XXX - group_by is missing here\n
# portal_catalog extension required\n
order_by=[(\'version\', \'descending\')],\n
group_by=(\'reference\',))\n
try:\n
# Try to get the first page on the list\n
web_page = web_page_list[0]\n
......
......@@ -126,6 +126,8 @@ if not kw.has_key(\'validation_state\'):\n
\'released\', \'published\', \'restricted\']\n
if not kw.has_key(\'order_by\'):\n
kw[\'order_by\'] = [(\'int_index\', \'descending\')]\n
#if not kw.has_key(\'group_by\'):\n
# kw[\'group_by\'] = [(\'reference\',)]\n
\n
# Return the list of matching documents for the given states\n
return current_section.searchResults(**kw)\n
......
......@@ -112,9 +112,9 @@ if document.getPortalType() not in valid_portal_type_list:\n
return document.absolute_url()\n
\n
# Return absolute URL if this is not a \'live\' document\n
validation_state=[\'draft\', \'submitted\', \'shared\', # WARNING - this is a copy from WebSection_getDocumentValueList\n
\'released\', \'published\', \'restricted\']\n
if document.getValidationState() not in validation_state:\n
validation_state = [\'draft\', \'submitted\', \'shared\', # WARNING - this is a copy from WebSection_getDocumentValueList\n
\'released\', \'published\', \'restricted\']\n
if not document.getReference() or document.getValidationState() not in validation_state:\n
return document.absolute_url()\n
\n
# Return the URL\n
......
......@@ -80,7 +80,8 @@
<key> <string>webcontent bottom</string> </key>
<value>
<list>
<string>my_section_content</string>
<string>my_description</string>
<string>listbox</string>
</list>
</value>
</item>
......@@ -88,8 +89,7 @@
<key> <string>webcontent header bottom</string> </key>
<value>
<list>
<string>page_title</string>
<string>page_summary</string>
<string>my_title</string>
</list>
</value>
</item>
......
......@@ -14,7 +14,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_section_content</string> </value>
<value> <string>listbox</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
......@@ -4,8 +4,8 @@
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Form.EditorField</string>
<string>EditorField</string>
<string>Products.Formulator.StandardFields</string>
<string>TextAreaField</string>
</tuple>
<none/>
</tuple>
......@@ -14,7 +14,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_text_content</string> </value>
<value> <string>my_description</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -263,7 +263,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Text Content</string> </value>
<value> <string>Description</string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
......
......@@ -14,7 +14,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>page_title</string> </value>
<value> <string>my_title</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -124,9 +124,7 @@
</item>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -201,7 +199,7 @@
</item>
<item>
<key> <string>default</string> </key>
<value> <string>Current Page Title</string> </value>
<value> <string>Web Section</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -265,23 +263,4 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.ERP5Web_getVerboseTitle()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -80,7 +80,8 @@
<key> <string>webcontent bottom</string> </key>
<value>
<list>
<string>my_section_content</string>
<string>my_description</string>
<string>listbox</string>
</list>
</value>
</item>
......@@ -88,8 +89,7 @@
<key> <string>webcontent header bottom</string> </key>
<value>
<list>
<string>page_title</string>
<string>page_summary</string>
<string>my_title</string>
</list>
</value>
</item>
......
......@@ -14,7 +14,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_section_content</string> </value>
<value> <string>listbox</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -420,10 +420,18 @@
<string>Web Page</string>
<string>Web Page</string>
</tuple>
<tuple>
<string>Product</string>
<string>Product</string>
</tuple>
<tuple>
<string>Web Section</string>
<string>Web Section</string>
</tuple>
<tuple>
<string>Person</string>
<string>Person</string>
</tuple>
</list>
</value>
</item>
......@@ -453,7 +461,7 @@
</item>
<item>
<key> <string>selection_name</string> </key>
<value> <string>site_content_selection</string> </value>
<value> <string>section_content_selection</string> </value>
</item>
<item>
<key> <string>sort</string> </key>
......@@ -479,7 +487,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Site Content</string> </value>
<value> <string>Section Content</string> </value>
</item>
<item>
<key> <string>url_columns</string> </key>
......@@ -526,7 +534,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>objectValues</string> </value>
<value> <string>WebSection_getDocumentValueList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -4,8 +4,8 @@
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Form.EditorField</string>
<string>EditorField</string>
<string>Products.Formulator.StandardFields</string>
<string>TextAreaField</string>
</tuple>
<none/>
</tuple>
......@@ -14,7 +14,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>default_content</string> </value>
<value> <string>my_description</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -136,9 +136,7 @@
</item>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -265,7 +263,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Default Content</string> </value>
<value> <string>Description</string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
......@@ -285,23 +283,4 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.WebSite_getDefaultWebPageValue().getTextContent()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -14,7 +14,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>page_title</string> </value>
<value> <string>my_title</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -124,9 +124,7 @@
</item>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -201,7 +199,7 @@
</item>
<item>
<key> <string>default</string> </key>
<value> <string>Current Web Site Title</string> </value>
<value> <string>Web Section</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -265,23 +263,4 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.ERP5Web_getVerboseTitle()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -14,7 +14,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>dynamic_subcontent_listbox</string> </value>
<value> <string>listbox</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -338,19 +338,15 @@
<value>
<list>
<tuple>
<string>reference</string>
<string>Reference</string>
<string>id</string>
<string>ID</string>
</tuple>
<tuple>
<string>short_title</string>
<string>Short Title</string>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>translated_validation_state_title</string>
<string>Validation State</string>
</tuple>
<tuple>
<string>translated_portal_type</string>
<string>portal_type</string>
<string>Type</string>
</tuple>
<tuple>
......@@ -426,11 +422,11 @@
</item>
<item>
<key> <string>lines</string> </key>
<value> <int>15</int> </value>
<value> <int>10</int> </value>
</item>
<item>
<key> <string>list_action</string> </key>
<value> <string>WebSection_view</string> </value>
<value> <string>Folder_viewContentList</string> </value>
</item>
<item>
<key> <string>list_method</string> </key>
......@@ -444,22 +440,18 @@
<list/>
</value>
</item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>portal_types</string> </key>
<value>
<list>
<tuple>
<string>Web Page</string>
<string>Web Page</string>
</tuple>
<tuple>
<string>Web Section</string>
<string>Web Section</string>
</tuple>
<tuple>
<string>Web Container</string>
<string>Web Container</string>
</tuple>
</list>
</value>
</item>
......@@ -494,12 +486,7 @@
<item>
<key> <string>sort</string> </key>
<value>
<list>
<tuple>
<string>short_title</string>
<string>Short Title</string>
</tuple>
</list>
<list/>
</value>
</item>
<item>
......@@ -520,33 +507,12 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Dynamic Sub Content</string> </value>
<value> <string>Contents</string> </value>
</item>
<item>
<key> <string>url_columns</string> </key>
<value>
<list>
<tuple>
<string>short_title</string>
<string>WebSite_getListboxUrl</string>
</tuple>
<tuple>
<string>translated_validation_state_title</string>
<string>WebSite_getListboxUrl</string>
</tuple>
<tuple>
<string>translated_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>
<list/>
</value>
</item>
</dictionary>
......@@ -569,7 +535,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>WebSection_getDocumentValueList</string> </value>
<value> <string>objectValues</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -14,7 +14,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>page_summary</string> </value>
<value> <string>my_layout</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -124,9 +124,7 @@
</item>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -197,11 +195,11 @@
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string>summary</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string>Current document summary.</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -217,7 +215,7 @@
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
......@@ -245,7 +243,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Summary</string> </value>
<value> <string>Layout</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
......@@ -265,23 +263,4 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getDescription()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.StandardFields</string>
<string>CheckBoxField</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_visible</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Visible</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:here.isVisible() * \'checked\'</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -299,7 +299,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>here/current_web_section/section_content_render</string> </value>
<value> <string>request/current_web_section/section_content_render</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -84,9 +84,9 @@
translateString = context.Base_translateString\n
result = []\n
portal_type = context.getPortalType()\n
parent_object = context.getParentValue()\n
parent_pt = parent_object.getPortalType()\n
request = context.REQUEST\n
current_web_section = request.current_web_section\n
current_web_section_pt = current_web_section.getPortalType()\n
action_dict = request.get(\'actions\', {}) # actions needs to be renamed to action_dict\n
exchange_action_list = action_dict.get(\'object_exchange\', [])\n
button_action_list = action_dict.get(\'object_button\', [])\n
......@@ -113,17 +113,15 @@ else: result.append(dict(\n
label = "%s Icon" % portal_type,\n
))\n
\n
# Append a button to edit the default page\n
\n
# Append a button to edit the parent section\n
if portal_type == \'Web Page\' and parent_pt in (\'Web Section\', \'Web Site\'): result.append(dict(\n
url = "%s/view?editable_mode=1" % parent_object.absolute_url(),\n
icon = parent_object.getIcon(),\n
title = translateString("Edit parent ${portal_type}", mapping=dict(portal_type=parent_pt)),\n
label = "%s Icon" % parent_pt,\n
if portal_type not in (\'Web Section\', \'Web Site\'): result.append(dict(\n
url = "%s/view?editable_mode=1" % current_web_section.absolute_url(),\n
icon = current_web_section.getIcon(),\n
title = translateString("Edit parent ${portal_type}", mapping=dict(portal_type=current_web_section_pt)),\n
label = "%s Icon" % current_web_section_pt,\n
))\n
\n
# Append a button to open WEBDAV\n
# Append all icon buttons\n
for action in button_action_list:\n
if action[\'id\'] == \'webdav\':\n
result.append(dict(\n
......@@ -193,9 +191,9 @@ return result\n
<string>translateString</string>
<string>result</string>
<string>portal_type</string>
<string>parent_object</string>
<string>parent_pt</string>
<string>request</string>
<string>current_web_section</string>
<string>current_web_section_pt</string>
<string>action_dict</string>
<string>exchange_action_list</string>
<string>button_action_list</string>
......
......@@ -51,7 +51,8 @@
<tal:block replace="nothing"><!--\n
This macro is recursive and display lists of lists to display the breadcrumb as a tree.\n
TODO: merge it with site map (similar code)\n
--></tal:block>\n
-->\n
</tal:block>\n
<tal:block metal:define-macro="renderBreadcrumbItem">\n
<ul tal:define="remaining_items remaining_items | nothing"\n
tal:condition="remaining_items">\n
......@@ -65,8 +66,13 @@
</ul>\n
</tal:block>\n
\n
<!-- Initialize the recursive loop -->\n
<div class="breadcrumb" tal:define="remaining_items python: context.getBreadcrumbItemList(here)">\n
<!-- Initialize the recursive loop starting from context or from web section -->\n
<div class="breadcrumb" tal:define="remaining_items python: here.getBreadcrumbItemList(here)"\n
tal:condition="not:request/is_web_section_default_document">\n
<tal:block metal:use-macro="here/breadcrumb/macros/renderBreadcrumbItem"/>\n
</div>\n
<div class="breadcrumb" tal:define="remaining_items python: here.getBreadcrumbItemList(request.current_web_section)"\n
tal:condition="request/is_web_section_default_document">\n
<tal:block metal:use-macro="here/breadcrumb/macros/renderBreadcrumbItem"/>\n
</div>\n
\n
......
......@@ -51,13 +51,15 @@
<tal:block replace="nothing"><!--\n
This widget display a list of sub documents (Web Pages generally) which\n
are published and linked with the current section through Predicate.\n
--></tal:block>\n
-->\n
</tal:block>\n
\n
<ul tal:repeat="document python: request.current_web_section.getDocumentValueList()">\n
<li><a tal:attributes="href python: context.getPermanentURL(document)"\n
<ul tal:repeat="document python:here.getDocumentValueList()">\n
<li><a tal:attributes="href python:here.getPermanentURL(document)"\n
tal:content="python: document.getProperty(\'translated_short_title\', None)\n
or document.getTranslatedTitleOrId()"/></li>\n
</ul>
</ul>\n
]]></string> </value>
</item>
......
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