{% extends "admin/base_site.html" %}
{% load adminmedia %}
{% load i18n %}
{% block javascripts %}
    {{ block.super }}
    <script type="text/javascript" src="{% admin_media_prefix %}js/documentation.js"></script>
{% endblock %}
{% block bodyclass %}documentation{% endblock %}
{% block content-class %}content-grid{% endblock %}
{% block breadcrumbs %}<div id="breadcrumbs"><a href="../../">Home</a> &rsaquo; <a href="../">Documentation</a> &rsaquo; Tags</div>{% endblock %}
{% block title %}Template tags{% endblock %}

{% block content %}
    <h1>Template tag documentation</h1>
    <div class="container-grid">
        <div class="column span-6">
            {% regroup tags|dictsort:"library" by library as tag_libraries %}
            {% for library in tag_libraries %}
                <div class="module table-of-contents">
                    <h2>{% firstof library.grouper "Built-in tags" %}</h2>
                    <ul>
                        {% for tag in library.list|dictsort:"name" %}
                            <li><a href="#{{ tag.name }}">{{ tag.name }}</a></li>
                        {% endfor %}
                    </ul>
                </div>
            {% endfor %}
        </div>
        <div class="column span-18 last rte">
            {% regroup tags|dictsort:"library" by library as tag_libraries %}
            {% for library in tag_libraries %}
                <div class="group collapsible open">
                    <h2 class="collapsible-handler">{% firstof library.grouper "Built-in tags" %}</h2>
                    {% if library.grouper %}<p class="small quiet">To use these tags, put <code>{% templatetag openblock %} load {{ library.grouper }} {% templatetag closeblock %}</code> in your template before using the tag.</p>{% endif %}
                    {% for tag in library.list|dictsort:"name" %}
                        <div class="module">
                            <h3 id="{{ tag.name }}">{{ tag.name }}</h3>
                            <h4>{{ tag.title }}</h4>
                            <p>{{ tag.body }}</p>
                        </div>
                    {% endfor %}
                </div>
            {% endfor %}
        </div>
    </div>
{% endblock %}


