{% spaceless %}
{% load i18n %}
<thead>
    <tr class='ajax_list_header_row'>
        {% for field in fields %}

            {% if field.order_field %}
                <th class='ajax_list_header ajax_list_sorter {% if order_by == field.order_field %}ajax_list_sorter_asc active_sort{% endif %} {% if order_by == "-"|add:field.order_field %}ajax_list_sorter_desc active_sort{% endif %}' data-order-field='{{ field.order_field }}' >
            {% else %}
                <th class='ajax_list_header'>
            {% endif %}
                    <span>{{ field.column_title|default_if_none:"" }}</span>
                </th>
            
        {% endfor %}
    </tr>
</thead>
{% endspaceless %}