{% extends 'knp_menu.html.twig' %}

{% block root %}
    <div class="ui fluid vertical menu list-group" role="listitem">
        <div class="header item list-group-item disabled" aria-disabled="true">{{ item.label|trans }}</div>
        {{ block('list') }}
    </div>
{% endblock %}

{% block list %}
    {% for item in item.children %}
        {{ block('item') }}
    {% endfor %}
{% endblock %}

{% block item %}
    <a class="item list-group-item list-group-item-action" href="{{ item.uri }}">
        {{ block('icon') }}
        {{ item.label|trans }}
    </a>
{% endblock %}

{% block icon %}
    {% set icon = item.labelAttribute('icon') %}
    {% if icon %}<i class="icon {{ icon }}"></i>&nbsp;{% endif %}
{% endblock %}
