<nav role="navigation" class="navbar-default navbar-static-side">
    <div class="sidebar-collapse">
        <ul id="side-menu" class="nav metismenu" style="display: block;">
            <li class="nav-header">
                <div class="dropdown profile-element">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <span class="clear">
                            <span class="block m-t-xs">
                                <strong class="font-bold">{{ app.user.firstName }} {{ app.user.lastName }}</strong>
                            </span>
                            <span class="text-muted text-xs block">{{ app.user.username }} <b class="caret"></b></span>
                        </span>
                    </a>
                    <ul class="dropdown-menu animated fadeInRight m-t-xs">
                        <li><a href="{{ path("backend_base_backend_siteuser_profile", {slug: app.session.get('Site').slug}) }}">{{ 'message.profile'|trans({}, 'forms') }}</a></li>
                        <li class="divider"></li>
                        <li><a href="{{ path('@BackendLogout', {slug: app.session.get('Site').slug}) }}">{{ 'message.logout'|trans({}, 'forms') }}</a></li>
                    </ul>
                </div>
                <div class="logo-element">
                    {{ app.request.attributes.get('slug')|upper|first }}
                </div>
            </li>
            {% for name, entry in menuConfig %}
                <li{% if entry.active|default %} class="active"{% endif %}>
                    {% if entry.target is iterable %}
                    <a href="#">
                        <i class="{{ entry.class }}"></i>
                        <span class="nav-label">{{ name|trans({}, 'forms') }}</span>
                        <span class="fa arrow"></span>
                    </a>
                    <ul class="nav nav-second-level collapse">
                        {% for subname, subentry in entry.target %}
                            <li{% if subentry.active|default %} class="active"{% endif %}><a href="{{ subentry.target }}"><i class="{{ subentry.class }}"></i>{{ subname|trans({}, 'forms') }}</a></li>
                        {% endfor %}
                    </ul>
                    {% else %}
                        <a href="{{ entry.target }}">
                            <i class="{{ entry.class }}"></i>
                            <span class="nav-label">{{ name|trans({}, 'forms') }}</span>
                        </a>
                    {% endif %}
                </li>
            {% endfor %}
        </ul>
    </div>
</nav>