Commit 77cece36 authored by Ivan Tyagov's avatar Ivan Tyagov

Make it possible to choose style of switching to different language using a Web Site configuration

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39216 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d1c02864
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple>
<global name="ERP5Form" module="Products.ERP5Form.Form"/> <global name="ERP5Form" module="Products.ERP5Form.Form"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -107,6 +104,7 @@ ...@@ -107,6 +104,7 @@
<string>my_layout_navigation_menu_indent</string> <string>my_layout_navigation_menu_indent</string>
<string>my_layout_navigation_menu_opacity</string> <string>my_layout_navigation_menu_opacity</string>
<string>my_layout_all_languages</string> <string>my_layout_all_languages</string>
<string>my_layout_display_language_icons</string>
<string>my_layout_all_versions</string> <string>my_layout_all_versions</string>
<string>my_layout_max_breadcrumb_length</string> <string>my_layout_max_breadcrumb_length</string>
</list> </list>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_layout_display_language_icons</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>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_checkbox</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Show language national flag icons</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -2,16 +2,13 @@ ...@@ -2,16 +2,13 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item> <item>
<key> <string>_Cacheable__manager_id</string> </key> <key> <string>_Cacheable__manager_id</string> </key>
<value> <string>web_site_user_ram_cache</string> </value> <value> <string>web_section_user_ram_cache</string> </value>
</item> </item>
<item> <item>
<key> <string>_bind_names</string> </key> <key> <string>_bind_names</string> </key>
...@@ -53,20 +50,27 @@ ...@@ -53,20 +50,27 @@
<tal:block tal:define="current_web_site python:request.get(\'current_web_site\', here);\n <tal:block tal:define="current_web_site python:request.get(\'current_web_site\', here);\n
portal_path python:request.get(\'current_web_site_url\', current_web_site.absolute_url());\n portal_path python:request.get(\'current_web_site_url\', current_web_site.absolute_url());\n
available_language_list current_web_site/getAvailableLanguageList;\n available_language_list current_web_site/getAvailableLanguageList;\n
language_list current_web_site/Localizer/get_languages_map;"\n language_list current_web_site/Localizer/get_languages_map;\n
display_language_icons python:here.getLayoutProperty(\'layout_display_language_icons\', True);"\n
tal:condition="python:len(language_list) > 1">\n tal:condition="python:len(language_list) > 1">\n
\n
<ul class="language_box">\n <ul class="language_box">\n
<tal:block tal:repeat="language language_list">\n <tal:block tal:repeat="language language_list">\n
<li tal:define="language_id language/id"\n <li tal:define="language_id language/id"\n
tal:condition="python:language_id in available_language_list">\n tal:condition="python:language_id in available_language_list">\n
<a href="" class="selected"\n <a href="" class="selected"\n
tal:attributes="href string:${portal_path}/Base_doLanguage?select_language=${language_id};\n tal:attributes="href string:${portal_path}/Base_doLanguage?select_language=${language_id};\n
class python:int(language[\'selected\']) * \'selected\' or \'not_selected\'">\n class python:int(language[\'selected\']) * \'selected\' or \'not_selected\'"\n
<img alt="language/id" src="${portal_path}/km_img/icon_lang_en.png"\n tal:define="title python:here.Localizer.erp5_ui.gettext(language[\'title\'], lang=language[\'id\'])">\n
tal:define="title python:here.Localizer.erp5_ui.gettext(language[\'title\'], lang=language[\'id\'])"\n <img src="${portal_path}/km_img/icon_lang_en.png"\n
tal:condition="display_language_icons"\n
tal:attributes="src string:${portal_path}/km_img/icon_lang_${language_id}.png;\n tal:attributes="src string:${portal_path}/km_img/icon_lang_${language_id}.png;\n
title title;\n title title;\n
alt title" />\n alt title" />\n
<span tal:condition="not: display_language_icons"\n
tal:content="language_id"\n
tal:attributes="title title;\n
alt title"/>\n
</a>\n </a>\n
</li>\n </li>\n
</tal:block>\n </tal:block>\n
......
...@@ -504,7 +504,6 @@ ul.widget_management_box li{\n ...@@ -504,7 +504,6 @@ ul.widget_management_box li{\n
display: block;\n display: block;\n
}\n }\n
ul.language_box li {\n ul.language_box li {\n
\n
\tfloat:left;\n \tfloat:left;\n
\tmargin: 0 2px;\n \tmargin: 0 2px;\n
\n \n
...@@ -519,12 +518,11 @@ ul.language_box img {\n ...@@ -519,12 +518,11 @@ ul.language_box img {\n
opacity:0.7;\n opacity:0.7;\n
}\n }\n
\n \n
/* Language icon */\n
ul.language_box .selected img {\n ul.language_box .selected img {\n
\n
padding:2px;\n padding:2px;\n
border:1px solid #808080;\n border:1px solid #808080;\n
opacity:1;\n opacity:1;\n
\n
}\n }\n
\n \n
ul.language_box .not_selected img:hover{\n ul.language_box .not_selected img:hover{\n
...@@ -532,6 +530,16 @@ ul.language_box .not_selected img:hover{\n ...@@ -532,6 +530,16 @@ ul.language_box .not_selected img:hover{\n
padding:2px;\n padding:2px;\n
}\n }\n
\n \n
/* Language strings */\n
ul.language_box .not_selected span,\n
ul.language_box .selected span {\n
color:gray;\n
}\n
ul.language_box .selected span{\n
text-decoration:underline;\n
text-shadow:none;\n
}\n
\n
ul.widget_management_box{\tpadding: 0 0px 0 0;}\n ul.widget_management_box{\tpadding: 0 0px 0 0;}\n
\n \n
ul.widget_management_box a {float:left;}\n ul.widget_management_box a {float:left;}\n
......
1600 1601
\ No newline at end of file \ No newline at end of file
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