custom/plugins/ProcHideUnneededElements/src/Resources/views/storefront/page/account/sidebar.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/page/account/sidebar.html.twig' %}
  2. {% block page_account_sidebar_menu_inner %}
  3.     {% if not b2bSuite %}
  4.         {% if context.customer and (context.currentCustomerGroup.id != config('ProclaneWegmannThemeExtend.config.hideMenuForCustomerGroup')) %}
  5.             {% block page_account_sidebar_link_home %}
  6.                 <a href="{{ path('frontend.account.home.page') }}"
  7.                    title="{{ "account.overviewLink"|trans|striptags }}"
  8.                    class="list-group-item list-group-item-action account-aside-item{% if activeRoute is same as('frontend.account.home.page') %} is-active{% endif %}">
  9.                     {{ "account.overviewLink"|trans|sw_sanitize }}
  10.                 </a>
  11.             {% endblock %}
  12.             {% block page_account_sidebar_link_profile %}
  13.                 <a href="{{ path('frontend.account.profile.page') }}"
  14.                    title="{{ "account.profileLink"|trans|striptags }}"
  15.                    class="list-group-item list-group-item-action account-aside-item{% if activeRoute is same as('frontend.account.profile.page') %} is-active{% endif %}">
  16.                     {{ "account.profileLink"|trans|sw_sanitize }}
  17.                 </a>
  18.             {% endblock %}
  19.             {% block page_account_sidebar_link_address %}
  20.                 <a href="{{ path('frontend.account.address.page') }}"
  21.                    title="{{ "account.addressLink"|trans|striptags }}"
  22.                    class="list-group-item list-group-item-action account-aside-item{% if activeRoute is same as('frontend.account.address.page') %} is-active{% endif %}">
  23.                     {{ "account.addressLink"|trans|sw_sanitize }}
  24.                 </a>
  25.             {% endblock %}
  26.             {% if config("ProcHideUnneededElements.config.hidePaymentSelection") == false %}
  27.                 {% block page_account_sidebar_link_payment %}
  28.                     <a href="{{ path('frontend.account.payment.page') }}"
  29.                        title="{{ "account.paymentLink"|trans|striptags }}"
  30.                        class="list-group-item list-group-item-action account-aside-item{% if activeRoute is same as('frontend.account.payment.page') %} is-active{% endif %}">
  31.                         {{ "account.paymentLink"|trans|sw_sanitize }}
  32.                     </a>
  33.                 {% endblock %}
  34.             {% endif %}
  35.             {% block page_account_sidebar_link_orders %}
  36.                 <a href="{{ path('frontend.account.order.page') }}"
  37.                    title="{{ "account.ordersLink"|trans|striptags }}"
  38.                    class="list-group-item list-group-item-action account-aside-item{% if activeRoute is same as('frontend.account.order.page') %} is-active{% endif %}">
  39.                     {{ "account.ordersLink"|trans|sw_sanitize }}
  40.                 </a>
  41.             {% endblock %}
  42.         {% endif %}
  43.         {% if (context.currentCustomerGroup.id == config('ProclaneWegmannThemeExtend.config.hideMenuForCustomerGroup')) %}
  44.             {% set categoryId = config("ProclaneWegmannThemeExtend.config.redirectCustomerToCategory") %}
  45.             {% set categoryName = "account.menu.redirectCustomerToCategorySnippet"|trans %}
  46.             <a
  47.                 href="{{ seoUrl('frontend.navigation.page', { navigationId: categoryId }) }}"
  48.                 title= {{categoryName}}
  49.                 class="list-group-item list-group-item-action account-aside-item{% if page.navigationId is same as(categoryId) %} is-active{% endif %}"
  50.             >
  51.                 {{categoryName}}
  52.             </a>
  53.         {% endif %}
  54.     {% else %}
  55.         {% if isSalesRep %}
  56.             {% set links = [{
  57.                     name: "ClientOverview",
  58.                     route: "b2bsalesrepresentative"
  59.                 }, {
  60.                     name: "MyAccount",
  61.                     route: "b2baccount"
  62.                 }]
  63.             %}
  64.         {% else %}
  65.             {% set links = [{
  66.                     name: "Dashboard",
  67.                     route: "b2bdashboard"
  68.                 }, {
  69.                     name: "Company",
  70.                     route: "b2bcompany"
  71.                 }, {
  72.                     name: "Statistic",
  73.                     route: "b2bstatistic"
  74.                 }, {
  75.                     name: "Orders",
  76.                     route: "b2border"
  77.                 }, {
  78.                     name: "OrderList",
  79.                     route: "b2borderlist"
  80.                 }, {
  81.                     name: "FastOrder",
  82.                     route: "b2bfastorder"
  83.                 }, {
  84.                     name: "Offer",
  85.                     route: "b2boffer",
  86.                 }, {
  87.                     name: "OrderNumber",
  88.                     route: "b2bordernumber"
  89.                 }, {
  90.                     name: "MyAccount",
  91.                     route: "b2baccount"
  92.                 }]
  93.             %}
  94.         {% endif %}
  95.         {% for link in links %}
  96.             {% if b2b_acl_check(link.route, 'index') and not link.disabled %}
  97.                 {% if (not ((link.route == 'b2bordernumber') and (config("ProcHideUnneededElements.config.hideCustomerOrdernumber") == true))) and
  98.                       (not ((link.route == 'b2boffer') and (config("ProcHideUnneededElements.config.hideOfferInCheckout") == true))) %}
  99.                     {% set link = {
  100.                             route: (link.route starts with('frontend.')) ? link.route : 'frontend.b2b.' ~ link.route ~ '.index',
  101.                             name: ('.' in link.name) ? link.name : 'b2b.' ~ link.name,
  102.                             component: link.route
  103.                         }
  104.                     %}
  105.                     <a
  106.                         href="{{ path(link.route) }}"
  107.                         title="{{ link.name|trans }}"
  108.                         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') }}"
  109.                     >
  110.                         {{ link.name|trans }}
  111.                     </a>
  112.                 {% endif %}
  113.             {% endif %}
  114.         {% endfor %}
  115.     {% endif %}
  116. {% endblock %}