{% extends "mongonaut/base.html" %}
{% load mongonaut_tags %}

{% block breadcrumbs %}
<li><a href="" class="active">Mongonaut</a></li>
{% endblock %}

{% block content %}

<h1>Mongonaut</h1>

<div class="row">
    <div class="span16">
{% for app in object_list %}

    <table class="bordered-table zebra-striped">
        <thead>
            <tr>
                <th colspan=3>{{ app.app_name.title }}</th>
            </tr>
        </thead>
        
        {% for model in app.obj.models %}
            <tr>
                <td><a href="{% url document_list app.app_name model.name %}">{{ model.name }}</a></td>
                {% if request.user.is_admin or request.user.is_staff %}
                    <td><a href="{% url document_detail_add_form app.app_name model.name %}">Add</a></td>
                    <td><a href="{% url document_list app.app_name model.name %}">Change</a></td>                        
                {% else %}
                    <td>Add</td>
                    <td>Change</td>
                {% endif %}    
            </tr>
        {% endfor %}
    </table>    
{% endfor %}
    </div>
</div>    

{% endblock %}
