{% extends 'knp_menu.html.twig' %}
{% block root %}
<div class="pageuser-content-links">
{# <div class="header item">{{ item.label|trans }} </div> #}
{{ block('list') }}
</div>
<div class="pageuser-content-sousmenu">
{# <div class="header item">{{ item.label|trans }} </div> #}
{{ block('sousmenu') }}
</div>
{% endblock %}
{% block list %}
{% for item in item.children %}
{% if item.name == "order_history" or item.name == "dashboard" %}
{{ block('item') }}
{# {{ dump(item) }} #}
{% endif %}
{% endfor %}
{% endblock %}
{% block item %}
<a class="item" href="{{ item.uri }}">
{{ block('icon') }}
{{ item.label|trans }}
</a>
{% endblock %}
{% block icon %}
{% set icon = item.labelAttribute('icon') %}
{% if icon %}
{# <i class="icon {{ icon }}"></i> #}
{% if icon == "cart" %}
<img src="{{ asset('webapic-theme/images/dashboard-icon-panier.svg') }}" class="ui image" />
{% elseif icon == "home" %}
<img src="{{ asset('webapic-theme/images/dashboard-icon-user.svg') }}" class="ui image" />
{% endif %}
{% endif %}
{% endblock %}
{% block sousmenu %}
<ul>
<li>
<a href="{{ path('sylius_shop_account_profile_update') }}" title="">Mon profil</a>
</li>
<li>
<a href="{{ path('sylius_shop_account_address_book_index') }}" title="">Adresses</a>
</li>
<li>
<a href="{{ path('app_wishlist_index') }}" title="">Mes produits préférés</a>
</li>
<li>
<a href="{{ path('app_newsletter') }}" title="Newsletter">Newsletter</a>
</li>
{# <li>
<a href="#" title="">Service client</a>
</li> #}
<li>
<a href="{{ path('app_mesquestions') }}" title="Vos questions">Vos questions</a>
</li>
<li>
<a href="{{ path('sylius_shop_account_change_password') }}" title="Vos questions">Mot de passe</a>
</li>
{% if is_mobile() %}
<li>
{# <a href="{{ path('app_maboutique') }}" title="">
Ma boutique
{% if app.user.customer.favoriteShop %}
<span>{{ app.user.customer.favoriteShop.name }}</span>
{% endif %}
</a> #}
{% if app.user.customer.isShop == 1 %}
<a href="{{ path('app_maboutique') }}">
<img src="{{ asset('webapic-theme/images/picto-account-store.svg') }}" class="ui image" />
<div>
Gérer ma boutique
</div>
</a>
{% else %}
<a href="{{ path('app_maboutique') }}">
<img src="{{ asset('webapic-theme/images/picto-account-store.svg') }}" class="ui image" />
<div>
Ma boutique
{% if app.user.customer.favoriteShop %}
{# <span>{{ app_user_boutique() }}</span> #}
<span>{{ app.user.customer.favoriteShop.name }}</span>
{% endif %}
</div>
</a>
{% endif %}
</li>
{% endif %}
</ul>
{% if is_mobile() %}
{% else %}
<ul class="boutique">
<li>
{% if app.user.customer.isShop == 1 %}
<a href="{{ path('app_maboutique') }}">
<img src="{{ asset('webapic-theme/images/picto-account-store.svg') }}" class="ui image" />
<div>
Gérer ma boutique
</div>
</a>
{% else %}
<a href="{{ path('app_maboutique') }}">
<img src="{{ asset('webapic-theme/images/picto-account-store.svg') }}" class="ui image" />
<div>
Ma boutique
{% if app.user.customer.favoriteShop %}
{# <span>{{ app_user_boutique() }}</span> #}
<span>{{ app.user.customer.favoriteShop.name }}</span>
{% endif %}
</div>
</a>
{% endif %}
</li>
</ul>
{% endif %}
{% endblock %}