{% load i18n fb_tags %}
<thead>
    <tr>
        <!-- ACTIONS -->
        {% comment %}{% if not query.pop %}<th scope="col"><input type="checkbox" id="action-toggle"></th scope="col">{% endif %}{% endcomment %}
        <!-- SELECT -->
        {% if query.pop == "1" %}<th scope="col"></th scope="col">{% endif %}
        {% if query.pop == "2" %}<th scope="col"></th scope="col">{% endif %}
        {% if query.pop == "3" %}<th scope="col"></th scope="col">{% endif %}
        <!-- FILETYPE -->
        {% if query.o == "filetype" %}<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">{% trans "Type" %}</a></th scope="col">{% endif %}
        {% if query.o != "filetype" %}<th scope="col"><a href="{% query_string "" "o,ot,p" %}&amp;ot=asc&amp;o=filetype">{% trans "Type" %}</a></th scope="col">{% endif %}
        <!-- THUMB -->
        <th scope="col">{% trans "Thumbnail" %}</th scope="col">
        <!-- FILENAME / DIMENSIONS  -->
        {% if query.o == "filename_lower" %}<th class="filename 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 "Filename" %}</a></th scope="col">{% endif %}
        {% if query.o != "filename_lower" %}<th class="filename"><a href="{% query_string "" "o,ot,p" %}&amp;ot=asc&amp;o=filename_lower">{% trans "Filename" %}</a></th scope="col">{% endif %}
        <!-- FOLDER -->
        {% if query.q and settings_var.SEARCH_TRAVERSE %}
            {% if query.o == 'folder' %}<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=folder">{% trans 'Folder' %}</a></th scope="col">{% endif %}
            {% if query.o != 'folder' %}<th scope="col"><a href="{% query_string "" "o,ot,p" %}&amp;ot=asc&amp;o=folder">{% trans 'Folder' %}</a></th scope="col">{% endif %}
        {% endif %}
        <!-- SIZE -->
        {% 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 scope="col">{% endif %}
        {% if query.o != "filesize" %}<th scope="col"><a href="{% query_string "" "o,ot,p" %}&amp;ot=asc&amp;o=filesize">{% trans "Size" %}</a></th scope="col">{% endif %}
        <!-- DATE -->
        {% 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 scope="col">{% endif %}
        {% if query.o != "date" %}<th scope="col"><a href="{% query_string "" "o,ot,p" %}&amp;ot=asc&amp;o=date">{% trans "Date" %}</a></th scope="col">{% endif %}
        <!-- EDIT -->
        <th scope="col">&nbsp;</th scope="col">
    </tr>
</thead>