<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
  <!-- sidebar: style can be found in sidebar.less -->
  <section class="sidebar">
    <!-- Sidebar user panel -->
    <div class="user-panel">
      <div class="pull-left imagesidebar">
        <img src="{{ image }}" class="img-circle" alt="{{ firstname }} {{ lastname }}" title="{{ username }}" id="user-profile">
      </div>
      <div class="pull-left info">
        <p><a href="{{ profile }}">{{ firstname }} {{ lastname }}</a></p>
        <p><a href="{{ profile }}"><small>{{ username }}</small></a></p>
      </div>
    </div>
    <!-- sidebar menu: : style can be found in sidebar.less -->
    <ul id="menu" class="sidebar-menu" data-widget="tree">
      <li class="header">{{ text_navigation }}</li>
      {% set i = 0 %}
      {% for menu in menus %}
      <li id="{{ menu.id }}"{% if menu.children %} class="treeview"{% endif %}>
        <a href="{% if menu.href %}{{ menu.href }}{% else %}#{% endif %}">
          <i class="fa {{ menu.icon }}"></i> <span>{{ menu.name }}</span>
          {% if menu.children %}
          <span class="pull-right-container">
            <i class="fa fa-angle-left pull-right"></i>
          </span>
          {% endif %}
        </a>
        {% if menu.children %}
        <ul class="treeview-menu">
          {% for children_1 in menu.children %}
            <li{% if children_1.children %} class="treeview"{% endif %}>
              <a href="{% if children_1.href %}{{ children_1.href }}{% else %}#{% endif %}">
                <i class="fa fa-circle-o"></i> <span>{{ children_1.name }}</span>
                {% if children_1.children %}
                <span class="pull-right-container">
                  <i class="fa fa-angle-left pull-right"></i>
                </span>
                {% endif %}
              </a>
              {% if children_1.children %}
              <ul class="treeview-menu">
                {% for children_2 in children_1.children %}
                <li{% if children_2.children %} class="treeview"{% endif %}>
                  <a href="{% if children_2.href %}{{ children_2.href }}{% else %}#{% endif %}">
                    <i class="fa fa-circle-o"></i> <span>{{ children_2.name }}</span>
                    {% if children_2.children %}
                    <span class="pull-right-container">
                      <i class="fa fa-angle-left pull-right"></i>
                    </span>
                    {% endif %}
                  </a>
                  {% if children_2.children %}
                  <ul class="treeview-menu">
                    {% for children_3 in children_2.children %}
                    <li><a href="{{ children_3.href }}"><i class="fa fa-circle-o"></i> <span>{{ children_3.name }}</span></a></li>
                    {% endfor %}
                  </ul>
                  {% endif %}
                </li>
                {% endfor %}
              </ul>
              {% endif %}
            </li>
          {% set i = i + 1 %}
          {% endfor %}
        </ul>
        {% endif %}
      </li>
      {% set i = i + 1 %}
      {% endfor %}
    </ul>
    <!-- Sidebar stats -->

  </section>
  <!-- /.sidebar -->
</aside>
