[FIX] Fixed Image Issue in Language Flag Snippet Template
This commit is contained in:
parent
5c5629ae10
commit
b70bbf4028
@ -303,6 +303,7 @@
|
|||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<!-- @todo Flectra: Add language direction parameter for RTL/LTR feature! -->
|
||||||
<template id="language_selector">
|
<template id="language_selector">
|
||||||
<ul class="list-inline js_language_selector mt16" t-if="(request and request.is_frontend_multilang and len(languages) > 1) or (website and (editable or translatable))">
|
<ul class="list-inline js_language_selector mt16" t-if="(request and request.is_frontend_multilang and len(languages) > 1) or (website and (editable or translatable))">
|
||||||
<li t-foreach="languages" t-as="lg">
|
<li t-foreach="languages" t-as="lg">
|
||||||
@ -325,6 +326,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<!-- Language Flags Snippet -->
|
||||||
<template id="language_flags" name="Language Flags">
|
<template id="language_flags" name="Language Flags">
|
||||||
<li
|
<li
|
||||||
t-if="(request and request.is_frontend_multilang and len(languages) > 1) or (website and (editable or translatable))"
|
t-if="(request and request.is_frontend_multilang and len(languages) > 1) or (website and (editable or translatable))"
|
||||||
@ -332,8 +334,8 @@
|
|||||||
<a href="#" class="dropdown-toggle language_flag" data-toggle="dropdown">
|
<a href="#" class="dropdown-toggle language_flag" data-toggle="dropdown">
|
||||||
<t t-foreach="website.language_ids" t-as="lg">
|
<t t-foreach="website.language_ids" t-as="lg">
|
||||||
<t t-if="request.context.get('lang') == lg.code">
|
<t t-if="request.context.get('lang') == lg.code">
|
||||||
<img t-att-src="website.image_url(lg, 'lang_flag')" height="30"
|
<img t-att-src="website.image_url(lg, 'image')" height="18"
|
||||||
width="30" t-att-title="lg.name" />
|
width="18" t-att-title="lg.name" />
|
||||||
</t>
|
</t>
|
||||||
</t>
|
</t>
|
||||||
<span class="caret"></span>
|
<span class="caret"></span>
|
||||||
@ -343,9 +345,9 @@
|
|||||||
<a
|
<a
|
||||||
t-att-href="url_for(request.httprequest.path + '?' + keep_query(), lang=lg.code)"
|
t-att-href="url_for(request.httprequest.path + '?' + keep_query(), lang=lg.code)"
|
||||||
t-att-data-default-lang="(editable or translatable) and 'true' if website and lg.code == website.default_lang_code else None"
|
t-att-data-default-lang="(editable or translatable) and 'true' if website and lg.code == website.default_lang_code else None"
|
||||||
t-att-data-lang="lg.code" t-att-data-lang_dir="lg.direction" class="js_change_lang">
|
t-att-data-lang="lg.code" t-att-data-lang-dir="lg.direction" class="js_change_lang">
|
||||||
<img t-att-src="website.image_url(lg, 'lang_flag')" height="30" width="30" t-att-title="lg.code" />
|
<img t-att-src="website.image_url(lg, 'image')" height="18" width="18" t-att-title="lg.code" />
|
||||||
<t t-esc="lg.name.split('/').pop()"/>
|
<t t-esc="lg.name"/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
Reference in New Issue
Block a user