{% extends "admin/base_site.html" %}
{% load i18n %}
{% load url from future %}

{% block breadcrumbs %}
<ul class="breadcrumb">
	<li><a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> <span class="divider">/</span></li>
	<li><a href="{% url 'django-admindocs-docroot' %}">{% trans 'Documentation' %}</a> <span class="divider">/</span></li>
	<li class="active">{% trans 'Models' %}</li>
</ul>
{% endblock %}

{% block title %}Models{% endblock %}

{% block content %}

<h1>Model documentation</h1>

{% regroup models by app_label as grouped_models %}
<ul class="nav nav-tabs nav-stacked">
{% for group in grouped_models %}
	{% if not forloop.first %}
	<li class="divider"></li>
	{% endif %}
	<li class="nav-header" id="app-{{ group.grouper }}">
		{{ group.grouper|capfirst }}
	</li>
{% for model in group.list %}
	<li><a href="{% url 'django-admindocs-models-detail' app_label=model.app_label model_name=model.object_name.lower %}">{{ model.object_name }}</a></li>
{% endfor %}
{% endfor %}
</ul>
{% endblock %}

{% block sidebar %}
<ul class="nav nav-list well">
	<li class="nav-header">{% trans "Model Groups" %}</li>
{% regroup models by app_label as grouped_models %}
{% for group in grouped_models %}
    <li><a href="#app-{{ group.grouper }}">{{ group.grouper|capfirst }}</a></li>
{% endfor %}
</ul>
{% endblock %}
