{% load i18n %}

<div class="menu-folder">
  <a class="menu-item" href="/" role="treeitem">
    <span class="icon"><i class="fas fa-home"></i></span>
    <span class="content">Início</span>
    <span class="support"></span>
  </a>
</div>

{% for app in app_list %}
  <div class="menu-folder">
    <a class="menu-item" href="javascript:void(0)" role="treeitem">
      <span class="icon"><i class="fas fa-user {{ app.icon }}"></i></span>
      <span class="content">{{ app.name }}</span>
      <span class="support"><i class="fas fa-angle-right"></i></span>
    </a>

    <ul role="tree" aria-label="{{ app.name }}">
      {% for model in app.models %}
        {% if model.admin_url %}
          <li>
            <a href="{{ model.admin_url }}" class="menu-item">
                {{ model.name }}
            </a>
          </li>
        {% endif %}

        {% if model.admin_url and show_changelinks %}
          <li>
            <a href="{{ model.admin_url }}" class="menu-item">
              {% if model.view_only %}
                {% translate 'View' %}
              {% else %}
                {% translate 'Change' %}
              {% endif %}
              {{ model.name }}
            </a>
          </li>
        {% endif %}

      {% empty %}
        <li>{% translate 'No models available.' %}</li>
      {% endfor %}
    </ul>
  </div>
{% endfor %}

