Commit 84209caaac6da9fcd3162ed53d14d50c0e8faf42

Authored by Paulo Costa
1 parent 12bac7098d
Exists in master

added widgets template

Showing 1 changed file with 15 additions and 0 deletions   Show diff stats
templates/widgets.html.twig
... ... @@ -0,0 +1,15 @@
  1 +
  2 +{% macro language_dropdown(locales,curr_lang) %}
  3 +<li class="dropdown navbar-right">
  4 + <!-- current language is: {{curr_lang}} -->
  5 + <a href="#" class="dropdown-toggle" data-toggle="dropdown">{% trans "Language" %}<b class="caret"></b></a>
  6 + <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownLanguageMenu">
  7 + {% for locale in locales %}
  8 + <li class="{{ curr_lang == locale.label ? 'active' }}" role="presentation" id="menuLang_{{ locale.locale }}">
  9 + <a role="menuitem" href='{{ config.base_path }}/utils/setlang/{{ locale.label }}'>
  10 + <img alt='{{ locale.flag_alt | translate }}' src='{{ config.base_path }}/assets/imgs/flags/{{ locale.label | lower }}.gif'/> {{ locale.language }}</a>
  11 + </li>
  12 + {% endfor %}
  13 + </ul>
  14 +</li>
  15 +{% endmacro %}
... ...