-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use plone 6 icon resolver
- Loading branch information
Showing
1 changed file
with
24 additions
and
22 deletions.
There are no files selected for viewing
46 changes: 24 additions & 22 deletions
46
src/plone/app/multilingual/browser/templates/languageselector.pt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,34 @@ | ||
<tal:language tal:condition="view/available"> | ||
<ul id="portal-languageselector" | ||
tal:define="showFlags view/showFlags; | ||
<ul | ||
id="portal-languageselector" | ||
tal:define="showFlags view/showFlags; | ||
languages view/languages; | ||
portal_url view/portal_url;"> | ||
portal_url view/portal_url; | ||
icons python:context.restrictedTraverse('@@iconresolver');"> | ||
<tal:language repeat="lang languages"> | ||
<li tal:define="code lang/code; | ||
<li | ||
tal:define="code lang/code; | ||
selected lang/selected; | ||
codeclass string:language-${code}; | ||
current python: selected and 'currentLanguage ' or '';" | ||
tal:attributes="class string:${current}${codeclass}"> | ||
<a href="" | ||
tal:define="flag lang/flag|nothing; | ||
tal:attributes="class string:${current}${codeclass}"> | ||
<a | ||
href="" | ||
tal:define="flag lang/flag|nothing; | ||
name lang/native|lang/name; | ||
showflag python:showFlags and flag;" | ||
tal:attributes="href lang/url; | ||
title name" | ||
><tal:flag condition="showflag"> | ||
<img width="14" | ||
height="11" | ||
alt="" | ||
tal:attributes="src string:${portal_url}${flag}; | ||
alt name; | ||
title name;" /> | ||
</tal:flag | ||
><tal:nonflag condition="not: showflag" | ||
replace="name">language name</tal:nonflag | ||
></a> | ||
</li> | ||
tal:attributes="href lang/url; | ||
title name"> | ||
<tal:flag condition="showflag"> | ||
<tal:flag condition="showflag"> | ||
<img tal:replace="structure python:icons.tag(flag, tag_class='plone-icon-flag')" /> | ||
</tal:flag> | ||
</tal:flag> | ||
<tal:nonflag | ||
condition="not: showflag" | ||
replace="name">language name</tal:nonflag> | ||
</a> | ||
</li> | ||
</tal:language> | ||
</ul> | ||
</ul> | ||
</tal:language> |