{#{% load sitetree %}#}
{% load i18n suit_menu %}
{% load url from future %}

<div class="left-nav" id="left-nav">
  <ul>
    {% block menu_home %}
      {% url 'admin:index' as index_url %}
      <li{% if index_url == request.path %} class="active"{% endif %}>
        <a href="{{ index_url }}"><i class="icon-home"></i>{% trans 'Home' %}
        </a>
      </li>
    {% endblock %}

    {% get_menu request as app_list %}
    {% if app_list %}
      {% for app in app_list %}
        <li{{ app.is_active|yesno:' class=active,' }}>
          <a href="{{ app.app_url }}"><i class="{% firstof app.icon 'icon-chevron-right' %}"></i>{% trans app.name|capfirst %}
          </a>
          {% if app.models %}
            <ul>
              {% for model in app.models %}
                <li{{ model.is_active|yesno:' class=active,' }}>
                  <a href="{{ model.admin_url }}">{{ model.name }}</a></li>
              {% endfor %}
            </ul>
          {% endif %}
        </li>
      {% endfor %}
    {% endif %}
  </ul>
</div>
