themes/webapicTheme/templates/bundles/SyliusUiBundle/Menu/simple.html.twig line 1

Open in your IDE?
  1. {% extends 'knp_menu.html.twig' %}
  2. {% block root %}
  3.     <div class="pageuser-content-links">
  4.         {# <div class="header item">{{ item.label|trans }} </div> #}
  5.         {{ block('list') }}
  6.     </div>
  7.      <div class="pageuser-content-sousmenu">
  8.         {# <div class="header item">{{ item.label|trans }} </div> #}
  9.         {{ block('sousmenu') }}
  10.     </div>
  11. {% endblock %}
  12. {% block list %}
  13.     {% for item in item.children %}
  14.         {% if item.name == "order_history" or item.name == "dashboard" %}
  15.             {{ block('item') }}
  16.         {# {{ dump(item) }} #}
  17.         {% endif %}
  18.     {% endfor %}
  19. {% endblock %}
  20. {% block item %}
  21.     <a class="item" href="{{ item.uri }}">
  22.         {{ block('icon') }}
  23.         {{ item.label|trans }}
  24.     </a>
  25. {% endblock %}
  26. {% block icon %}
  27.     {% set icon = item.labelAttribute('icon') %}
  28.     {% if icon %}
  29.         {# <i class="icon {{ icon }}"></i> #}
  30.         
  31.         {% if icon == "cart" %}
  32.             <img src="{{ asset('webapic-theme/images/dashboard-icon-panier.svg') }}" class="ui image" />
  33.         {% elseif icon == "home" %}
  34.             <img src="{{ asset('webapic-theme/images/dashboard-icon-user.svg') }}" class="ui image" />
  35.         {% endif %}
  36.     {% endif %}
  37. {% endblock %}
  38. {% block sousmenu %}
  39.     <ul>
  40.         <li>
  41.             <a href="{{ path('sylius_shop_account_profile_update') }}" title="">Mon profil</a>
  42.         </li>
  43.         <li>
  44.             <a href="{{ path('sylius_shop_account_address_book_index') }}" title="">Adresses</a>
  45.         </li>
  46.          
  47.         <li>
  48.             <a href="{{ path('app_wishlist_index') }}" title="">Mes produits préférés</a>
  49.         </li>
  50.          <li>
  51.             <a href="{{ path('app_newsletter') }}" title="Newsletter">Newsletter</a>
  52.         </li>
  53.          {# <li>
  54.             <a href="#" title="">Service client</a>
  55.         </li> #}
  56.         <li>
  57.             <a href="{{ path('app_mesquestions') }}" title="Vos questions">Vos questions</a>
  58.         </li>
  59.          <li>
  60.             <a href="{{ path('sylius_shop_account_change_password') }}" title="Vos questions">Mot de passe</a>
  61.         </li>
  62.         {% if is_mobile() %} 
  63.             <li>
  64.                 {# <a href="{{ path('app_maboutique') }}" title="">
  65.                     Ma boutique 
  66.                     {% if app.user.customer.favoriteShop %} 
  67.                         <span>{{ app.user.customer.favoriteShop.name }}</span>
  68.                     {% endif %}
  69.                 </a> #}
  70.                 {% if app.user.customer.isShop == 1 %} 
  71.                     <a href="{{ path('app_maboutique') }}">
  72.                         <img src="{{ asset('webapic-theme/images/picto-account-store.svg') }}" class="ui image" />                   
  73.                         <div>
  74.                             Gérer ma boutique
  75.                         </div>                   
  76.                     </a>
  77.                 {% else %} 
  78.                     <a href="{{ path('app_maboutique') }}">
  79.                         <img src="{{ asset('webapic-theme/images/picto-account-store.svg') }}" class="ui image" />                   
  80.                         <div>
  81.                             Ma boutique
  82.                                 {% if app.user.customer.favoriteShop %} 
  83.                                 {# <span>{{ app_user_boutique() }}</span> #}
  84.                                 <span>{{ app.user.customer.favoriteShop.name }}</span>
  85.                                 {% endif %}
  86.                         </div>                   
  87.                     </a>            
  88.                 {% endif %}
  89.             </li>
  90.         {% endif %}
  91.     </ul>
  92.      {% if is_mobile() %} 
  93.      {% else %} 
  94.         <ul class="boutique">
  95.             <li>
  96.                 {% if app.user.customer.isShop == 1 %} 
  97.                     <a href="{{ path('app_maboutique') }}">
  98.                         <img src="{{ asset('webapic-theme/images/picto-account-store.svg') }}" class="ui image" />                   
  99.                         <div>
  100.                             Gérer ma boutique
  101.                         </div>                   
  102.                     </a>
  103.                 {% else %} 
  104.                     <a href="{{ path('app_maboutique') }}">
  105.                         <img src="{{ asset('webapic-theme/images/picto-account-store.svg') }}" class="ui image" />                   
  106.                         <div>
  107.                             Ma boutique
  108.                                 {% if app.user.customer.favoriteShop %} 
  109.                                 {# <span>{{ app_user_boutique() }}</span> #}
  110.                                 <span>{{ app.user.customer.favoriteShop.name }}</span>
  111.                                 {% endif %}
  112.                         </div>                   
  113.                     </a>            
  114.                 {% endif %}
  115.                 
  116.             </li>
  117.         </ul>
  118.      {% endif %}
  119. {% endblock %}