vendor/shopware/storefront/Resources/views/storefront/layout/header/actions/currency-widget.html.twig line 1

Open in your IDE?
  1. {% block layout_header_actions_currency_widget %}
  2.     {% if position is empty %}
  3.         {% set position = 'top-bar' %}
  4.     {% endif %}
  5.     {% if page.header.currencies.count > 1 %}
  6.         <div class="top-bar-nav-item top-bar-currency">
  7.             {% block layout_header_actions_currency_widget_form %}
  8.                 <form method="post"
  9.                       action="{{ path('frontend.checkout.configure') }}"
  10.                       class="currency-form"
  11.                       data-form-auto-submit="true">
  12.                     {% block layout_header_actions_currency_widget_form_csrf %}
  13.                         {{ sw_csrf('frontend.checkout.configure') }}
  14.                     {% endblock %}
  15.                     {% block layout_header_actions_currency_widget_content %}
  16.                         <div class="currencies-menu dropdown">
  17.                             {% block layout_header_actions_currency_widget_dropdown_toggle %}
  18.                                 <button class="btn dropdown-toggle top-bar-nav-btn"
  19.                                         type="button"
  20.                                         id="currenciesDropdown-{{ position }}"
  21.                                         {{ dataBsToggleAttr }}="dropdown"
  22.                                         aria-haspopup="true"
  23.                                         aria-expanded="false">
  24.                                     {% block layout_header_actions_currency_widget_dropdown_toggle_name %}
  25.                                         {{ page.header.activeCurrency.symbol }}
  26.                                         <span class="top-bar-nav-text">{{ page.header.activeCurrency.translated.name }}</span>
  27.                                     {% endblock %}
  28.                                 </button>
  29.                             {% endblock %}
  30.                             {% block layout_header_actions_currency_widget_form_items %}
  31.                                 <div class="top-bar-list dropdown-menu dropdown-menu-right"
  32.                                     aria-labelledby="currenciesDropdown-{{ position }}">
  33.                                     {% for currency in page.header.currencies %}
  34.                                         {% block layout_header_actions_currency_widget_form_items_element %}
  35.                                             <div class="top-bar-list-item dropdown-item{% if currency.id is same as(page.header.activeCurrency.id) %} item-checked{% endif %}"
  36.                                                  title="{{ currency.translated.shortName }}">
  37.                                                 {% block layout_header_actions_currency_widget_form_items_element_label %}
  38.                                                     <label class="top-bar-list-label"
  39.                                                            for="{{ position }}-{{ currency.id }}">
  40.                                                         {% block layout_header_actions_currency_widget_form_items_element_input %}
  41.                                                             <input class="top-bar-list-radio"
  42.                                                                    id="{{ position }}-{{ currency.id }}"
  43.                                                                    value="{{ currency.id }}"
  44.                                                                    name="currencyId"
  45.                                                                    type="radio"
  46.                                                                 {% if currency.id is same as(page.header.activeCurrency.id) %} checked{% endif %}>
  47.                                                             {{ currency.symbol }} {{ currency.translated.shortName }}
  48.                                                         {% endblock %}
  49.                                                     </label>
  50.                                                 {% endblock %}
  51.                                             </div>
  52.                                         {% endblock %}
  53.                                     {% endfor %}
  54.                                 </div>
  55.                             {% endblock %}
  56.                             {% block layout_header_actions_currency_widget_form_redirect %}
  57.                                 <input name="redirectTo"
  58.                                        type="hidden"
  59.                                        value="{{ app.request.get('_route') }}"/>
  60.                                 {% for key, value in app.request.attributes.get('_route_params') %}
  61.                                     <input name="redirectParameters[{{ key }}]"
  62.                                            type="hidden"
  63.                                            value="{{ value }}">
  64.                                 {% endfor %}
  65.                             {% endblock %}
  66.                         </div>
  67.                     {% endblock %}
  68.                 </form>
  69.             {% endblock %}
  70.         </div>
  71.     {% endif %}
  72. {% endblock %}