{% extends "@!SonataAdmin/Menu/sonata_menu.html.twig" %}
{% block linkElement %}
{% apply spaceless %}
{%- set translation_domain = item.extra('label_catalogue', 'messages') -%}
{%- if item.extra('on_top') is defined and not item.extra('on_top') -%}
{%- set icon = item.extra('icon')|default(item.level > 1 ? 'fa fa-angle-double-right' : '')|parse_icon -%}
{%- else -%}
{%- set icon = item.extra('icon')|trans({}, 'SonataAdminBundle') -%}
{%- endif -%}
{%- set is_link = true -%}
{% import "knp_menu.html.twig" as macros %}
<a href="{{ item.uri }}"{{ macros.attributes(item.linkAttributes) }}>
{{ block('label') }}
{% if item.name == 'menu.admin.dashboard.user' %}
{{ app.user.username }}
{% endif %}
</a>
{% endapply %}
{% endblock %}