Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit a369c612 authored by Gilmar Lima's avatar Gilmar Lima
Browse files

OEL-1167: Move template to avoid dependency on oe_whitelabel_multilingual on block theming.

parent d2d45369
No related branches found
No related tags found
2 merge requests!102Merge 1.x into EPIC-OEL-1255-migrate-paragraphs.,!94OEL-1167: Theme the content language switcher
{% spaceless %} {% apply spaceless %}
{# This template uses the BCL composition for
{# Parameters: language switcher with following components:
- id (string) (default: collapse-{random number 0-1000}) - collapse custom id - optional - bcl-alert
- message (alert object) (default: {}) - bcl-button
- expandable (button object) (default: []) - bcl-link
- language (array of link object) (default: [])
#} #}
{% set _id = "dropdown-languages" %}
{% set id = "dropdown-languages" %} {% set _message = {
{% set message = { message: "This page is not available in @language."|t({'@language': unavailable_language}),
message: "This page is not available in %s."|format(unavailable_language)|t,
icon_path: "/icons.svg", icon_path: "/icons.svg",
variant: "warning", variant: "warning",
}%} }%}
{% set expandable = { {% set _expandable = {
label: "Choose another language"|t, label: "Choose another language"|t,
icon: { icon: {
name: "caret-down-fill", name: "caret-down-fill",
path: "/icons.svg", path: bcl_icon_path,
}, },
outline: "true", outline: "true",
} %} } %}
{% set _id = id|default('collapse-' ~ random(1000)) %}
{% set _message = message|default({}) %}
{% set _expandable = expandable|default({}) %}
{% set _languages = languages|default([]) %} {% set _languages = languages|default([]) %}
{% set _expandable_attributes = _expandable.attributes ?: create_attribute() %} {% set _expandable_attributes = _expandable.attributes ?: create_attribute() %}
{% set _expandable_attributes = _expandable_attributes {% set _expandable_attributes = _expandable_attributes
...@@ -54,4 +49,4 @@ ...@@ -54,4 +49,4 @@
</div> </div>
</div> </div>
</div> </div>
{% endspaceless %} {% endapply %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment