{% extends "admin/base_site.html" %}
{% load adminmedia %}
{% load i18n %}
{% block stylesheets %}
    {{ block.super }}
    <link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/documentation.css" />
{% endblock %}
{% block extrahead %}
<script>
$(document).ready(function(){
    // Assign width of table.model to parent .module
    $('#content-main .module').each(function(){
        var childWidth = $('#content-main .module').children("table").outerWidth();
        $('#content-main .module').css("width", childWidth);
    });
});
</script>
{% endblock %}
{% block bodyclass %}documentation{% endblock %}
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../../">Home</a> &rsaquo; <a href="../../">Documentation</a> &rsaquo; <a href="../">Models</a> &rsaquo; {{ name }}</div>{% endblock %}

{% block title %}Model: {{ name }}{% endblock %}

{% block content %}
<h1>{{ summary }}</h1>
<div id="content-main" class="rte">

{% if description %}
  <p>{% filter linebreaksbr %}{% trans description %}{% endfilter %}</p>
{% endif %}

<div class="module model">
<table class="model">
<thead>
<tr>
    <th>Field</th>
    <th>Type</th>
    <th>Description</th>
</tr>
</thead>
<tbody>
{% for field in fields|dictsort:"name" %}
<tr>
    <td>{{ field.name }}</td>
    <td>{{ field.data_type }}</td>
    <td>{{ field.verbose }}{% if field.help_text %} - {{ field.help_text|safe }}{% endif %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>

<a href="../" class="back">&lsaquo; Back to Models Documentation</a>
</div>
{% endblock %}
