<%page expression_filter="h"/>
<%! from django.utils.translation import ugettext as _ %>
<script type="text/template" id="thread-list-template">
    <%include file="_filter_dropdown.html" />
    <div class="forum-nav-thread-list-wrapper" id="sort-filter-wrapper" tabindex="-1">
        <div class="forum-nav-refine-bar">
            <label class="forum-nav-filter-main">
                ## Translators: This labels a filter menu in forum navigation
                <span class="sr">${_("Filter:")}</span>
                <select class="forum-nav-filter-main-control">
                    ## Translators: This is a menu option for showing all forum threads unfiltered
                    <option value="all">${_("Show all")}</option>
                    ## Translators: This is a menu option for showing only unread forum threads
                    <option value="unread">${_("Unread")}</option>
                    ## Translators: This is a menu option for showing only unanswered forum
                    ## question threads
                    <option value="unanswered">${_("Unanswered")}</option>
                    %if flag_moderator:
                        ## Translators: This is a menu option for showing only forum threads flagged
                        ## for abuse
                        <option value="flagged">${_("Flagged")}</option>
                    %endif
                </select>
            ## safe-lint: disable=python-parse-error,python-wrap-html
            </label>${"<% if (isCohorted && isPrivilegedUser) { %>" | n, decode.utf8}<label class="forum-nav-filter-cohort">
                ## Translators: This labels a cohort menu in forum navigation
                <span class="sr">${_("Cohort:")}</span>
                <select class="forum-nav-filter-cohort-control">
                    <option value="">${_("in all cohorts")}</option>
                        %for c in cohorts:
                            <option value="${c['id']}">${c['name']}</option>
                        %endfor
                </select>
            ## safe-lint: disable=python-parse-error,python-wrap-html
            </label>${"<% } %>" | n, decode.utf8}<label class="forum-nav-sort">
                ## Translators: This labels a sort menu in forum navigation
                <span class="sr">${_("Sort:")}</span>
                <select class="forum-nav-sort-control">
                    ## Translators: This is a menu option for sorting forum threads
                    <option value="activity">${_("by recent activity")}</option>
                    ## Translators: This is a menu option for sorting forum threads
                    <option value="comments">${_("by most activity")}</option>
                    ## Translators: This is a menu option for sorting forum threads
                    <option value="votes">${_("by most votes")}</option>
                </select>
            </label>
        </div>
        <div class="search-alerts"></div>
        <ul class="forum-nav-thread-list"></ul>
    </div>
</script>
