{% load i18n %}
<table class="table table-striped">
    <thead>
        <tr>
            {% for header in headers %}
              <th {{ header.class_attrib }}>
                {% if header.sortable %}
                  {% if header.sort_priority > 0 %}
                    <div class="sortoptions">
                      <a class="sortremove" href="{{ header.url_remove }}" title="{% trans "Remove from sorting" %}"></a>
                      {% if num_sorted_fields > 1 %}<span class="sortpriority" title="{% blocktrans with priority_number=header.sort_priority %}Sorting priority: {{ priority_number }}{% endblocktrans %}">{{ header.sort_priority }}</span>{% endif %}
                      <a href="{{ header.url_toggle }}" class="toggle {% if header.ascending %}ascending{% else %}descending{% endif %}" title="{% trans "Toggle sorting" %}"></a>
                    </div>
                  {% endif %}
                {% endif %}
                <div class="text">{% if header.sortable %}<a href="{{ header.url_primary }}">{{ header.text|capfirst }}</a>{% else %}<span>{{ header.text|capfirst }}</span>{% endif %}</div>
                <div class="clear"></div>
              </th>
            {% endfor %}
        </tr>
    </thead>
    <tbody>
        {% for row in results %}
        <tr>
            {% for item in row %}
                <td>{{ item }}</td>
            {% endfor %}
        </tr>
        {% endfor %}
    </tbody>
</table>
