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
No related merge requests found
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ERP5Form" module="Products.ERP5Form.Form"/>
<tuple/>
</tuple>
<global name="ERP5Form" module="Products.ERP5Form.Form"/>
</pickle>
<pickle>
<dictionary>
......@@ -107,6 +104,7 @@
<string>my_layout_navigation_menu_indent</string>
<string>my_layout_navigation_menu_opacity</string>
<string>my_layout_all_languages</string>
<string>my_layout_display_language_icons</string>
<string>my_layout_all_versions</string>
<string>my_layout_max_breadcrumb_length</string>
</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 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
<tuple/>
</tuple>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<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>
<key> <string>_bind_names</string> </key>
......@@ -53,20 +50,27 @@
<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
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
\n
<ul class="language_box">\n
<tal:block tal:repeat="language language_list">\n
<li tal:define="language_id language/id"\n
tal:condition="python:language_id in available_language_list">\n
<a href="" class="selected"\n
tal:attributes="href string:${portal_path}/Base_doLanguage?select_language=${language_id};\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
class python:int(language[\'selected\']) * \'selected\' or \'not_selected\'"\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
title 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
</li>\n
</tal:block>\n
......
......@@ -504,7 +504,6 @@ ul.widget_management_box li{\n
display: block;\n
}\n
ul.language_box li {\n
\n
\tfloat:left;\n
\tmargin: 0 2px;\n
\n
......@@ -519,12 +518,11 @@ ul.language_box img {\n
opacity:0.7;\n
}\n
\n
/* Language icon */\n
ul.language_box .selected img {\n
\n
padding:2px;\n
border:1px solid #808080;\n
opacity:1;\n
\n
}\n
\n
ul.language_box .not_selected img:hover{\n
......@@ -532,6 +530,16 @@ ul.language_box .not_selected img:hover{\n
padding:2px;\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
\n
ul.widget_management_box a {float:left;}\n
......
1600
\ No newline at end of file
1601
\ 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