<ul>
    {% for item in items %}
        {% if item.isAllowedToDisplay(app.request, auth_checker) %}
            <li class="{{ item.isActive(request) ? 'active' : '' }}{% if (item.children|length > 0 and item.open) or item.isActive(request) %} open{% endif %}">
                <a {% if item.link != null %}href="{{ item.link }}"{% else %}class="cursor-pointer"{% endif %}
                    {% if item.js != null %}onClick="{{ item.js }}"{% endif %}>

                    {% if item.iconClass is not empty %}
                        <i class="{{ item.iconClass }}"></i>
                    {% endif %}
                    {{ item.title }}
                    {% if item.children|length > 0 %}
                        <button><i class="icon-arrow-down"></i></button>
                    {% endif %}
                </a>
                {% if item.children|length > 0 %}
                    {% include 'VisualMManagementBundle:Menu:list.html.twig' with { 'items': item.children, 'request': request, 'menu_level': menu_level|default(1) + 1 } %}
                {% endif %}
            </li>
        {% endif %}
    {% endfor %}
</ul>
