custom/plugins/ProcHideUnneededElements/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 layout_header_actions_account_widget_dropdown_links %}
  3.     {% set headerWidget = true %}
  4.     {% if not b2bSuite %}
  5.         {{ parent() }}
  6.     {% else %}
  7.         <div class="account-menu-links">
  8.             <div class="{% if not headerWidget %}account-aside{% else %}header-account-menu{% endif %}">
  9.                 <div class="card account-menu-inner">
  10.                     {% if (context.currentCustomerGroup.id != config('ProclaneWegmannThemeExtend.config.hideMenuForCustomerGroup')) %}
  11.                         {% block page_account_sidebar_header %}
  12.                             {% if not headerWidget %}
  13.                                 <div class="card-header account-aside-header">
  14.                                     {{ "account.greetings"|trans|sw_sanitize }}
  15.                                     {{ context.customer.title }}
  16.                                     {{ context.customer.firstName }}
  17.                                     {{ context.customer.lastName }}
  18.                                 </div>
  19.                             {% endif %}
  20.                         {% endblock %}
  21.                         {% block page_account_sidebar_menu %}
  22.                             {% if not context.customer.guest %}
  23.                                 <div class="list-group list-group-flush account-aside-list-group">
  24.                                     {% block page_account_sidebar_menu_inner %}
  25.                                         {% if isSalesRep %}
  26.                                             {% set links = [{
  27.                                                 name: "ClientOverview",
  28.                                                 route: "b2bsalesrepresentative"
  29.                                             }, {
  30.                                                 name: "MyAccount",
  31.                                                 route: "b2baccount"
  32.                                             }]
  33.                                             %}
  34.                                         {% else %}
  35.                                             {% set links = [{
  36.                                                 name: "Dashboard",
  37.                                                 route: "b2bdashboard"
  38.                                             }, {
  39.                                                 name: "Company",
  40.                                                 route: "b2bcompany"
  41.                                             }, {
  42.                                                 name: "Statistic",
  43.                                                 route: "b2bstatistic"
  44.                                             }, {
  45.                                                 name: "Orders",
  46.                                                 route: "b2border"
  47.                                             }, {
  48.                                                 name: "OrderList",
  49.                                                 route: "b2borderlist"
  50.                                             }, {
  51.                                                 name: "FastOrder",
  52.                                                 route: "b2bfastorder"
  53.                                             }, {
  54.                                                 name: "Offer",
  55.                                                 route: "b2boffer",
  56.                                             }, {
  57.                                                 name: "OrderNumber",
  58.                                                 route: "b2bordernumber"
  59.                                             }, {
  60.                                                 name: "MyAccount",
  61.                                                 route: "b2baccount"
  62.                                             }]
  63.                                             %}
  64.                                         {% endif %}
  65.                                         {% for link in links %}
  66.                                             {% if b2b_acl_check(link.route, 'index') and not link.disabled %}
  67.                                                 {% if (not ((link.route == 'b2bordernumber') and (config("ProcHideUnneededElements.config.hideCustomerOrdernumber") == true))) and
  68.                                                     (not ((link.route == 'b2boffer') and (config("ProcHideUnneededElements.config.hideOfferInCheckout") == true))) and
  69.                                                     (not ((link.route == 'b2bstatistic') and (config("ProcHideUnneededElements.config.hideStatistic") == true))) %}
  70.                                                     {% set link = {
  71.                                                         route: (link.route starts with('frontend.')) ? link.route : 'frontend.b2b.' ~ link.route ~ '.index',
  72.                                                         name: ('.' in link.name) ? link.name : 'b2b.' ~ link.name,
  73.                                                         component: link.route
  74.                                                     }
  75.                                                     %}
  76.                                                     <a
  77.                                                             href="{{ path(link.route) }}"
  78.                                                             title="{{ link.name|trans }}"
  79.                                                             class="list-group-item list-group-item-action account-aside-item{% if activeRoute is same as(link.route) %} is-active{% endif %} {{ b2b_acl(link.component, 'index') }}"
  80.                                                     >
  81.                                                         {{ link.name|trans }}
  82.                                                     </a>
  83.                                                 {% endif %}
  84.                                             {% endif %}
  85.                                         {% endfor %}
  86.                                     {% endblock %}
  87.                                 </div>
  88.                             {% endif %}
  89.                         {% endblock %}
  90.                     {% endif %}
  91.                     
  92.                     {% if (context.currentCustomerGroup.id == config('ProclaneWegmannThemeExtend.config.hideMenuForCustomerGroup')) %}
  93.                         {% set categoryId = config("ProclaneWegmannThemeExtend.config.redirectCustomerToCategory") %}
  94.                         {% set categoryName = "account.menu.redirectCustomerToCategorySnippet"|trans %}
  95.                         <a
  96.                             href="{{ seoUrl('frontend.navigation.page', { navigationId: categoryId }) }}"
  97.                             title= {{categoryName}}
  98.                             class="list-group-item list-group-item-action account-aside-item{% if page.navigationId is same as(categoryId) %} is-active{% endif %}"
  99.                         >
  100.                             {{categoryName}}
  101.                         </a>
  102.                     {% endif %}
  103.                     
  104.                     {% block page_account_sidebar_footer %}
  105.                         {% if context.customer %}
  106.                             {% if not context.customer.guest %}
  107.                                 <div class="card-footer account-aside-footer">
  108.                                     {% block page_account_sidebar_logout %}
  109.                                         <a href="{{ path('frontend.account.logout.page') }}"
  110.                                            class="btn btn-link account-aside-btn">
  111.                                             {% sw_icon 'log-out' %}
  112.                                             {{ "account.logout"|trans|sw_sanitize }}
  113.                                         </a>
  114.                                     {% endblock %}
  115.                                 </div>
  116.                             {% else %}
  117.                                 <div class="card-footer account-aside-footer account-guest-abort">
  118.                                     {% block page_account_sidebar_guest_abort %}
  119.                                         <a href="{{ path('frontend.account.logout.page') }}"
  120.                                            data-account-guest-abort-button="true"
  121.                                            class="btn btn-link account-aside-btn">
  122.                                             {% sw_icon 'log-out' %}
  123.                                             {{ "account.guestAbort"|trans|sw_sanitize }}
  124.                                         </a>
  125.                                     {% endblock %}
  126.                                 </div>
  127.                             {% endif %}
  128.                         {% endif %}
  129.                     {% endblock %}
  130.                 </div>
  131.             </div>
  132.         </div>
  133.     {% endif %}
  134. {% endblock %}