{% extends "admin/base_site.html" %}
{% load i18n %}
{% block javascripts %}
    {{ block.super }}
    <script type="text/javascript">
        (function($) {
            $(document).ready(function(){
                $('.rte .module').each(function(){
                    var childWidth = $('.rte .module').children("table").outerWidth();
                    $('.rte .module').css("width", childWidth);
                });
            });
        })(grp.jQuery);
    </script>
{% endblock %}
{% block bodyclass %}grp-docutils{% endblock %}
{% block content-class %}{% endblock %}
{% block breadcrumbs %}
    <ul>
        <li><a href="../../../">{% trans "Home" %}</a></li>
        <li><a href="../../">Documentation</a></li>
        <li><a href="../">Models</a></li>
        <li>{{ name }}</li>
    </ul>
{% endblock %}

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

{% block content %}
    <h1>{{ summary }}</h1>
    <div class="g-d-c grp-rte">
        {% if description %}
            <p>{% trans description %}</p>
        {% endif %}
        <table class="grp-table">
            <thead>
                <tr>
                    <th>Field</th>
                    <th>Type</th>
                    <th>Description</th>
                </tr>
            </thead>
            <tbody>
                {% for field in fields|dictsort:"name" %}
                    <tr>
                        <td class="grp-nowrap"><strong>{{ field.name }}</strong></td>
                        <td class="grp-nowrap">{{ field.data_type }}</td>
                        <td>{{ field.verbose }}{% if field.help_text %} - {{ field.help_text|safe }}{% endif %}</td>
                    </tr>
                {% endfor %}
            </tbody>
        </table>
        <p><a href="../" class="grp-back-link grp-icon-text">Back to Models Documentation</a></p>
    </div>
{% endblock %}
