{% 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; filters</div>{% endblock %}
{% block title %}Template filters{% endblock %}

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

