{% extends "admin_tp/index.html" %}
{% load i18n hide_admin %}

{% block content %}
<div id="content-main">

{% if app_list %}
    {% for app in app_list %}
    	{% if app.models|has_model %}
	        <div class="module">
	        <table summary="{% blocktrans with app.name as name %}Models available in the {{ name }} application.{% endblocktrans %}">
	        <caption><a href="{{ app.app_url }}" class="section">{% blocktrans with app.name as name %}{{ name }}{% endblocktrans %}</a></caption>
	        {% for model in app.models %}
	        	{% if not model.perms.list_hide %}
		            <tr>
		            {% if model.perms.change %}
		                <th scope="row"><a href="{{ model.admin_url }}">{{ model.name }}</a></th>
		            {% else %}
		                <th scope="row">{{ model.name }}</th>
		            {% endif %}
		
		            {% if model.perms.add and not model.perms.hide_add %}
		                <td><a href="{{ model.admin_url }}add/" class="addlink">{% trans 'Add' %}</a></td>
		            {% else %}
		                <td>&nbsp;</td>
		            {% endif %}
		
		            {% if model.perms.change %}
		                <td><a href="{{ model.admin_url }}" class="changelink">{% trans 'Change' %}</a></td>
		            {% else %}
		                <td>&nbsp;</td>
		            {% endif %}
		            </tr>
	            {% endif %}
	        {% endfor %}
	        </table>
	        </div>
		{% endif %}
    {% endfor %}
{% else %}
    <p>{% trans "You don't have permission to edit anything." %}</p>
{% endif %}
</div>
{% endblock %}