{% extends "admin/index.html" %}
{% load i18n grp_tags %}

{% block javascripts %}
    {{ block.super }}
{% endblock %}

{% if not is_popup %}
    {% block breadcrumbs %}
        <div id="breadcrumbs">
            <a href="../">{% trans "Home" %}</a> &rsaquo;
            {% for app in app_list %}
                {% blocktrans with app.name as name %}{{ name }}{% endblocktrans %}
            {% endfor %}
        </div>
    {% endblock %}
{% endif %}

{% block content %}
    <div class="container-grid">
        <div class="column span-12" id="apps_init">
            {% if app_list %}
                {% for app in app_list %}
                    <div class="module" id="app_{{ app.name|lower }}">
                        <h2>{% trans app.name %}</h2>
                        {% for model in app.models %}
                            <div class="row">
                                {% if model.perms.change %}<a href="{{ model.admin_url }}">{{ model.name }}</a>{% else %}<span>{{ model.name }}</span>{% endif %}
                                <ul class="actions">
                                    <li class="add-link">{% if model.perms.add %}<a href="{{ model.admin_url }}add/">{% trans 'Add' %}</a>{% else %}&nbsp;{% endif %}</li>
                                    <li class="change-link"> {% if model.perms.change %}<a href="{{ model.admin_url }}">{% trans 'Change' %}</a>{% else %}&nbsp;{% endif %}</li>
                                </ul>
                            </div>
                        {% endfor %}
                    </div>
                {% endfor %}
            {% endif %}
        </div>
    </div>
{% endblock %}
