From 290c73df0c880d829b6b82eded86ae2170b9a5b5 Mon Sep 17 00:00:00 2001 From: Jean-Paul Smets <jp@nexedi.com> Date: Thu, 11 Sep 2008 12:17:11 +0000 Subject: [PATCH] 2008-09-11 jps * Added a switch to select static vs. dynamic language selection git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23564 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../portal_skins/erp5_web/Base_doLanguage.xml | 2 +- .../portal_skins/erp5_web/WebSite_view.xml | 7 + .../my_static_language_selection.xml | 201 ++++++++++++++++++ bt5/erp5_web/bt/revision | 2 +- 4 files changed, 210 insertions(+), 2 deletions(-) create mode 100644 bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_view/my_static_language_selection.xml diff --git a/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/Base_doLanguage.xml b/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/Base_doLanguage.xml index 3d3d4b049c..20e9acba2f 100644 --- a/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/Base_doLanguage.xml +++ b/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/Base_doLanguage.xml @@ -70,7 +70,7 @@ except AttributeError:\n website = None\n \n -if website is not None:\n +if website is not None and website.isStaticLanguageSelection():\n # Web Mode\n referer_url = context.REQUEST.HTTP_REFERER\n default_language = context.getDefaultAvailableLanguage()\n diff --git a/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_view.xml b/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_view.xml index 673f923ed4..14eda5e389 100644 --- a/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_view.xml +++ b/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_view.xml @@ -125,6 +125,7 @@ <list> <string>my_available_language_set</string> <string>my_default_available_language</string> + <string>my_static_language_selection</string> <string>my_skin_selection_name</string> <string>my_container_layout</string> <string>my_content_layout</string> @@ -166,6 +167,12 @@ <key> <string>title</string> </key> <value> <string>Web Site</string> </value> </item> + <item> + <key> <string>uid</string> </key> + <value> + <none/> + </value> + </item> <item> <key> <string>unicode_mode</string> </key> <value> <int>0</int> </value> diff --git a/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_view/my_static_language_selection.xml b/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_view/my_static_language_selection.xml new file mode 100644 index 0000000000..56038300c1 --- /dev/null +++ b/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_view/my_static_language_selection.xml @@ -0,0 +1,201 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="CheckBoxField" module="Products.Formulator.StandardFields"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_owner</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>my_static_language_selection</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary> + <item> + <key> <string>external_validator_failed</string> </key> + <value> <string>The input failed the external validator.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>alternate_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>css_class</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>default</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>editable</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>external_validator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>alternate_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>css_class</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>default</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>editable</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>external_validator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>uid</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>alternate_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>css_class</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>default</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string>Check this to use the URL to select the language.</string> </value> + </item> + <item> + <key> <string>editable</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>external_validator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Language in URL</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python:here.isStaticLanguageSelection() * \'checked\'</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_web/bt/revision b/bt5/erp5_web/bt/revision index e8f7ef6cfa..2764f7b002 100644 --- a/bt5/erp5_web/bt/revision +++ b/bt5/erp5_web/bt/revision @@ -1 +1 @@ -707 \ No newline at end of file +708 \ No newline at end of file -- 2.30.9