{% if result_hidden_fields %}
    <div class="hiddenfields"> {# DIV for HTML validation #}
        {% for item in result_hidden_fields %}{{ item }}{% endfor %}
    </div>
{% endif %}

{% if results %}
    <div class="grp-module grp-changelist-results">
        <table cellspacing="0" id="result_list">
            <thead>
                <tr>
                    {% for header in result_headers %}
                        <th scope="col" {{ header.class_attrib }}>
                            {% if header.sortable %}<a href="{{ header.url }}">{% endif %}
                            {{ header.text|capfirst }}
                            {% if header.sortable %}</a>{% endif %}
                        </th>
                    {% endfor %}
                </tr>
            </thead>
            <tbody>
                {% for result in results %}
                    <tr id="node-{{ result.pk }}" class="grp-row {% cycle 'grp-row-even' 'grp-row-odd' %}{% if result.parent_pk %} child-of-node-{{result.parent_pk}}{% endif %}">{% for item in result %}{{ item }}{% endfor %}</tr>
                {% endfor %}
            </tbody>
        </table>
</div>
{% endif %}