{% load i18n %} {% for header in result_headers %}
<th scope="col" {{ header.class_attrib }}>
  {% if header.sortable %} {% if header.sorted %}
  <div class="sortoptions">
    <a href="{{ header.url }}" class="toggle glyphicon {% if header.ascending
    %}glyphicon-chevron-up{% else %}glyphicon-chevron-down{% endif %}" title="{%
    trans "Toggle sorting" %}"/>
  </div>
  {% endif %} {% endif %}
  <div class="text">
    {% if header.sortable %}<a href="{{ header.url }}"
      >{{ header.text|capfirst }}</a
    >
    {% else %}<span>{{ header.text|capfirst }}</span>
    {% endif %}
  </div>
  <div class="clear"></div>
</th>
{% endfor %}
