Commit 4d48744c authored by Jean-Paul Smets's avatar Jean-Paul Smets

2007-01-03 Early release of refactored version of ERP5 Web

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11888 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c953b90d
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>python: object and object.WebSite_getDefaultWebPageValue()</string> </value> <value> <string>python: object is not None and object.WebSite_getDefaultWebPageValue() is not None</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -39,7 +39,20 @@ ...@@ -39,7 +39,20 @@
<item> <item>
<key> <string>_property_domain_dict</string> </key> <key> <string>_property_domain_dict</string> </key>
<value> <value>
<dictionary/> <dictionary>
<item>
<key> <string>short_title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value> </value>
</item> </item>
<item> <item>
...@@ -70,7 +83,7 @@ ...@@ -70,7 +83,7 @@
</item> </item>
<item> <item>
<key> <string>content_meta_type</string> </key> <key> <string>content_meta_type</string> </key>
<value> <string>ERP5 Domain</string> </value> <value> <string>ERP5 Web Section</string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -78,7 +91,7 @@ ...@@ -78,7 +91,7 @@
</item> </item>
<item> <item>
<key> <string>factory</string> </key> <key> <string>factory</string> </key>
<value> <string>addDomain</string> </value> <value> <string>addWebSection</string> </value>
</item> </item>
<item> <item>
<key> <string>filter_content_types</string> </key> <key> <string>filter_content_types</string> </key>
...@@ -117,4 +130,50 @@ ...@@ -117,4 +130,50 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Type.TranslationProviderBase</string>
<string>TranslationInformation</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>short_title</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Type.TranslationProviderBase</string>
<string>TranslationInformation</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>title</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -68,16 +68,17 @@ ...@@ -68,16 +68,17 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>REQUEST = context.REQUEST\n <value> <string>"""\n
Special edit method which returns to editable_mode.\n
The edit_document_url is used to define the URL to return to\n
after editing the document.\n
"""\n
# Retrieve the edit action\n
edit_method = getattr(context, form_action)\n
base_value = edit_method(form_id, **kw)\n
\n \n
if REQUEST.has_key(\'portal_skin\'):\n redir="%s?editable_mode:int=1" % edit_document_url\n
context.portal_skins.clearSkinCookie()\n context.REQUEST[\'RESPONSE\'].redirect(redir)\n
REQUEST.RESPONSE.expireCookie(\'__ac\', path=\'/\')\n
\n
website = context.WebSite_getBreadcrumbItemList()[0][1]\n
website_url = website.absolute_url()\n
\n
return REQUEST.RESPONSE.redirect(website_url)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -92,9 +93,15 @@ return REQUEST.RESPONSE.redirect(website_url)\n ...@@ -92,9 +93,15 @@ return REQUEST.RESPONSE.redirect(website_url)\n
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string></string> </value> <value> <string>form_id, form_action, edit_document_url, **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -114,18 +121,24 @@ return REQUEST.RESPONSE.redirect(website_url)\n ...@@ -114,18 +121,24 @@ return REQUEST.RESPONSE.redirect(website_url)\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>0</int> </value> <value> <int>3</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>form_id</string>
<string>form_action</string>
<string>edit_document_url</string>
<string>kw</string>
<string>getattr</string>
<string>context</string>
<string>edit_method</string>
<string>_apply_</string>
<string>base_value</string>
<string>redir</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string>
<string>REQUEST</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>website</string>
<string>website_url</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -142,7 +155,7 @@ return REQUEST.RESPONSE.redirect(website_url)\n ...@@ -142,7 +155,7 @@ return REQUEST.RESPONSE.redirect(website_url)\n
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>logout</string> </value> <value> <string>Base_editAndEditAsWeb</string> </value>
</item> </item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
......
...@@ -68,10 +68,17 @@ ...@@ -68,10 +68,17 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>for varkey in context.getVarMatchKeys():\n <value> <string># Retrieve the edit action\n
kw[varkey] = context.getVarMatch(varkey)\n """\n
Special edit method which returns to view mode.\n
The view_document_url is used to define the URL to return to\n
after editing the document.\n
"""\n
edit_method = getattr(context, form_action)\n
base_value = edit_method(form_id, **kw)\n
\n \n
return context.getPortalObject().portal_catalog(**kw)\n redir="%s?editable_mode:int=0" % view_document_url\n
context.REQUEST[\'RESPONSE\'].redirect(redir)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -94,7 +101,7 @@ return context.getPortalObject().portal_catalog(**kw)\n ...@@ -94,7 +101,7 @@ return context.getPortalObject().portal_catalog(**kw)\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>**kw</string> </value> <value> <string>form_id, form_action, view_document_url, **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -114,19 +121,24 @@ return context.getPortalObject().portal_catalog(**kw)\n ...@@ -114,19 +121,24 @@ return context.getPortalObject().portal_catalog(**kw)\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>0</int> </value> <value> <int>3</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>form_id</string>
<string>form_action</string>
<string>view_document_url</string>
<string>kw</string> <string>kw</string>
<string>_getiter_</string> <string>getattr</string>
<string>_getattr_</string> <string>context</string>
<string>context</string> <string>edit_method</string>
<string>varkey</string>
<string>_write_</string>
<string>_apply_</string> <string>_apply_</string>
<string>base_value</string>
<string>redir</string>
<string>_getattr_</string>
<string>_getitem_</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -143,7 +155,7 @@ return context.getPortalObject().portal_catalog(**kw)\n ...@@ -143,7 +155,7 @@ return context.getPortalObject().portal_catalog(**kw)\n
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>WorkList_getPendingWorkList</string> </value> <value> <string>Base_editAndViewAsWeb</string> </value>
</item> </item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
......
...@@ -68,52 +68,62 @@ ...@@ -68,52 +68,62 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string># This script is part of ERP5 Web\n <value> <string>"""\n
#\n This script is part of ERP5 Web\n
# ERP5 Web is an extension to ERP5 which provides a way\n
# to create web sites which can display selected\n
# ERP5 contents through multiple custom web layouts.\n
#\n
# This script returns the absolute URL of the current \n
# document in a pretty way and taking into account\n
# virtual hosting. The purpose of this script is to be\n
# able to access documents through a URL such as:\n
#\n
# www.mysite.com/mysection/a-document-reference\n
#\n
# even if the physical path of the document is\n
#\n
# /erp5/web_page_module/33\n
#\n
# The default script looks in the acquisition context\n
# for the first relevant section and build a URL\n
# based on the section absolute_url and on the \n
# document reference. \n
#\n
# More sophisticated behaviours are possible.\n
#\n
# It may be useful to change the behaviour\n
# of WebSite_getDocumentUrl for non anonymous\n
# users or for documents which are not published.\n
#\n
# NOTE: it is still unknown whether this script\n
# needs to be integrated or not to the absolute_url API\n
\n \n
# First build the main section URL\n ERP5 Web is a business template of ERP5 which provides a way\n
main_section = context\n to create web sites which can display selected\n
main_section_path = None\n ERP5 contents through multiple custom web layouts.\n
while hasattr(main_section,\'aq_parent\') and hasattr(main_section,\'getPortalType\') and main_section.getPortalType()!="Web Section" and main_section.getPortalType()!="Web Site":\n
main_section_path = str(main_section.absolute_url())\n
main_section = main_section.aq_parent\n
\n \n
# then, if context is a web page, the reference must be added to the URL\n This script returns the absolute URL of the current\n
my_reference=None\n document in a pretty way and taking into account\n
if hasattr(context,\'getReference\'):\n virtual hosting. The purpose of this script is to be\n
my_reference = context.getReference()\n able to access documents through a URL such as:\n
if my_reference==None:\n
my_reference=""\n
\n \n
return main_section.absolute_url() + "/" + my_reference\n www.mysite.com/mysection/a-document-reference\n
\n
even if the physical path of the document is\n
\n
/erp5/web_page_module/33\n
\n
The default script looks in the acquisition context\n
for the first relevant section and build a URL\n
based on the section absolute_url and on the\n
document reference.\n
\n
More sophisticated behaviours are possible.\n
\n
SUGGESTIONS:\n
\n
- change the behaviour of WebSite_getDocumentUrl\n
for non anonymous\n
\n
- change the behaviour of WebSite_getDocumentUrl\n
for documents which are not published.\n
\n
NOTE: it is still unknown whether this script\n
needs to be integrated or not to the absolute_url API\n
"""\n
# Return absolute URL if our parent is not a Web Section or Web Site\n
if context.aq_parent.getPortalType() not in (\'Web Section\', \'Web Site\'):\n
return context.absolute_url()\n
\n
# Return absolute URL if this is not an appropriate portal_type\n
valid_portal_type_list = [\'Web Page\', ] # WARNING - this is a copy from WebSite_getDocumentValue\n
if context.getPortalType() not in valid_portal_type_list:\n
return context.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 WebSite_getDocumentValueList\n
\'released\', \'published\', \'restricted\']\n
if context.getValidationState() not in validation_state:\n
return context.absolute_url()\n
\n
# Find the Web Section or Web Site we belong to\n
current_section = context.getWebSectionValue()\n
\n
# Return the URL\n
return "%s/%s" % (current_section.absolute_url(), context.getReference())\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -136,7 +146,7 @@ return main_section.absolute_url() + "/" + my_reference\n ...@@ -136,7 +146,7 @@ return main_section.absolute_url() + "/" + my_reference\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>**kw</string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -162,15 +172,11 @@ return main_section.absolute_url() + "/" + my_reference\n ...@@ -162,15 +172,11 @@ return main_section.absolute_url() + "/" + my_reference\n
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>kw</string>
<string>context</string>
<string>main_section</string>
<string>None</string>
<string>main_section_path</string>
<string>hasattr</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>str</string> <string>context</string>
<string>my_reference</string> <string>valid_portal_type_list</string>
<string>validation_state</string>
<string>current_section</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -187,7 +193,7 @@ return main_section.absolute_url() + "/" + my_reference\n ...@@ -187,7 +193,7 @@ return main_section.absolute_url() + "/" + my_reference\n
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>WebSite_getDocumentUrl</string> </value> <value> <string>Base_getPermanentURL</string> </value>
</item> </item>
<item> <item>
<key> <string>warnings</string> </key> <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>
<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>"""\n
This script split a form group id in two part:\n
* a group id,\n
* a group title.\n
\n
The group should be named based on the following pattern: "group id (Group Title)" \n
\n
This script is a hack to let us merge two informations (id and title) into one (id) to get\n
over Formulator limitations. This script should disappear with Formulator\'s refactoring.\n
\n
Features: \n
* Multiple parenthesis allowed;\n
* Group id can continue after the title definition.\n
\n
Example:\n
A string like\n
"left webcontent (The Fantastic Group (and (funky) lisp-like parenthesis)) extra",\n
will return the following tuple:\n
( \'left webcontent extra\'\n
, \'The Fantastic Group (and (funky) lisp-like parenthesis)\'\n
, \'left webcontent (The Fantastic Group (and (funky) lisp-like parenthesis)) extra\'\n
)\n
"""\n
\n
if not same_type(original_group_id, \'string\'):\n
return None\n
\n
# Separate the group id and the group title using parenthesis as marker from the original form group id\n
o_gid_list = original_group_id.strip().split(\'(\')\n
\n
# Get the first part of the group id (which is the part before the first opened parenthesis)\n
group_id = o_gid_list[0]\n
\n
# Get the end of the list (which is the part just after the first opened parenthesis)\n
group_title_list = \'(\'.join(o_gid_list[1:]).split(\')\')\n
\n
# Get the last part of the group id (the part which stand after the last closing parenthesis)\n
group_id += group_title_list[-1]\n
\n
# Normalize the group id (suppress unecessary multiple-space)\n
group_id_list = []\n
for group_word in group_id.split(\' \'):\n
if len(group_word):\n
group_id_list.append(group_word)\n
group_id = \' \'.join(group_id_list)\n
\n
# Generate the group title\n
group_title = \')\'.join(group_title_list[:-1]).strip()\n
\n
# Return the group id if no title found\n
if len(group_title) == 0:\n
group_title = group_id\n
\n
return ( group_id\n
, group_title\n
, original_group_id\n
)\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>original_group_id=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>original_group_id</string>
<string>same_type</string>
<string>None</string>
<string>_getattr_</string>
<string>o_gid_list</string>
<string>_getitem_</string>
<string>group_id</string>
<string>group_title_list</string>
<string>group_id_list</string>
<string>_getiter_</string>
<string>group_word</string>
<string>len</string>
<string>group_title</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>ERP5XhtmlStyle_getFormGroupTitleAndId</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<key> <string>group_list</string> </key> <key> <string>group_list</string> </key>
<value> <value>
<list> <list>
<string>left</string> <string>bottom</string>
<string>hidden</string> <string>hidden</string>
</list> </list>
</value> </value>
...@@ -71,18 +71,18 @@ ...@@ -71,18 +71,18 @@
<value> <value>
<dictionary> <dictionary>
<item> <item>
<key> <string>hidden</string> </key> <key> <string>bottom</string> </key>
<value> <value>
<list> <list>
<string>listbox_caption</string> <string>listbox</string>
</list> </list>
</value> </value>
</item> </item>
<item> <item>
<key> <string>left</string> </key> <key> <string>hidden</string> </key>
<value> <value>
<list> <list>
<string>listbox</string> <string>listbox_caption</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -68,154 +68,56 @@ ...@@ -68,154 +68,56 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string>"""\n
This script is part of ERP5 Web\n
# This script is part of ERP5 Web\n
#\n
# ERP5 Web is an extension to ERP5 which provides a way\n
# to create web sites which can display selected\n
# ERP5 contents through multiple custom web layouts.\n
#\n
# This script returns a list of document values (ie. objects or brains)\n
# which are considered as part of this section. It can be\n
# a list of web pages (usual case), a list of products\n
# (online catalog), a list of tenders (e-government), etc.\n
# \n
# This script shows an implementation which consists in\n
# listing documents which are either associated to this section\n
# through \'aggregate\' or which are meet the predicate define\n
# by the section (ex. which are part of a given publication_section)\n
# and which are in "published" state and of a "Web Page" portal_type\n
#\n
# This script can be changed to meet other requirements. For example\n
# one may want to display a list of products in a section. In this case,\n
# this script must return a list of documents of type "Product"\n
# with a "validated" state and in the appropriate product family.\n
#\n
# This script is intended to be overriden by creating an instance \n
# in each section if necessary\n
\n \n
from string import split\n ERP5 Web is a business template of ERP5 which provides a way\n
to create web sites which can display selected\n
ERP5 contents through multiple custom web layouts.\n
\n \n
portal_catalog = container.portal_catalog\n This script returns a list of document values (ie. objects or brains)\n
\n which are considered as part of this section. It can be\n
# First find the web section we are in\n a list of web pages (usual case), a list of products\n
current_node = context\n (online catalog), a list of tenders (e-government), etc.\n
while not current_node.getPortalType() in (\'Web Section\', \'Web Site\'):\n
current_node = current_node.aq_parent\n
# Then find the publication categories referenced by the web section\n
section_categories = current_node.getMembershipCriterionCategoryList()\n
section_base_categories_conjunctive = current_node.getMembershipCriterionBaseCategoryList()\n
section_base_categories_disjunctive = current_node.getMultimembershipCriterionBaseCategoryList()\n
\n \n
def checkMember(x):\n The default implementation provided here consists in\n
if x.getValidationState()==\'published\' or x.getValidationState()==\'validated\':\n listing documents which meet the predicate defined\n
return current_node.test(x)\n by the section (ex. which are part of a given publication_section)\n
and which are in "published" state and of a "Web Page" portal_type.\n
\n \n
# get all web pages and products and check if they match the predicates of the web section,\n It should be noted that document selection should be implemented\n
# except if there is no membership category in the section.\n as much as possible using the Domain API.\n
if not section_categories:\n
li = []\n
else:\n
li = list(context.portal_catalog(portal_type="Product"))\n
li.extend(list(context.portal_catalog(portal_type="Web Page")))\n
li = filter(checkMember, li )\n
if li:\n
my_list=li\n
else:\n
my_list=[]\n
\n \n
# get al web pages associated to the section by aggregate-relation\n This script can be changed to meet other requirements. For example\n
if hasattr(current_node,\'getAggregateList\'):\n one may want to display a list of products in a section. In this case,\n
aggregate_values = current_node.getAggregateList()\n this script must return a list of documents of type "Product"\n
aggregate_values = map(context.restrictedTraverse,aggregate_values)\n with a "validated" state and in the appropriate product family.\n
my_list.extend(aggregate_values) \n
\n \n
# Remove duplicate entries in my_list\n This script is intended to be overriden by creating a new script\n
my_clean_list=[]\n within the Web Site instance if necessary (not inside a\n
my_reference_list=[]\n portal_skin since multiple sites might have different behaviour).\n
my_version_list={}\n
for my_element in my_list:\n
if not my_element.getReference() in my_reference_list:\n
my_clean_list.append(my_element)\n
my_reference_list.append(my_element.getReference())\n
if hasattr(my_element,\'getVersion\'):\n
my_version_list[my_element.getReference()] = my_element.getVersion()\n
else:\n
my_version_list[my_element.getReference()] = 0\n
else:\n
if hasattr(my_element,\'getVersion\'):\n
if my_version_list[my_element.getReference()] < my_element.getVersion():\n
my_version_list[my_element.getReference()] = my_element.getVersion()\n
for clean_item in my_clean_list:\n
if clean_item.getReference()==my_element.getReference():\n
my_clean_list.remove(clean_item)\n
break\n
my_clean_list.append(my_element)\n
\n
\n \n
Here are some suggestions which can either be implemented using\n
SQL (group_by, order_by) or using additional python scripting\n
if this is compatible with data size.\n
\n \n
def compareIndex(c1, c2):\n SUGGESTIONS:\n
c1_value = c1.getObject() \n - Prevent showing duplicate references\n
c2_value = c2.getObject() \n \n
if hasattr(c1_value,\'getIntIndex\') and hasattr(c2_value,\'getIntIndex\') :\n - Add documents associated to this section through \'aggregate\'.\n
return cmp(c1_value.getIntIndex(), c2_value.getIntIndex()) \n
else:\n
return 0\n
\n \n
my_clean_list.sort(compareIndex)\n - Display only the latest version and the appropriate language.\n
return my_clean_list\n """\n
portal_catalog = container.portal_catalog\n
\n \n
# First find the Web Section or Web Site we belong to\n
current_section = context.getWebSectionValue()\n
\n \n
## FYI - old implementation - broken\n # Return the list of matching documents for the given states\n
#from Products.ERP5Form.Selection import DomainSelection\n return current_section.searchResults(validation_state=[\'draft\', \'submitted\', \'shared\',\n
#\n \'released\', \'public\', \'restricted\'],\n
#if not context.getMembershipCriterionCategoryList() and not context.getSourceList():\n order_by=[(\'int_index\', \'descending\')])\n
# return []\n </string> </value>
#\n
#def content_cmp(c1, c2):\n
# c1_value = c1.getObject() \n
# c2_value = c2.getObject() \n
# return cmp(c1_value.getIntIndex(), c2_value.getIntIndex()) \n
#\n
#if context.getMembershipCriterionCategoryList():\n
# domain = DomainSelection(domain_dict = {\'web_site\': context})\n
# kw[\'selection_domain\'] = domain\n
# kw[\'portal_type\'] = \'Web Page\'\n
# kw[\'validation_state\'] = \'published\'\n
# if not kw.has_key(\'sort_on\'): kw[\'sort_on\'] = \'int_index\'\n
# brain_list = list(context.portal_catalog(**kw))\n
#else:\n
# brain_list = []\n
#\n
## Make a new search with local documents\n
#reference_list = map(lambda x:x.getReference(), context.getSourceValueList(portal_type="Web Page"))\n
#if reference_list:\n
# brain_list.extend(list(context.portal_catalog(reference= reference_list, portal_type="Web Page")))\n
#\n
## Make sure a single reference is counted once only\n
#brain_dict = {}\n
#none_list = []\n
#for b in brain_list:\n
# o = b.getObject()\n
# if o is not None:\n
# reference = o.getReference()\n
# if reference is None:\n
# none_list.append(b)\n
# else:\n
# brain_dict[reference] = b\n
#\n
#brain_list = brain_dict.values() + none_list\n
#for bee in brain_list:\n
# bee = bee.title\n
#\n
## Sort documents\n
#brain_list.sort(content_cmp)\n
#\n
#return brain_list\n
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>_code</string> </key> <key> <string>_code</string> </key>
...@@ -264,33 +166,11 @@ return my_clean_list\n ...@@ -264,33 +166,11 @@ return my_clean_list\n
<value> <value>
<tuple> <tuple>
<string>kw</string> <string>kw</string>
<string>string</string>
<string>split</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>container</string> <string>container</string>
<string>portal_catalog</string> <string>portal_catalog</string>
<string>context</string> <string>context</string>
<string>current_node</string> <string>current_section</string>
<string>section_categories</string>
<string>section_base_categories_conjunctive</string>
<string>section_base_categories_disjunctive</string>
<string>checkMember</string>
<string>li</string>
<string>list</string>
<string>filter</string>
<string>my_list</string>
<string>hasattr</string>
<string>aggregate_values</string>
<string>map</string>
<string>my_clean_list</string>
<string>my_reference_list</string>
<string>my_version_list</string>
<string>_getiter_</string>
<string>my_element</string>
<string>_write_</string>
<string>_getitem_</string>
<string>clean_item</string>
<string>compareIndex</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -526,10 +526,6 @@ ...@@ -526,10 +526,6 @@
<key> <string>url_columns</string> </key> <key> <string>url_columns</string> </key>
<value> <value>
<list> <list>
<tuple>
<string>reference</string>
<string>WebSite_getListboxUrl</string>
</tuple>
<tuple> <tuple>
<string>short_title</string> <string>short_title</string>
<string>WebSite_getListboxUrl</string> <string>WebSite_getListboxUrl</string>
...@@ -573,7 +569,7 @@ ...@@ -573,7 +569,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>method_name</string> </key> <key> <string>method_name</string> </key>
<value> <string>WebSite_getDocumentValueList</string> </value> <value> <string>WebSection_getDocumentValueList</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -68,54 +68,47 @@ ...@@ -68,54 +68,47 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string>"""\n
This script is part of ERP5 Web\n
# This script is part of ERP5 Web\n
#\n
# ERP5 Web is an extension to ERP5 which provides a way\n
# to create web sites which can display selected\n
# ERP5 contents through multiple custom web layouts.\n
#\n
# This script returns a list of tuples in the form\n
# (title, value) where title is the title of the \n
# document provided as value. The document value\n
# must be wrapped in the acquisition context \n
# (ex. Web Site / Section / Module / Document).\n
#\n
# Scripts of page templates which use this script\n
# and need to generate the URLs of document values\n
# should must use the WebSite_getDocumentUrl API \n
# or eventually the absolute_url API in order\n
# to benefit from virtual hosting features. \n
# (ie. do not use getUrl)\n
# NOTE: Clarification needed when to use which ?\n
#\n
# This script can be used to produce breadcrumbs\n
# in page templates or in widgets. It can be customised\n
# to implement different behaviours such as\n
#\n
# - CMS like breadcrumb (hierarchy of contents)\n
# - Wiki like breadcrumb (history of navigation)\n
# - or any other behaviour\n
#\n
# The default implementation is hierarchical\n
\n \n
# (kev): I think the current implementation must change to just return the list of object like\n ERP5 Web is a business template of ERP5 which provides a way\n
# [ <WebSite at /erp5/web_site_module/1>\n to create web sites which can display selected\n
# , <Domain at /erp5/web_site_module/1/1>\n ERP5 contents through multiple custom web layouts.\n
# , <Document at /erp5/web_page_module/1 used for /erp5/web_site_module/1/1>\n
# ]\n
# and not a list of tuples like (title, object). Thanks to this modification I will be able\n
# to choose how to render the link string of the breadcrumb item in the page template of my\n
# widget. Because this kind of feature is related to rendering and presentation and because\n
# it is not part of core logic of the web API, the title should not be returned by the\n
# current script.\n
\n \n
This script returns a list of tuples in the form\n
(title, value) where title is the title of the\n
document provided as value. The document value\n
must be wrapped in the acquisition context\n
(ex. Web Site / Section / Module / Document).\n
\n
Scripts of page templates which use this script\n
and need to generate the URLs of document values\n
should must use the Base_getPermanentURL API\n
or the absolute_url API in order\n
to benefit from virtual hosting features.\n
(ie. do not use getUrl or getPath)\n
\n
This script can be used to produce breadcrumbs\n
in page templates or in widgets. It can be customised\n
to implement different behaviours such as\n
\n
- CMS like breadcrumb (hierarchy of contents)\n
\n
- Wiki like breadcrumb (history of navigation)\n
\n
- or any other behaviour\n
\n
The default implementation is hierarchical.\n
\n
TODO: Clarify absolute_url or Base_getPermanentURL\n
TODO: is it so useful to include title ?\n
"""\n
crumb = context\n crumb = context\n
crumb_list = []\n crumb_list = []\n
\n \n
while hasattr(crumb, \'getParent\'):\n # Implementation consists in browsing the aq_parent sequence\n
crumb_list.append(( crumb.ERP5Web_getVerboseTitle(priority = \'short_title\')\n while crumb is not None:\n
crumb_list.append(( crumb.getProperty(\'translated_short_title\', None) or crumb.getTranslatedTitleOrId()\n
, crumb\n , crumb\n
))\n ))\n
if crumb.getPortalType() == \'Web Site\':\n if crumb.getPortalType() == \'Web Site\':\n
...@@ -124,11 +117,8 @@ while hasattr(crumb, \'getParent\'):\n ...@@ -124,11 +117,8 @@ while hasattr(crumb, \'getParent\'):\n
crumb = crumb.aq_parent\n crumb = crumb.aq_parent\n
\n \n
crumb_list.reverse()\n crumb_list.reverse()\n
\n
return crumb_list\n return crumb_list\n
</string> </value>
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>_code</string> </key> <key> <string>_code</string> </key>
...@@ -179,9 +169,8 @@ return crumb_list\n ...@@ -179,9 +169,8 @@ return crumb_list\n
<string>context</string> <string>context</string>
<string>crumb</string> <string>crumb</string>
<string>crumb_list</string> <string>crumb_list</string>
<string>hasattr</string>
<string>_getattr_</string>
<string>None</string> <string>None</string>
<string>_getattr_</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -68,40 +68,43 @@ ...@@ -68,40 +68,43 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string># This script is part of ERP5 Web\n <value> <string>"""\n
#\n This script is part of ERP5 Web\n
# ERP5 Web is an extension to ERP5 which provides a way\n
# to create web sites which can display selected\n
# ERP5 contents through multiple custom web layouts.\n
#\n
# This script returns the default document to display\n
# as the front page of a given section.\n
#\n
# The default implementation should look at published\n
# documents which are associated to the section\n
# through aggregate relation and try to display those\n
# which are in the closest possible language.\n
#\n
# This behaviour can be overriden to implemet more complex\n
# policies (ex. display the last version in the appropriate\n
# language rather than the latest version in a different\n
# language)\n
\n \n
next_section=context\n ERP5 Web is a business template of ERP5 which provides a way\n
while hasattr(next_section,\'getParent\') and hasattr(next_section,\'getPortalType\'):\n to create web sites which can display selected\n
if next_section.getPortalType() == \'Web Section\':\n ERP5 contents through multiple custom web layouts.\n
break\n
else:\n
next_section = next_section.aq_parent\n
\n \n
if not hasattr(next_section,\'getCategories\'):\n This script returns the default document to display\n
return None # Context is not a Section, so no default Value available.\n as the front page of a given Web Section or Web Site.\n
If no default is found, it returns None.\n
\n \n
my_aggregate = next_section.getAggregateValue()\n The default implementation should look at published\n
if my_aggregate==None:\n documents which are associated to the section\n
#context.log("No aggregate found","!!!")\n through aggregate relation and try to display those\n
return None\n which are in the user language if any.\n
return my_aggregate\n \n
Other implementations are possible: ex. display the last\n
version in the closest language rather than\n
the latest version in the user language.\n
\n
This script is intended to be overriden by creating a new script\n
within the Web Site instance if necessary (not inside a\n
portal_skin since multiple sites might have different behaviour).\n
\n
"""\n
portal_object = context.getPortalObject()\n
\n
# First find the Web Section or Web Site we belong to\n
current_section = context.getWebSectionValue()\n
\n
# First get all the applicable references\n
# There might be more than one reference due to security differences\n
# (ex. a default restricted web page and a default public web page)\n
reference_list = context.getAggregateReferenceList()\n
if not reference_list: return None # Quick return\n
\n
return context.WebSite_getDocumentValue(name=reference_list)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -150,12 +153,12 @@ return my_aggregate\n ...@@ -150,12 +153,12 @@ return my_aggregate\n
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>context</string>
<string>next_section</string>
<string>hasattr</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string>
<string>portal_object</string>
<string>current_section</string>
<string>reference_list</string>
<string>None</string> <string>None</string>
<string>my_aggregate</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -68,70 +68,77 @@ ...@@ -68,70 +68,77 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string># This script is part of ERP5 Web\n <value> <string>"""\n
#\n This script is part of ERP5 Web\n
# ERP5 Web is an extension to ERP5 which provides a way\n
# to create web sites which can display selected\n
# ERP5 contents through multiple custom web layouts.\n
#\n
# This script returns the document which is being displayed\n
# in the current in the form of a value (object).\n
#\n
# If a name parameter is provided, it will lookup\n
# the catalog to find a document. If no name parameter\n
# is provided, it will analyse the current context\n
# (ex. Section, Web Page, etc.) and try to find out\n
# which document is being displayed. For example,\n
# sections which define a default document may \n
# actually display that document rather than \n
# themselves when asked to render.\n
#\n
# NOTE: portal param probably useless\n
\n \n
# Use the following Variable to determine which\n ERP5 Web is a business template of ERP5 which provides a way\n
# \n to create web sites which can display selected\n
ERP5 contents through multiple custom web layouts.\n
\n \n
If no name parameter is provided, this script\n
returns the document which is being displayed\n
currently in a Web Section or a Web Page\n
by invoking WebSite_getDefaultWebPageValue. \n
\n
The default implementation searches for\n
documents which are in the user language if any\n
and which reference is equal to the name parameter.\n
\n
Other implementations are possible: ex. display the last\n
version in the closest language rather than\n
the latest version in the user language.\n
\n
If a name parameter is provided, it will lookup\n
the catalog to find the most appropriate\n
document.\n
\n
NOTE:\n
- portal param probably useless \n
"""\n
if portal is None: portal = context.getPortalObject()\n
portal_catalog = portal.portal_catalog\n portal_catalog = portal.portal_catalog\n
# The list of portal types here should be large enough to include\n
# all portal_types defined in the various sections so that\n
# href tags which point to a document by reference can still work.\n
valid_portal_type_list = [\'Web Page\', ]\n
\n \n
# This should probably be moved to a specific page\n
if name is None:\n if name is None:\n
if context.getPortalType() == \'Web Page\':\n if context.getPortalType() in valid_portal_type_list:\n
return context\n return context\n
elif context.getPortalType() in (\'Web Site\', \'Web Section\'):\n elif context.getPortalType() in (\'Web Site\', \'Web Section\'):\n
return context.WebSite_getDefaultWebPageValue()\n return context.WebSite_getDefaultWebPageValue()\n
else:\n else:\n
return None\n return None\n
\n \n
#If name is not None, it has to be searched for it in the catalog.\n # Find the applicable language\n
\n language = context.Localizer.get_selected_language()\n
# This Function helps do sort different Versions of the same Document.\n
def compareVersion(c1, c2):\n
c1_value = c1.getObject() \n
c2_value = c2.getObject()\n
return cmp(c2_value.getVersion(), c1_value.getVersion()) \n
\n \n
#from Products.ERP5Type.Cache import CachingMethod\n # Search the catalog for all documents matching the reference\n
def getDocument(name):\n # this will only return documents which are accessible by the user\n
# First try to get a published document\n web_page_list = portal_catalog(reference=name, portal_type=valid_portal_type_list,\n
matching_document_list = portal_catalog(reference = \'%s\' % name, validation_state=\'published\')\n order_by=[(\'index\', \'descending\'), (\'version\', \'descending\')],\n
if len(matching_document_list):\n language=language)\n
matching_document_list=list(matching_document_list)\n # XXX - group_by is missing here\n
matching_document_list.sort(compareVersion)\n try:\n
return matching_document_list[0].getObject()\n # Try to get the first page on the list\n
# Then try to get a validated document (Product)\n web_page = web_page_list[0]\n
matching_document_list = portal_catalog(reference = \'%s\' % name, validation_state=\'validated\')\n web_page = web_page.getObject()\n
if len(matching_document_list):\n except IndexError:\n
matching_document_list=list(matching_document_list)\n # Search again without the language\n
matching_document_list.sort(compareVersion)\n web_page_list = portal_catalog(reference=name, portal_type=\'Web Page\',\n
return matching_document_list[0].getObject()\n order_by=[(\'index\', \'descending\'), (\'version\', \'descending\')])\n
# Then try to get any document\n # XXX - group_by is missing here\n
matching_document_list = portal_catalog(reference = \'%s\' % name)\n try:\n
if len(matching_document_list):\n # Try to get the first page on the list\n
matching_document_list=list(matching_document_list)\n web_page = web_page_list[0]\n
matching_document_list.sort(compareVersion)\n web_page = web_page.getObject()\n
return matching_document_list[0].getObject()\n except IndexError:\n
return None \n # Default returns None\n
web_page = None\n
\n \n
return getDocument(name)\n # return the web page\n
return web_page\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -154,7 +161,7 @@ return getDocument(name)\n ...@@ -154,7 +161,7 @@ return getDocument(name)\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>portal, name=None</string> </value> <value> <string>name=None,portal=None</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -180,14 +187,18 @@ return getDocument(name)\n ...@@ -180,14 +187,18 @@ return getDocument(name)\n
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>portal</string>
<string>name</string> <string>name</string>
<string>_getattr_</string> <string>portal</string>
<string>portal_catalog</string>
<string>None</string> <string>None</string>
<string>_getattr_</string>
<string>context</string> <string>context</string>
<string>compareVersion</string> <string>portal_catalog</string>
<string>getDocument</string> <string>valid_portal_type_list</string>
<string>language</string>
<string>web_page_list</string>
<string>_getitem_</string>
<string>web_page</string>
<string>IndexError</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -201,6 +212,7 @@ return getDocument(name)\n ...@@ -201,6 +212,7 @@ return getDocument(name)\n
<value> <value>
<tuple> <tuple>
<none/> <none/>
<none/>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -138,7 +138,7 @@ Rules:\n ...@@ -138,7 +138,7 @@ Rules:\n
applied (see \'bottom right\' in the exemple below, where it\'s in the \'bottom\'\n applied (see \'bottom right\' in the exemple below, where it\'s in the \'bottom\'\n
aggregate and not in \'right\' one).\n aggregate and not in \'right\' one).\n
5 - This script is compatible with group titles set in parenthesis (handled by\n 5 - This script is compatible with group titles set in parenthesis (handled by\n
ERP5XhtmlStyle_getFormGroupTitleAndId script): the matching process will\n Form_getGroupTitleAndId script): the matching process will\n
ignore the group title (look at \'(Discount on Right Handed Tools) left\n ignore the group title (look at \'(Discount on Right Handed Tools) left\n
discount\').\n discount\').\n
6 - Matching process between criterion and group id is not case sensitive.\n 6 - Matching process between criterion and group id is not case sensitive.\n
...@@ -168,24 +168,24 @@ Example:\n ...@@ -168,24 +168,24 @@ Example:\n
[ [\'left\', [ (\'left column\', \'left column\', \'left column\')\n [ [\'left\', [ (\'left column\', \'left column\', \'left column\')\n
, (\'left ad\', \'left ad\', \'left ad\')\n , (\'left ad\', \'left ad\', \'left ad\')\n
, (\'left discount\', \'Discount on Right Handed Tools\', \'(Discount on Right Handed Tools) left discount\')\n , (\'left discount\', \'Discount on Right Handed Tools\', \'(Discount on Right Handed Tools) left discount\')\n
]]\n ]]\n
, [\'right\', [ (\'metadata right\', \'metadata right\', \'metadata right\')\n , [\'right\', [ (\'metadata right\', \'metadata right\', \'metadata right\')\n
, (\'right ad\', \'right ad\', \'right ad\')\n , (\'right ad\', \'right ad\', \'right ad\')\n
]]\n ]]\n
, [\'center\', [\n , [\'center\', [\n
]]\n ]]\n
, [\'bottom\', [ (\'bottom content\', \'bottom content\', \'bottom content\')\n , [\'bottom\', [ (\'bottom content\', \'bottom content\', \'bottom content\')\n
, (\'footer\', \'footer\', \'footer\')\n , (\'footer\', \'footer\', \'footer\')\n
, (\'bottom right\', \'bottom right\', \'bottom right\')\n , (\'bottom right\', \'bottom right\', \'bottom right\')\n
]]\n ]]\n
]\n ]\n
\n \n
\n \n
Tips:\n Tips:\n
\n \n
* The returned list structure is design to let you cast it as dict() if you don\'t\n * The returned list structure is designed to let you cast it as dict() if you don\'t\n
care about group aggregate ordering. This also help you to get group aggregate\n care about group aggregate ordering. This can help you to get group aggregate\n
more easily.\n more easily in table based HTML layouts.\n
\n \n
"""\n """\n
\n \n
...@@ -202,12 +202,10 @@ layout_form = context\n ...@@ -202,12 +202,10 @@ layout_form = context\n
for criterion in group_by_criterion:\n for criterion in group_by_criterion:\n
aggregate_dict[criterion] = []\n aggregate_dict[criterion] = []\n
\n \n
# Put each group in an aggregate\n # Get the cached list of groups and titles\n
for group_id in layout_form.get_groups(include_empty=0): # Rule (2)\n for group_details in layout_form.Form_getGroupTitleAndId(): # Rule (5)\n
\n # Rule (2)\n
# TODO: save id title and original id in the returned dict to not recalculate them\n group_css_classes = group_details[\'gid\']\n
group_details = context.ERP5XhtmlStyle_getFormGroupTitleAndId(group_id) # Rule (5)\n
group_css_classes = group_details[0]\n
\n \n
# Criterion matching status\n # Criterion matching status\n
matched = False\n matched = False\n
...@@ -231,7 +229,7 @@ for group_id in layout_form.get_groups(include_empty=0): # ...@@ -231,7 +229,7 @@ for group_id in layout_form.get_groups(include_empty=0): #
for criterion in group_by_criterion:\n for criterion in group_by_criterion:\n
aggregate = [ criterion\n aggregate = [ criterion\n
, aggregate_dict[criterion]\n , aggregate_dict[criterion]\n
]\n ]\n
aggregate_list.append(aggregate)\n aggregate_list.append(aggregate)\n
\n \n
\n \n
...@@ -290,7 +288,6 @@ return aggregate_list\n ...@@ -290,7 +288,6 @@ return aggregate_list\n
<string>criterion</string> <string>criterion</string>
<string>_write_</string> <string>_write_</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>group_id</string>
<string>group_details</string> <string>group_details</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>group_css_classes</string> <string>group_css_classes</string>
......
...@@ -68,8 +68,12 @@ ...@@ -68,8 +68,12 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string># Set Web Site layout to default one\n <value> <string>"""\n
default_layout = \'erp5_web_default_layout\'\n This scripts sets up automatically default parameters\n
for a newly created Web Site\n
"""\n
# Set Web Site layout to default one\n
default_layout = \'template_erp5_web\'\n
context.setContainerLayout(default_layout)\n context.setContainerLayout(default_layout)\n
context.setContentLayout(default_layout)\n context.setContentLayout(default_layout)\n
\n \n
......
...@@ -100,6 +100,7 @@ ...@@ -100,6 +100,7 @@
<list> <list>
<string>my_id</string> <string>my_id</string>
<string>my_title</string> <string>my_title</string>
<string>my_short_title</string>
<string>my_container_layout</string> <string>my_container_layout</string>
<string>my_content_layout</string> <string>my_content_layout</string>
</list> </list>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>your_searchable_text</string> </value> <value> <string>my_short_title</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -211,7 +211,7 @@ ...@@ -211,7 +211,7 @@
</item> </item>
<item> <item>
<key> <string>display_width</string> </key> <key> <string>display_width</string> </key>
<value> <int>15</int> </value> <value> <int>40</int> </value>
</item> </item>
<item> <item>
<key> <string>editable</string> </key> <key> <string>editable</string> </key>
...@@ -243,7 +243,7 @@ ...@@ -243,7 +243,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Search</string> </value> <value> <string>Short Title</string> </value>
</item> </item>
<item> <item>
<key> <string>truncate</string> </key> <key> <string>truncate</string> </key>
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<!-- ============================================================== -->\n <!-- ============================================================== -->\n
<!--\n <!--\n
Description:\n Description:\n
This macro render an aggregate of groups (like the ones returned\n This macro renders an aggregate of groups (like the ones returned\n
by WebSite_getGroupList() method).\n by WebSite_getGroupList() method).\n
\n \n
Note:\n Note:\n
...@@ -82,32 +82,33 @@ Example of macro use (similar to \'erp5_web_default_template\' use):\n ...@@ -82,32 +82,33 @@ Example of macro use (similar to \'erp5_web_default_template\' use):\n
</tal:block>\n </tal:block>\n
-->\n -->\n
\n \n
<tal:block metal:define-macro="render_aggregate">\n <tal:block metal:define-macro="aggregate_render">\n
<!-- Each aggregate of groups is a <div> wrapper -->\n <!-- Each aggregate of groups is a div wrapper -->\n
<div tal:define="aggregate_name python: aggregate[0];\n <div tal:define="aggregate_name python: aggregate[0];\n
aggregate_groups python: aggregate[1];"\n group_list python: aggregate[1];"\n
tal:condition="python: len(aggregate_groups)"\n tal:condition="python: len(group_list)"\n
tal:attributes="class python: \'wrapper %s\' % aggregate_name;\n tal:attributes="class python: \'wrapper %s\' % aggregate_name;\n
id python: \'wrapper_%s\' % aggregate_name;">\n id python: \'wrapper_%s\' % aggregate_name;">\n
\n \n
<tal:block tal:repeat="group_details aggregate_groups">\n <tal:block tal:repeat="group group_list">\n
<!-- Layout group rendering -->\n <tal:block tal:define="gid group/gid;\n
<div tal:define="group_css_classes python: group_details[0]"\n gtitle group/gtitle;\n
tal:attributes="class python: group_css_classes;\n goid group/goid;">\n
id python: group_css_classes.replace(\' \', \'_\');\n <fieldset tal:attributes="class python: gid;\n
title python: group_details[1];">\n id python: \'fieldset_\' + gid.replace(\' \', \'_\');">\n
\n <legend tal:content="python: gtitle" class="group_title"/>\n
<!-- Render each field in its group -->\n <tal:block tal:repeat="field python: layout_form.get_fields_in_group(goid)">\n
<tal:block tal:repeat="field python: layout_form.get_fields_in_group(group_details[2])">\n
<tal:block metal:use-macro="here/field_render/macros/field_render"/>\n <tal:block metal:use-macro="here/field_render/macros/field_render"/>\n
</tal:block>\n </tal:block>\n
\n </fieldset>\n
</div>\n </tal:block>\n
</tal:block>\n </tal:block>\n
\n \n
</div>\n </div>\n
</tal:block>\n </tal:block>\n
\n \n
\n
\n
<!-- ============================================================== --> <!-- ============================================================== -->
]]></string> </value> ]]></string> </value>
...@@ -122,7 +123,7 @@ Example of macro use (similar to \'erp5_web_default_template\' use):\n ...@@ -122,7 +123,7 @@ Example of macro use (similar to \'erp5_web_default_template\' use):\n
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>erp5_web_macros</string> </value> <value> <string>aggregate_render</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -279,7 +279,7 @@ ...@@ -279,7 +279,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python: here.ERP5Web_getVerboseTitle()</string> </value> <value> <string>here/getTranslatedShortTitleOrId</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
<?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 replace="nothing"\n
xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal"\n
xmlns:i18n="http://xml.zope.org/namespaces/i18n"/>\n
\n
<tal:block define="dummy python: request.RESPONSE.setHeader(\'Content-Type\', \'text/css;; charset=utf-8\')"/>\n
\n
/*========================================================================================\n
Default ERP5 Web CSS.\n
\n
Guidelines (how-to create a good css):\n
* All measurements should be expressed with scalable units like em, ex, %.\n
* pt, px must be avoid expect for box borders (not sure) and tricks related to borders (like position popup of Edit Tabs)\n
* Test your design and layout against font size increasing/decreasing.\n
* Test your html code semantics value by disabling all your css.\n
* Don\'t put styling directives in xhtml code.\n
\n
Tested Browser:\n
* Firefox 1.5.0.6\n
* Konqueror 3.4.2\n
* Opera 9.01\n
* Internet Explorer 6 (Layout: OK; Style: not OK)\n
\n
TODO: * Layout is ok in ie6, now styling should be adapted to support ie6.\n
* The "WebWidget" class should be used somewhere to identify such objects easily\n
and enhance semantics.\n
========================================================================================*/\n
\n
\n
\n
/*========================================================================================\n
** GENERAL STUFF\n
**========================================================================================*/\n
\n
/* Good CSS directive to include in every website to reset all browser default style.\n
------------------------------------------------------------------ */\n
\n
* {\n
padding: 0;\n
margin: 0;\n
}\n
\n
.clear {clear: both}\n
p.clear {display: none}\n
\n
img {border: 0}\n
\n
a:link, a:visited {text-decoration: none}\n
a:active, a:hover {text-decoration: underline}\n
a:link {color: #00248f}\n
a:visited {color: #909}\n
a:hover {color: #39f}\n
\n
a img, h3 img, button img, li img {vertical-align: middle}\n
\n
ul {list-style-position: inside}\n
li {margin-left: 1em}\n
\n
.doNotDisplay {display: none}\n
\n
.hiddenLabel label {display: none}\n
\n
table {\n
border-collapse: collapse;\n
border-spacing: 0;\n
}\n
\n
p {\n
margin: .6em 0;\n
text-align: justify;\n
}\n
\n
/* Workflow states\n
------------------------------------------------------------------ */\n
\n
span.draft {color: #be854d}\n
span.published,\n
span.validated {color: #078307}\n
span.invalidated {color: #ab0303}\n
span.cancelled {color: #ccc}\n
\n
\n
\n
/* Emulate <center> html tag.\n
This class is called \'centered\' to not interfer with the \'center\' group\n
used in erp5_xhtml_style rigid positionning mechanism.\n
------------------------------------------------------------------ */\n
\n
.centered,\n
.centeredInner {\n
width: 100%;\n
text-align: center;\n
}\n
\n
*.centered *,\n
*.centeredInner * {\n
margin-left: auto;\n
margin-right: auto;\n
}\n
\n
\n
\n
/* Default content styling (apply to everything, site wide);\n
Typography & colors (fonts, color, background).\n
------------------------------------------------------------------ */\n
\n
body {background: #e6e6e6 url(erp5-website-background.png) top left no-repeat}\n
\n
body, input, textarea, select, table {\n
color: #333;\n
font-family: Sans, Verdana, Tahoma, Georgia, Geneva, Arial, sans-serif;\n
font-size: 8pt; /* XXX font-size should not be expressed in pt unit.\n
** This unit is quite convinient actually because it scale well\n
** in any browser on font resizing.\n
*/\n
line-height: 1.5em; /* Let the content breathe ! This reduce the density of\n
** paragraph and make the text easier to read.\n
*/\n
}\n
\n
.code, code {font-family: monospace}\n
\n
#transition_message, .warning, .error, .important {\n
color: #f00;\n
font-weight: bold;\n
}\n
\n
h1 {margin: 1.3em 0}\n
\n
blockquote {\n
margin: .5em;\n
padding: .5em;\n
border-left: 2px #ddd solid;\n
background: #f9f9f9;\n
}\n
\n
input#hidden_button {\n
width: 0;\n
height: 0;\n
display: inline;\n
border-width: 0;\n
float: left;\n
}\n
\n
/* Login page style\n
------------------------------------------------------------------ */\n
\n
div.content.login {padding: 0 1em}\n
div.content.login fieldset {border: none}\n
\n
/* Breadcrumb default style\n
------------------------------------------------------------------ */\n
\n
div.breadcrumb li a.selected {\n
border-bottom: 1px dashed #00248f; /* same color as "a:link" rule */\n
text-decoration: none;\n
}\n
\n
div.breadcrumb li a.selected:hover {border-bottom-color: #39f} /* same as "a:hover" rule */
]]></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>erp5_web.css</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -54,46 +54,125 @@ ...@@ -54,46 +54,125 @@
<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="master">\n <tal:block replace="nothing"\n
<!-- TODO: get master layout dynamiccaly -->\n xmlns:tal="http://xml.zope.org/namespaces/tal"\n
<!--tal:block metal:use-macro="python: getattr(here, getattr(here, here.getContainerLayout()).pt).macros[\'master\']"-->\n xmlns:metal="http://xml.zope.org/namespaces/metal"\n
<tal:block metal:use-macro="here/medicentre_section_master/macros/master">\n xmlns:i18n="http://xml.zope.org/namespaces/i18n"/>\n
<tal:block metal:fill-slot="main_content">\n \n
<tal:block metal:define-slot="main">\n <tal:block define="dummy python: request.RESPONSE.setHeader(\'Content-Type\', \'text/css;; charset=utf-8\')"/>\n
\n \n
<h1>Site Map</h1>\n \n
\n div.adminToolbox input, textarea, select { /* This should be common XXX */\n
<tal:block tal:replace="nothing"><!--\n border: 1px solid #999;\n
This macro is recursive and display lists of lists to display a tree.\n }\n
--></tal:block>\n \n
<tal:block metal:define-macro="SectionContentList">\n div.adminToolbox input, textarea {\n
<tal:block tal:define="web_document web_document | nothing"\n padding: 1px;\n
tal:condition="web_document">\n }\n
<a tal:attributes="href web_document/link" tal:content="web_document/title"/>\n \n
<tal:block tal:define="content_list web_document/sub-content | nothing"\n div.adminToolbox label {display: none}\n
tal:condition="content_list">\n \n
<ul tal:repeat="sub_doc content_list" >\n /* Sub section title */\n
<li tal:define="web_document sub_doc">\n div.adminToolbox h3 {\n
<tal:block metal:use-macro="here/WebSite_viewMap/macros/SectionContentList"/>\n margin-left: 0em;\n
</li>\n font-size: inherit;\n
</ul>\n }\n
</tal:block>\n \n
</tal:block>\n /* Title */\n
</tal:block>\n div.adminToolbox > div > h3 {\n
\n background: #f77;\n
<tal:block tal:replace="nothing"><!--\n padding: .5em;\n
Initiate the macro with the site tree structure.\n margin: 0;\n
--></tal:block>\n color: #fff;\n
<ul class="sitemap">\n cursor: pointer;\n
<li tal:define="web_document here/WebSite_getSiteMap">\n }\n
<tal:block metal:use-macro="here/WebSite_viewMap/macros/SectionContentList"/>\n \n
</li>\n div.adminToolbox > div > h3:hover {background: #f00}\n
</ul>\n \n
\n div.adminToolbox > div.input > div.adminSection {\n
</tal:block>\n border-bottom: 1px dotted #777;\n
</tal:block>\n padding: .5em .5em .5em 0.5em;\n
</tal:block>\n }\n
</tal:block> \n
div.adminToolbox > div.input > div.adminSection:last-child {border-bottom: none}\n
\n
div.adminToolbox ul {list-style: none}\n
\n
div.adminToolbox li {margin: 0}\n
\n
div.adminToolbox li > a {text-decoration: none}\n
\n
div.adminToolbox button,\n
div.adminToolbox li > a {\n
margin: .1em 0;\n
padding: .2em;\n
}\n
\n
div.adminToolbox button[type="submit"] {display: none}\n
\n
\n
\n
/* Reset default styling of fields in admin tool box\n
** TODO: find a CSS trick to let forms and fieldset embedded in\n
** ".adminToolbox" behave like default one instead of using\n
** the one defined by default "div.wrapper div.field" rules.\n
*/\n
div.adminToolbox fieldset { /* Should be the same as "fieldset" rule */\n
background: none;\n
border: inherit;\n
margin: 0;\n
}\n
div.adminToolbox fieldset > div.field { /* Should be similar to "fieldset > div" rule */\n
padding: 0;\n
margin: .1em 0;\n
border: none;\n
width: 100%;\n
}\n
div.adminToolbox div.field label { /* Should be the same as "fieldset label" rule */\n
display: block;\n
width: 6em;\n
text-align: right;\n
float: left;\n
text-transform: capitalize;\n
}\n
\n
/* Those values differ from default "fieldset label" rule to reduce admin toolbox minimum width */\n
div.adminToolbox div.field div.input {margin-left: 0em}\n
\n
/* Cut the cascading heritance if margin-left for input */\n
div.adminToolbox > div.input {margin-left: inherit}\n
div.adminToolbox fieldset div.field label:after {content: inherit}\n
\n
/* Hide some labels */\n
div.adminToolbox fieldset div.hiddenLabel label {\n
display: none;\n
}\n
\n
div.adminToolbox fieldset div.hiddenLabel {\n
margin-left: auto;\n
margin-right: auto;\n
width: 12em;\n
}\n
\n
\n
/* Admin toolbox edit buttons have the same style as actions buttons */\n
div.adminToolbox li > a,\n
button {\n
border: 1px #ddd solid;\n
color: #999;\n
background: #eee;\n
cursor: pointer;\n
display: block;\n
}\n
\n
div.adminToolbox li > a:hover,\n
button:hover {\n
color: #333;\n
background: #b0cfcb;\n
border-color: #9abdb7;\n
}\n
\n
]]></string> </value> ]]></string> </value>
</item> </item>
...@@ -107,7 +186,7 @@ ...@@ -107,7 +186,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>WebSite_viewMap</string> </value> <value> <string>erp5_web_admin_toolbox.css</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -44,46 +44,34 @@ ...@@ -44,46 +44,34 @@
</object> </object>
</value> </value>
</item> </item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<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="master">\n <tal:block replace="nothing"\n
<tal:block metal:use-macro="here/erp5_web_template_header/macros/master">\n xmlns:tal="http://xml.zope.org/namespaces/tal"\n
\n xmlns:metal="http://xml.zope.org/namespaces/metal"\n
\n xmlns:i18n="http://xml.zope.org/namespaces/i18n"/>\n
<tal:block metal:fill-slot="erp5_web_template_head">\n
<link rel="stylesheet" type="text/css" media="screen" href="erp5_web_default_theme.css"/>\n
</tal:block>\n
\n
\n
<tal:block metal:fill-slot="erp5_web_template_main_content">\n
\n \n
<div id="main_content" class="column">\n <tal:block define="dummy python: request.RESPONSE.setHeader(\'Content-Type\', \'text/css;; charset=utf-8\')"/>\n
<tal:block tal:condition="here/REQUEST/portal_status_message | nothing">\n
<!-- XXX Why no portal message displayed there ?\n
Normally a message should be displayed when saving an object through web interface... -->\n
<div tal:content="structure here/REQUEST/portal_status_message | nothing" id="transition_message"/>\n
</tal:block>\n
<tal:block metal:define-slot="main"/>\n
</div>\n
\n \n
<!-- Layout form rendering -->\n
<tal:block tal:condition="python: layout_form is not None">\n
\n \n
<tal:block tal:define="template python: here.developper_shortcut_render">\n /*========================================================================================\n
<tal:block metal:use-macro="template/macros/form"/>\n Content CSS (View mode)\n
</tal:block>\n
\n \n
<tal:block tal:repeat="aggregate python: layout_form.WebSite_getGroupList([\'header\', \'left\', \'right\', \'footer\'])">\n The default behaviour is to use the editable mode CSS.\n
<tal:block metal:use-macro="here/erp5_web_macros/macros/render_aggregate"/>\n However, to change the appearance between view mode and editable mode,\n
</tal:block>\n it is possible to define here a different CSS.\n
\n \n
</tal:block>\n ========================================================================================*/\n
\n \n
</tal:block>\n <tal:block tal:replace="structure python:here.getPortalObject()[\'erp5_web_editable_content.css\']()"/>
</tal:block>\n
</tal:block>
]]></string> </value> ]]></string> </value>
</item> </item>
...@@ -97,7 +85,7 @@ ...@@ -97,7 +85,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>erp5_web_default_template</string> </value> <value> <string>erp5_web_content.css</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<pickle> <pickle>
<tuple> <tuple>
<tuple> <tuple>
<string>Products.ERP5Form.Report</string> <string>Products.ERP5Form.Form</string>
<string>ERP5Report</string> <string>ERP5Form</string>
</tuple> </tuple>
<none/> <none/>
</tuple> </tuple>
...@@ -45,12 +45,6 @@ ...@@ -45,12 +45,6 @@
<tuple/> <tuple/>
</value> </value>
</item> </item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>action</string> </key> <key> <string>action</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -67,10 +61,14 @@ ...@@ -67,10 +61,14 @@
<key> <string>group_list</string> </key> <key> <string>group_list</string> </key>
<value> <value>
<list> <list>
<string>Default</string> <string>left column transparent (Logo)</string>
<string>right</string> <string>left column (Navigation)</string>
<string>center</string> <string>left column (Contents)</string>
<string>bottom</string> <string>left column (Search)</string>
<string>left column (Debug)</string>
<string>right column (Demo)</string>
<string>right column (Toolbox)</string>
<string>footer</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -79,30 +77,68 @@ ...@@ -79,30 +77,68 @@
<value> <value>
<dictionary> <dictionary>
<item> <item>
<key> <string>Default</string> </key> <key> <string>footer</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left column (Contents)</string> </key>
<value> <value>
<list> <list>
<string>my_tasks_title</string> <string>subsection_list</string>
<string>my_tasks_description</string> <string>section_content_list</string>
</list> </list>
</value> </value>
</item> </item>
<item> <item>
<key> <string>bottom</string> </key> <key> <string>left column (Debug)</string> </key>
<value> <value>
<list/> <list>
<string>applicable_layout</string>
</list>
</value> </value>
</item> </item>
<item> <item>
<key> <string>center</string> </key> <key> <string>left column (Navigation)</string> </key>
<value> <value>
<list/> <list>
<string>language_selector</string>
<string>breadcrumb</string>
</list>
</value> </value>
</item> </item>
<item> <item>
<key> <string>right</string> </key> <key> <string>left column (Search)</string> </key>
<value> <value>
<list/> <list>
<string>your_search_text</string>
<string>search_action</string>
</list>
</value>
</item>
<item>
<key> <string>left column transparent (Logo)</string> </key>
<value>
<list>
<string>website_logo</string>
</list>
</value>
</item>
<item>
<key> <string>right column (Demo)</string> </key>
<value>
<list>
<string>about_box</string>
</list>
</value>
</item>
<item>
<key> <string>right column (Toolbox)</string> </key>
<value>
<list>
<string>admin_toolbox</string>
</list>
</value> </value>
</item> </item>
</dictionary> </dictionary>
...@@ -110,7 +146,7 @@ ...@@ -110,7 +146,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>ERP5Web_viewMyTask</string> </value> <value> <string>erp5_web_layout</string> </value>
</item> </item>
<item> <item>
<key> <string>method</string> </key> <key> <string>method</string> </key>
...@@ -118,19 +154,15 @@ ...@@ -118,19 +154,15 @@
</item> </item>
<item> <item>
<key> <string>name</string> </key> <key> <string>name</string> </key>
<value> <string>ERP5Web_viewMyTask</string> </value> <value> <string>erp5_web_default_layout</string> </value>
</item> </item>
<item> <item>
<key> <string>pt</string> </key> <key> <string>pt</string> </key>
<value> <string>report_list</string> </value> <value> <string>template_erp5_web</string> </value>
</item>
<item>
<key> <string>report_method</string> </key>
<value> <string>ERP5Web_getMyTaskSectionList</string> </value>
</item> </item>
<item> <item>
<key> <string>row_length</string> </key> <key> <string>row_length</string> </key>
<value> <int>4</int> </value> <value> <int>6</int> </value>
</item> </item>
<item> <item>
<key> <string>stored_encoding</string> </key> <key> <string>stored_encoding</string> </key>
...@@ -138,7 +170,7 @@ ...@@ -138,7 +170,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>My Tasks</string> </value> <value> <string>Default Web Layout</string> </value>
</item> </item>
<item> <item>
<key> <string>unicode_mode</string> </key> <key> <string>unicode_mode</string> </key>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>latest_news</string> </value> <value> <string>about_box</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -211,17 +211,13 @@ ...@@ -211,17 +211,13 @@
</item> </item>
<item> <item>
<key> <string>css_class</string> </key> <key> <string>css_class</string> </key>
<value> <string></string> </value> <value> <string>hiddenLabel</string> </value>
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
<ul>\n This is a <b>demo</b> html box that displays a some text on the <i>right column</i> of the site.
<li>a</li>\n
<li>b</li>\n
<li>c</li>\n
</ul>
]]></string> </value> ]]></string> </value>
</item> </item>
...@@ -271,7 +267,7 @@ ...@@ -271,7 +267,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Latest News</string> </value> <value> <string>Demo</string> </value>
</item> </item>
<item> <item>
<key> <string>unicode</string> </key> <key> <string>unicode</string> </key>
......
...@@ -267,7 +267,7 @@ ...@@ -267,7 +267,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Admin Tool Box</string> </value> <value> <string>Admin</string> </value>
</item> </item>
<item> <item>
<key> <string>unicode</string> </key> <key> <string>unicode</string> </key>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>listbox_modification_date</string> </value> <value> <string>applicable_layout</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -217,7 +217,7 @@ ...@@ -217,7 +217,7 @@
</item> </item>
<item> <item>
<key> <string>editable</string> </key> <key> <string>editable</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>enabled</string> </key> <key> <string>enabled</string> </key>
...@@ -245,7 +245,7 @@ ...@@ -245,7 +245,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>listbox_modification_date</string> </value> <value> <string>Layout</string> </value>
</item> </item>
<item> <item>
<key> <string>truncate</string> </key> <key> <string>truncate</string> </key>
...@@ -279,7 +279,7 @@ ...@@ -279,7 +279,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>cell/WebPage_getModificationDate</string> </value> <value> <string>here/getApplicableLayout</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -213,7 +213,7 @@ ...@@ -213,7 +213,7 @@
</item> </item>
<item> <item>
<key> <string>css_class</string> </key> <key> <string>css_class</string> </key>
<value> <string></string> </value> <value> <string>hiddenLabel</string> </value>
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>sub_document_list</string> </value> <value> <string>language_selector</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -213,7 +213,7 @@ ...@@ -213,7 +213,7 @@
</item> </item>
<item> <item>
<key> <string>css_class</string> </key> <key> <string>css_class</string> </key>
<value> <string></string> </value> <value> <string>hiddenLabel languageSelector</string> </value>
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
...@@ -265,7 +265,7 @@ ...@@ -265,7 +265,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Sub Documents</string> </value> <value> <string>Language</string> </value>
</item> </item>
<item> <item>
<key> <string>unicode</string> </key> <key> <string>unicode</string> </key>
...@@ -299,7 +299,7 @@ ...@@ -299,7 +299,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>here/sub_document_list</string> </value> <value> <string>here/language_selector</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<pickle> <pickle>
<tuple> <tuple>
<tuple> <tuple>
<string>Products.Formulator.StandardFields</string> <string>Products.ERP5Form.InputButtonField</string>
<string>StringField</string> <string>InputButtonField</string>
</tuple> </tuple>
<none/> <none/>
</tuple> </tuple>
...@@ -14,25 +14,12 @@ ...@@ -14,25 +14,12 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>listbox_version</string> </value> <value> <string>search_action</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
<value> <value>
<dictionary> <dictionary/>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>Too much input was given.</string> </value>
</item>
</dictionary>
</value> </value>
</item> </item>
<item> <item>
...@@ -55,14 +42,6 @@ ...@@ -55,14 +42,6 @@
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>editable</string> </key> <key> <string>editable</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -71,10 +50,6 @@ ...@@ -71,10 +50,6 @@
<key> <string>enabled</string> </key> <key> <string>enabled</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>extra</string> </key> <key> <string>extra</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -84,29 +59,13 @@ ...@@ -84,29 +59,13 @@
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>max_length</string> </key> <key> <string>name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary> </dictionary>
</value> </value>
</item> </item>
...@@ -130,14 +89,6 @@ ...@@ -130,14 +89,6 @@
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>editable</string> </key> <key> <string>editable</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -146,10 +97,6 @@ ...@@ -146,10 +97,6 @@
<key> <string>enabled</string> </key> <key> <string>enabled</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>extra</string> </key> <key> <string>extra</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -159,29 +106,13 @@ ...@@ -159,29 +106,13 @@
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>max_length</string> </key> <key> <string>name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary> </dictionary>
</value> </value>
</item> </item>
...@@ -195,36 +126,24 @@ ...@@ -195,36 +126,24 @@
</item> </item>
<item> <item>
<key> <string>css_class</string> </key> <key> <string>css_class</string> </key>
<value> <string>number</string> </value> <value> <string>hiddenLabel searchButton</string> </value>
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <string></string> </value> <value> <string>Go</string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item> <item>
<key> <string>editable</string> </key> <key> <string>editable</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>enabled</string> </key> <key> <string>enabled</string> </key>
<value> <int>1</int> </value> <value> <int>1</int> </value>
</item> </item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>extra</string> </key> <key> <string>extra</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -234,28 +153,12 @@ ...@@ -234,28 +153,12 @@
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>max_length</string> </key> <key> <string>name</string> </key>
<value> <string></string> </value> <value> <string>Base_searchResultList:method</string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>version</string> </value> <value> <string>Search</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item> </item>
</dictionary> </dictionary>
</value> </value>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>sub_web_object_list</string> </value> <value> <string>subsection_list</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -150,7 +150,9 @@ ...@@ -150,7 +150,9 @@
</item> </item>
<item> <item>
<key> <string>enabled</string> </key> <key> <string>enabled</string> </key>
<value> <string></string> </value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>external_validator</string> </key> <key> <string>external_validator</string> </key>
...@@ -265,7 +267,7 @@ ...@@ -265,7 +267,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Sub Web Objects</string> </value> <value> <string>Subsections</string> </value>
</item> </item>
<item> <item>
<key> <string>unicode</string> </key> <key> <string>unicode</string> </key>
...@@ -299,7 +301,26 @@ ...@@ -299,7 +301,26 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>here/sub_web_object_list</string> </value> <value> <string>here/subsection_render</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<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.getPortalType() in (\'Web Site\', \'Web Section\')</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>listbox_title</string> </value> <value> <string>your_search_text</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -197,7 +197,7 @@ ...@@ -197,7 +197,7 @@
</item> </item>
<item> <item>
<key> <string>css_class</string> </key> <key> <string>css_class</string> </key>
<value> <string>mainLink</string> </value> <value> <string>hiddenLabel searchInput</string> </value>
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
...@@ -217,7 +217,7 @@ ...@@ -217,7 +217,7 @@
</item> </item>
<item> <item>
<key> <string>editable</string> </key> <key> <string>editable</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>enabled</string> </key> <key> <string>enabled</string> </key>
...@@ -245,7 +245,7 @@ ...@@ -245,7 +245,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>title</string> </value> <value> <string>Search</string> </value>
</item> </item>
<item> <item>
<key> <string>truncate</string> </key> <key> <string>truncate</string> </key>
...@@ -279,7 +279,7 @@ ...@@ -279,7 +279,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>cell/ERP5Web_getVerboseTitle</string> </value> <value> <string>request/your_search_text | string:</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -45,15 +45,9 @@ ...@@ -45,15 +45,9 @@
<tuple/> <tuple/>
</value> </value>
</item> </item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>action</string> </key> <key> <string>action</string> </key>
<value> <string>Base_doSelect</string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>encoding</string> </key> <key> <string>encoding</string> </key>
...@@ -67,11 +61,14 @@ ...@@ -67,11 +61,14 @@
<key> <string>group_list</string> </key> <key> <string>group_list</string> </key>
<value> <value>
<list> <list>
<string>left</string> <string>left column transparent (Logo)</string>
<string>right</string> <string>left column (Navigation)</string>
<string>center</string> <string>left column (Contents)</string>
<string>bottom</string> <string>left column (Search)</string>
<string>hidden</string> <string>left column (Debug)</string>
<string>right column (Demo)</string>
<string>right column (Toolbox)</string>
<string>footer</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -80,40 +77,67 @@ ...@@ -80,40 +77,67 @@
<value> <value>
<dictionary> <dictionary>
<item> <item>
<key> <string>bottom</string> </key> <key> <string>footer</string> </key>
<value> <value>
<list/> <list/>
</value> </value>
</item> </item>
<item> <item>
<key> <string>center</string> </key> <key> <string>left column (Contents)</string> </key>
<value> <value>
<list/> <list>
<string>subsection_list</string>
<string>section_content_list</string>
</list>
</value> </value>
</item> </item>
<item> <item>
<key> <string>hidden</string> </key> <key> <string>left column (Debug)</string> </key>
<value> <value>
<list> <list>
<string>listbox_translated_validation_state_title</string> <string>applicable_layout</string>
<string>listbox_version</string>
<string>listbox_title</string>
</list> </list>
</value> </value>
</item> </item>
<item> <item>
<key> <string>left</string> </key> <key> <string>left column (Navigation)</string> </key>
<value> <value>
<list> <list>
<string>recent_changes_title</string> <string>breadcrumb</string>
<string>listbox</string>
</list> </list>
</value> </value>
</item> </item>
<item> <item>
<key> <string>right</string> </key> <key> <string>left column (Search)</string> </key>
<value> <value>
<list/> <list>
<string>your_search_text</string>
<string>search_action</string>
</list>
</value>
</item>
<item>
<key> <string>left column transparent (Logo)</string> </key>
<value>
<list>
<string>website_logo</string>
</list>
</value>
</item>
<item>
<key> <string>right column (Demo)</string> </key>
<value>
<list>
<string>about_box</string>
</list>
</value>
</item>
<item>
<key> <string>right column (Toolbox)</string> </key>
<value>
<list>
<string>admin_toolbox</string>
</list>
</value> </value>
</item> </item>
</dictionary> </dictionary>
...@@ -121,7 +145,7 @@ ...@@ -121,7 +145,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>WebPageModule_viewRecentChanges</string> </value> <value> <string>erp5_web_section_layout</string> </value>
</item> </item>
<item> <item>
<key> <string>method</string> </key> <key> <string>method</string> </key>
...@@ -129,19 +153,15 @@ ...@@ -129,19 +153,15 @@
</item> </item>
<item> <item>
<key> <string>name</string> </key> <key> <string>name</string> </key>
<value> <string>WebPageModule_viewRecentChanges</string> </value> <value> <string>erp5_web_default_layout</string> </value>
</item> </item>
<item> <item>
<key> <string>pt</string> </key> <key> <string>pt</string> </key>
<value> <string>form_list</string> </value> <value> <string>template_erp5_web</string> </value>
</item>
<item>
<key> <string>rid</string> </key>
<value> <int>-1722436574</int> </value>
</item> </item>
<item> <item>
<key> <string>row_length</string> </key> <key> <string>row_length</string> </key>
<value> <int>4</int> </value> <value> <int>6</int> </value>
</item> </item>
<item> <item>
<key> <string>stored_encoding</string> </key> <key> <string>stored_encoding</string> </key>
...@@ -149,13 +169,7 @@ ...@@ -149,13 +169,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Web Site Last Changes</string> </value> <value> <string>Default Section Layout</string> </value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>unicode_mode</string> </key> <key> <string>unicode_mode</string> </key>
......
...@@ -211,11 +211,15 @@ ...@@ -211,11 +211,15 @@
</item> </item>
<item> <item>
<key> <string>css_class</string> </key> <key> <string>css_class</string> </key>
<value> <string></string> </value> <value> <string>hiddenLabel</string> </value>
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <string>This is a demo html box that display a little description of the current web site.</string> </value> <value> <string encoding="cdata"><![CDATA[
This is a <b>demo</b> html box that displays a some text on the <i>right column</i> of the site.
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -263,7 +267,7 @@ ...@@ -263,7 +267,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>About</string> </value> <value> <string>Demo</string> </value>
</item> </item>
<item> <item>
<key> <string>unicode</string> </key> <key> <string>unicode</string> </key>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>listbox_translated_validation_state_title</string> </value> <value> <string>applicable_layout</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -120,13 +120,13 @@ ...@@ -120,13 +120,13 @@
</item> </item>
<item> <item>
<key> <string>css_class</string> </key> <key> <string>css_class</string> </key>
<value> <value> <string></string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <string></string> </value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -217,7 +217,7 @@ ...@@ -217,7 +217,7 @@
</item> </item>
<item> <item>
<key> <string>editable</string> </key> <key> <string>editable</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>enabled</string> </key> <key> <string>enabled</string> </key>
...@@ -245,7 +245,7 @@ ...@@ -245,7 +245,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>translated_validation_state_title</string> </value> <value> <string>Layout</string> </value>
</item> </item>
<item> <item>
<key> <string>truncate</string> </key> <key> <string>truncate</string> </key>
...@@ -279,7 +279,7 @@ ...@@ -279,7 +279,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python: cell.getValidationState()</string> </value> <value> <string>here/getApplicableLayout</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>login_box</string> </value> <value> <string>breadcrumb</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -213,7 +213,7 @@ ...@@ -213,7 +213,7 @@
</item> </item>
<item> <item>
<key> <string>css_class</string> </key> <key> <string>css_class</string> </key>
<value> <string>centered</string> </value> <value> <string>hiddenLabel</string> </value>
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
...@@ -265,7 +265,7 @@ ...@@ -265,7 +265,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Login Menu</string> </value> <value> <string>Breadcrumb</string> </value>
</item> </item>
<item> <item>
<key> <string>unicode</string> </key> <key> <string>unicode</string> </key>
...@@ -299,7 +299,7 @@ ...@@ -299,7 +299,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>here/login_box/login</string> </value> <value> <string>here/breadcrumb</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<pickle> <pickle>
<tuple> <tuple>
<tuple> <tuple>
<string>Products.Formulator.StandardFields</string> <string>Products.ERP5Form.InputButtonField</string>
<string>StringField</string> <string>InputButtonField</string>
</tuple> </tuple>
<none/> <none/>
</tuple> </tuple>
...@@ -14,25 +14,12 @@ ...@@ -14,25 +14,12 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>listbox_version</string> </value> <value> <string>search_action</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
<value> <value>
<dictionary> <dictionary/>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>Too much input was given.</string> </value>
</item>
</dictionary>
</value> </value>
</item> </item>
<item> <item>
...@@ -55,14 +42,6 @@ ...@@ -55,14 +42,6 @@
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>editable</string> </key> <key> <string>editable</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -71,10 +50,6 @@ ...@@ -71,10 +50,6 @@
<key> <string>enabled</string> </key> <key> <string>enabled</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>extra</string> </key> <key> <string>extra</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -84,29 +59,13 @@ ...@@ -84,29 +59,13 @@
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>max_length</string> </key> <key> <string>name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary> </dictionary>
</value> </value>
</item> </item>
...@@ -130,14 +89,6 @@ ...@@ -130,14 +89,6 @@
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>editable</string> </key> <key> <string>editable</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -146,10 +97,6 @@ ...@@ -146,10 +97,6 @@
<key> <string>enabled</string> </key> <key> <string>enabled</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>extra</string> </key> <key> <string>extra</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -159,29 +106,13 @@ ...@@ -159,29 +106,13 @@
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>max_length</string> </key> <key> <string>name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary> </dictionary>
</value> </value>
</item> </item>
...@@ -195,36 +126,24 @@ ...@@ -195,36 +126,24 @@
</item> </item>
<item> <item>
<key> <string>css_class</string> </key> <key> <string>css_class</string> </key>
<value> <string>number</string> </value> <value> <string>hiddenLabel searchButton</string> </value>
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <string></string> </value> <value> <string>Go</string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item> <item>
<key> <string>editable</string> </key> <key> <string>editable</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>enabled</string> </key> <key> <string>enabled</string> </key>
<value> <int>1</int> </value> <value> <int>1</int> </value>
</item> </item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>extra</string> </key> <key> <string>extra</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -234,28 +153,12 @@ ...@@ -234,28 +153,12 @@
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>max_length</string> </key> <key> <string>name</string> </key>
<value> <string></string> </value> <value> <string>Base_searchResultList:method</string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>version</string> </value> <value> <string>Search</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item> </item>
</dictionary> </dictionary>
</value> </value>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>listbox_title</string> </value> <value> <string>your_search_text</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -197,7 +197,7 @@ ...@@ -197,7 +197,7 @@
</item> </item>
<item> <item>
<key> <string>css_class</string> </key> <key> <string>css_class</string> </key>
<value> <string>mainLink</string> </value> <value> <string>hiddenLabel searchInput</string> </value>
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
...@@ -217,7 +217,7 @@ ...@@ -217,7 +217,7 @@
</item> </item>
<item> <item>
<key> <string>editable</string> </key> <key> <string>editable</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>enabled</string> </key> <key> <string>enabled</string> </key>
...@@ -245,7 +245,7 @@ ...@@ -245,7 +245,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>title</string> </value> <value> <string>Search</string> </value>
</item> </item>
<item> <item>
<key> <string>truncate</string> </key> <key> <string>truncate</string> </key>
...@@ -279,7 +279,7 @@ ...@@ -279,7 +279,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>cell/ERP5Web_getVerboseTitle</string> </value> <value> <string>request/your_search_text | string:</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -48,17 +48,13 @@ ...@@ -48,17 +48,13 @@
<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="master"\n <tal:block tal:define="language_list here/Localizer/get_languages_map;\n
tal:define="website python: here.WebSite_getBreadcrumbItemList()[0][1];\n absolute_url here/absolute_url">\n
website_url python: website.absolute_url()">\n <tal:block tal:repeat="language language_list" tal:condition="python:len(language_list) > 1">\n
<a tal:condition="here/portal_membership/isAnonymousUser"\n <b tal:condition="language/selected"><u tal:content="language/id"/></b>\n
tal:attributes="href python: \'%s/login_form\' % website_url">\n <a tal:attributes="href python:\'%s/Base_doLanguage?select_language=%s\' % (absolute_url, language[\'id\'])"\n
<img src="login_box/login.png"/> Login\n tal:content="language/id" tal:condition="not:language/selected"/>\n
</a>\n </tal:block>\n
<a tal:condition="not: here/portal_membership/isAnonymousUser"\n
tal:attributes="href python: \'%s/logout\' % website_url"> \n
<img src="login_box/logout.png"/> Logout\n
</a>\n
</tal:block> </tal:block>
]]></string> </value> ]]></string> </value>
...@@ -73,7 +69,7 @@ ...@@ -73,7 +69,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>login</string> </value> <value> <string>language_selector</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -44,12 +44,6 @@ ...@@ -44,12 +44,6 @@
</object> </object>
</value> </value>
</item> </item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
...@@ -57,79 +51,76 @@ ...@@ -57,79 +51,76 @@
<tal:block tal:replace="nothing"\n <tal:block tal:replace="nothing"\n
xmlns:tal="http://xml.zope.org/namespaces/tal"\n xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal"\n xmlns:metal="http://xml.zope.org/namespaces/metal"\n
xmlns:i18n="http://xml.zope.org/namespaces/i18n"><!--\n xmlns:i18n="http://xml.zope.org/namespaces/i18n">\n
* Note: If this template is not working, look at erp5_xhtml_style/template_erp5_xhtml_style\n <!--\n
which is the equivalent of this erp5_web_default_template page template in default\n Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.\n
erp5 xhtml style.\n Vincent Pelletier <vincent@nexedi.com>\n
* XXX Is it a good idea to merge this header with th one in template_erp5_xhtml_style ?\n Christophe Dumez <christophe@nexedi.com>\n
--></tal:block>\n
\n \n
<tal:block metal:define-macro="master">\n This program is Free Software; you can redistribute it and/or\n
\n modify it under the terms of the GNU General Public License\n
<tal:block metal:use-macro="here/global_definitions/macros/header_definitions"/>\n as published by the Free Software Foundation; either version 2\n
\n of the License, or (at your option) any later version.\n
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n
\n \n
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n This program is distributed in the hope that it will be useful,\n
<head tal:define="dummy python: request.RESPONSE.setHeader(\'Content-Type\', \'text/html;; charset=utf-8\')">\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n
<base tal:attributes="href python: \'%s/\' % here.getWebSiteValue().absolute_url()"/>\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n
<meta name="generator" content="ERP5"/>\n GNU General Public License for more details.\n
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>\n
<title tal:content="python: \'%s | %s\' % (here.getTitleOrId(), here.getPortalObject().getTitle() or here.getPortalObject().getId())"/>\n
\n \n
<!-- erp5_web_form.css is a constant among erp5 web themes -->\n You should have received a copy of the GNU General Public License\n
<link rel="stylesheet" type="text/css" media="screen" href="erp5_web_form.css"/>\n along with this program; if not, write to the Free Software\n
\n Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
<tal:block tal:repeat="css css_list">\n -->\n
<link tal:attributes="href css" type="text/css" rel="stylesheet"/>\n </tal:block>\n
</tal:block>\n
\n \n
<script type="text/javascript">\n <tal:block metal:define-macro="master">\n
// The first input element with a "autofocus" class will get the focus,\n <tal:block tal:define="portal_path here/portal_url;\n
// else, the first input is choosen.\n editable request/editable_mode | python: 0; \n
function autoFocus() {\n global css_list_template python:[\'%s/erp5_web.css\' % portal_path,\n
var inputs = document.getElementsByTagName("input");\n \'%s/erp5_web_%scontent.css\' % (portal_path, editable and \'editable_\' or \'\'),\n
var input_to_focus = inputs[0];\n \'%s/erp5_web_admin_toolbox.css\' % portal_path,\n
for (i=0;i<inputs.length;i++) {\n \'%s/template_erp5_web.css\' % portal_path,\n
if (inputs[i].className == "autofocus") {\n ]">\n
input_to_focus = inputs[i];\n <tal:block metal:use-macro="here/template_erp5_xhtml_style/macros/master">\n
}\n <tal:block metal:fill-slot="layout"\n
}\n tal:define="dummy python: request.set(\'editable_mode\', True)">\n
input_to_focus.focus();\n <div id="main_content" class="column center">\n
}\n <tal:block tal:condition="here/REQUEST/portal_status_message | nothing">\n
</script>\n <!-- XXX Why no portal message displayed there ?\n
\n Normally a message should be displayed when saving an object through web interface... -->\n
<tal:block tal:repeat="js js_list">\n <div tal:content="structure here/REQUEST/portal_status_message | nothing" id="transition_message"/>\n
<script tal:attributes="src js" type="text/javascript"></script>\n
</tal:block>\n </tal:block>\n
<tal:block metal:define-slot="main"/>\n
</div>\n
\n
<!-- Layout form rendering -->\n
<tal:block tal:condition="python: layout_form is not None">\n
\n \n
<!-- TODO: No local JS and/or CSS file support yet: they should be registered via\n <tal:block tal:replace="nothing">\n
generic mechanism and put in css_list and js_list above. -->\n \n
<tal:block metal:define-slot="erp5_web_template_head"/>\n <!--<tal:block tal:define="template python: here.developper_shortcut_render">\n
\n <tal:block metal:use-macro="template/macros/form"/>\n
<tal:block metal:use-macro="here/global_definitions/macros/planning_box_definitions"/>\n </tal:block>-->\n
</head>\n \n
\n <!-- Here we force the editable_mode variable to True to let the layout and widgets\n
<body> <!-- TODO: This conflicts with tabber.js => onload="autoFocus()"-->\n based on forms be rendered as editable or non-editable according the "editable"\n
<!-- Global form is used to save data of other fields when we edit one another (generally make sense in listbox and/or relation string field) -->\n property on fields.\n
<form id="main_form"\n However this hasa bad side effect: the editable_mode variable in request is\n
tal:attributes="enctype python: here.ERP5Site_getFormEnctype(form);\n forced to True and is no longer representative of the web site mode.\n
action url;\n
method form/method | string:post">\n
\n
<tal:block metal:use-macro="here/global_definitions/macros/http_definitions"/>\n
\n
<!-- Main content rendering -->\n
<!-- Here we force the editable_mode variable to True to let the layout and widgets based on forms be rendered as editable or non-editable according the "editable" property on fields.\n
XXX However this hasa bad side effect: the editable_mode variable in request is force to True and is no longer representative of the web site mode.\n
-->\n -->\n
<tal:block tal:define="dummy python: request.set(\'editable_mode\', True)">\n
<tal:block metal:define-slot="erp5_web_template_main_content"/>\n
</tal:block>\n </tal:block>\n
\n \n
</form>\n <tal:block tal:repeat="aggregate python: layout_form.WebSite_getGroupList([\'header\', \'left\', \'right\', \'footer\'])"\n
</body>\n tal:define="dummy python: request.set(\'editable_mode\', True);\n
</html>\n dummy python: request.set(\'http_parameters\', http_parameters);\n
dummy python: request.set(\'actions\', actions);">\n
<tal:block metal:use-macro="here/aggregate_render/macros/aggregate_render"/>\n
</tal:block>\n
\n
</tal:block>\n
</tal:block>\t\n
</tal:block>\n
</tal:block>\n
</tal:block> </tal:block>
]]></string> </value> ]]></string> </value>
...@@ -144,7 +135,7 @@ ...@@ -144,7 +135,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>erp5_web_template_header</string> </value> <value> <string>template_erp5_web</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -68,7 +68,13 @@ ...@@ -68,7 +68,13 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>return context.WebSite_viewSearchResultList(**kw)\n <value> <string>"""\n
Create New Content by Cloning or Other Methods (replace old WebSite_clone).\n
\n
This script is called by the admin toolbox.\n
"""\n
\n
return context.Base_cloneContent(clone=0)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -83,15 +89,9 @@ ...@@ -83,15 +89,9 @@
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>**kw</string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -117,10 +117,8 @@ ...@@ -117,10 +117,8 @@
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>kw</string>
<string>_apply_</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -137,7 +135,11 @@ ...@@ -137,7 +135,11 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>WebSite_viewSearchResult</string> </value> <value> <string>Base_newContent</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Clone or Create new content</string> </value>
</item> </item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
......
...@@ -55,7 +55,8 @@ ...@@ -55,7 +55,8 @@
\n \n
<ul tal:repeat="document python: context.WebSection_getDocumentValueList()">\n <ul tal:repeat="document python: context.WebSection_getDocumentValueList()">\n
<li><a tal:attributes="href python: document.WebSite_getDocumentUrl()"\n <li><a tal:attributes="href python: document.WebSite_getDocumentUrl()"\n
tal:content="python: document.ERP5Web_getVerboseTitle(priority=\'short_title\')"/></li>\n tal:content="python: document.getProperty(\'translated_short_title\', None)\n
or document.getTranslatedTitleOrId()"/></li>\n
</ul> </ul>
]]></string> </value> ]]></string> </value>
...@@ -70,7 +71,7 @@ ...@@ -70,7 +71,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>sub_document_list</string> </value> <value> <string>section_content_render</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
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