custom/plugins/b2bsellerscore/src/Resources/views/storefront/layout/header/account-menu.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/layout/header/account-menu.html.twig' %}
  2. {% block utilities_offcanvas_content %}
  3.     {% if employee and not isSalesRepresentative %}
  4.         <div class="customer-employee-menu">
  5.             {%  block b2b_employee_menu %}
  6.                 <div class="employee-information">
  7.                     {%  block b2b_employee_menu_information %}
  8.                         {%  block b2b_employee_menu_profile_header %}
  9.                             <div class="account-menu-header">
  10.                                 {{ "account.profileLabel"|trans|sw_sanitize }}
  11.                             </div>
  12.                         {% endblock %}
  13.                         {%  block b2b_employee_menu_profile_content %}
  14.                             <div class="employee-information-inner">
  15.                                 {%  block b2b_employee_menu_profile_list %}
  16.                                     <ul class="list-unstyled">
  17.                                         {%  block b2b_employee_menu_profile_list_name %}
  18.                                             <li>
  19.                                                 <strong>{{ employee.title }} {{ employee.firstName }} {{ employee.lastName }}</strong>
  20.                                             </li>
  21.                                         {% endblock %}
  22.                                         {%  block b2b_employee_menu_profile_list_email %}
  23.                                             <li><a href="mailto:{{ employee.email }}">{{ employee.email }}</a></li>
  24.                                         {% endblock %}
  25.                                     </ul>
  26.                                 {% endblock %}
  27.                             </div>
  28.                         {% endblock %}
  29.                         {%  block b2b_employee_menu_company_header %}
  30.                             <div class="account-menu-header">
  31.                                 {{ "account.companyLabel"|trans|sw_sanitize }}
  32.                             </div>
  33.                         {% endblock %}
  34.                         {% block b2b_employee_menu_company_content %}
  35.                             <div class="employee-information-inner">
  36.                                 <ul class="list-unstyled">
  37.                                     {%  block b2b_employee_menu_profile_list_company %}
  38.                                         <li>{{ context.customer.extensions.displayName.longName }}</li>
  39.                                     {% endblock %}
  40.                                     {%  block b2b_employee_menu_profile_list_customer_number %}
  41.                                         <li>
  42.                                             {{ "account.customerNumber"|trans|sw_sanitize }}  {{ context.customer.customerNumber }}
  43.                                         </li>
  44.                                     {% endblock %}
  45.                                 </ul>
  46.                                 {% block b2b_employee_menu_company_form %}
  47.                                     <form name="customer_selection"
  48.                                           id="customer_selection"
  49.                                           method="post" action="{{ path('frontend.b2b_change_customer') }}"
  50.                                           data-customer-selection-redirect-updater="true">
  51.                                         {% block b2b_employee_menu_company_form_csrf %}
  52.                                             {{ sw_csrf('frontend.b2b_change_customer') }}
  53.                                         {% endblock %}
  54.                                         {% block b2b_employee_menu_company_form_redirect %}
  55.                                             <div class="customer-selection-redirect-container">
  56.                                                 <input name="redirectTo"
  57.                                                        type="hidden"
  58.                                                        value="{{ app.request.get('_route') }}"/>
  59.                                                 {% for key, value in app.request.attributes.get('_route_params')  %}
  60.                                                     <input name="redirectParameters[{{ key }}]"
  61.                                                            type="hidden"
  62.                                                            value="{{ value }}">
  63.                                                 {% endfor %}
  64.                                             </div>
  65.                                         {% endblock %}
  66.                                         {% block b2b_employee_menu_company_form_select %}
  67.                                             <select class="custom-select custom-select-sm" name="customer_id" onchange="this.form.submit()">
  68.                                                 {% for entry in employee.customers %}
  69.                                                     {% if entry.active and (entry.admin or entry.roleId) %}
  70.                                                         {% if entry.customer.id == context.customer.id %}
  71.                                                                 <option value="{{ entry.customer.id }}" selected>{{ entry.customer.customerNumber }}
  72.                                                                 - {{ entry.customer.extensions.displayName.longName }}</option>
  73.                                                         {% else %}
  74.                                                                 <option value="{{ entry.customer.id }}">{{ entry.customer.customerNumber }} - {{ entry.customer.extensions.displayName.longName }}</option>
  75.                                                         {% endif %}
  76.                                                     {% endif %}
  77.                                                 {% endfor %}
  78.                                             </select>
  79.                                         {% endblock %}
  80.                                     </form>
  81.                                 {% endblock %}
  82.                             </div>
  83.                         {% endblock %}
  84.                         {%  block b2b_employee_menu_contact_header %}
  85.                             <div class="account-menu-header">
  86.                                 {{ "account.personalContactLabel"|trans|sw_sanitize }}
  87.                             </div>
  88.                         {% endblock %}
  89.                         {%  block b2b_employee_menu_contact_content %}
  90.                             {% if contactPerson is defined %}
  91.                                 {% sw_include '@B2bSellersCore/storefront/layout/header/contact-slider.html.twig' %}
  92.                             {% endif %}
  93.                         {% endblock %}
  94.                     {% endblock %}
  95.                 </div>
  96.             {% endblock %}
  97.             {{ parent() }}
  98.         </div>
  99.     {% elseif isSalesRepresentative and not loggedInAsCustomer %}
  100.         {% block sales_representative_information %}
  101.             <h6>{{ "account.profileLabel"|trans|sw_sanitize }}</h6>
  102.             <div>{{ context.customer.firstName }} {{ context.customer.lastName }}</div>
  103.             <div class="mb-2">{{ context.customer.email }}</div>
  104.         {% endblock %}
  105.         {{ parent() }}
  106.     {% else %}
  107.         {{ parent() }}
  108.     {% endif %}
  109. {% endblock %}
  110. {% block layout_header_actions_account_widget_dropdown_login %}
  111.     {% if not context.customer %}
  112.         <div class="account-menu-login">
  113.             <a  {% if b2bPlatformConfig.closedShop %}
  114.                     href="{{ seoUrl(b2bPlatformConfig.closedShopRedirectTarget) }}"
  115.                 {% else %}
  116.                     href="{{ seoUrl('frontend.account.login') }}"
  117.                 {% endif %}
  118.                title="{{ "account.loginSubmit"|trans|striptags }}"
  119.                class="btn btn-primary account-menu-login-button">
  120.                 {{ "account.loginSubmit"|trans|sw_sanitize }}
  121.             </a>
  122.             <div class="account-menu-register">
  123.                 {{ "account.orRegister"|trans|sw_sanitize }}
  124.                 <a {% if b2bPlatformConfig.closedShop %}
  125.                     href="{{ seoUrl('frontend.b2b_account.registration.page') }}"
  126.                 {% else %}
  127.                     href="{{ seoUrl('frontend.account.login') }}"
  128.                 {% endif %}
  129.                     title="{{ "account.orRegisterLink"|trans|striptags }}">
  130.                     {{ "account.orRegisterLink"|trans|striptags }}
  131.                 </a>
  132.             </div>
  133.         </div>
  134.     {% endif %}
  135. {% endblock %}