{% load i18n filebrowser %}

<thead>
  <tr>
    {% if query.o == 'filetype_checked' %}
      <th class="sorted {{ query.ot }}ending"><a href="{% query_string 'o,ot,p' %}&amp;ot={% ifequal query.ot 'desc' %}asc{% else %}desc{% endifequal %}&amp;o=filetype_checked"></a></th>
    {% else %}
      <th><a href="{% query_string 'o,ot,p' %}&amp;ot=asc&amp;o=filetype_checked">&nbsp;</a></th>
    {% endif %}

    {% if query.o == 'filename_lower' %}
      <th class="sorted {{ query.ot }}ending"><a href="{% query_string 'o,ot,p' %}&amp;ot={% ifequal query.ot 'desc' %}asc{% else %}desc{% endifequal %}&amp;o=filename_lower">{% trans 'Name' %}</a></th>
    {% else %}
      <th><a href="{% query_string 'o,ot,p' %}&amp;ot=asc&amp;o=filename_lower">{% trans 'Name' %}</a></th>
    {% endif %}

    <th>&nbsp;</th>

    {% if query.o == 'filesize' %}
      <th class="sorted {{ query.ot }}ending"><a href="{% query_string 'o,ot,p' %}&amp;ot={% ifequal query.ot 'desc' %}asc{% else %}desc{% endifequal %}&amp;o=filesize">{% trans 'Size' %}</a></th>
    {% else %}
      <th><a href="{% query_string 'o,ot,p' %}&amp;ot=asc&amp;o=filesize">{% trans 'Size' %}</a></th>
    {% endif %}

    {% if query.o == 'date' %}
      <th class="sorted {{ query.ot }}ending"><a href="{% query_string 'o,ot,p' %}&amp;ot={% ifequal query.ot 'desc' %}asc{% else %}desc{% endifequal %}&amp;o=date">{% trans 'Date' %}</a></th>
    {% else %}
      <th><a href="{% query_string 'o,ot,p' %}&amp;ot=asc&amp;o=date">{% trans 'Date' %}</a></th>
    {% endif %}

    {% if results_var.delete_total %}
      <th>&nbsp;</th>
    {% endif %}
  </tr>
</thead>
