<ul id="menu-top">
    {% for app in app_list %}
    <li><a id="topnav-{{ app.name|slugify }}">{% trans app.name %}</a>
        <ul>
          {% for model in app.models %}
              {% if model.perms.add and model.perms.change %}
              <li><a href="#/{{ model.admin_url }}" id="topnav-{{ app.name|slugify }}-{{ model.model|slugify }}">{{ model.name }}</a></li>
              {% else %}
                        {% if model.perms.add or model.perms.change %}
                            {% if model.perms.add %}
                            <li><a href="#/{{ model.admin_url }}add/">{{ model.name }} (+)</a></li>
                            {% else %}
                            <li><a href="#/{{ model.admin_url }}">{{ model.name }}</a></li>
                            {% endif %}
                        {% endif %}
              {% endif %}
        {% endfor %}
        </ul>
    </li>
    {% endfor %}
</ul>
