<%! from django.utils.translation import ugettext as _ %>
<script type="text/template" id="thread-list-template">
    <div class="forum-nav-header">
        <a href="#" class="forum-nav-browse" aria-haspopup="true">
            ## There is no whitespace between these because the front-end JS code
            ## needs to precisely compute the available width for forum-nav-
            ## browse-current in order to do truncation of topic names.
            <i class="icon icon-reorder"></i><span class="sr">${_("Discussion topics; current selection is: ")}</span><span class="forum-nav-browse-current">${_("All Discussions")}</span><span class="forum-nav-browse-drop-arrow">▾</span>
        </a>
        <form class="forum-nav-search">
            <div class="forum-nav-search-ff-position-fix">
                <label>
                    <span class="sr">${_("Search")}</span>
                    <input class="forum-nav-search-input" type="text" placeholder="${_("Search all posts")}">
                    <i class="icon icon-search"></i>
                </label>
            </div>
        </form>
    </div>
    <%include file="_filter_dropdown.html" />
    <div class="forum-nav-thread-list-wrapper">
        <div class="forum-nav-refine-bar">
            %if is_course_cohorted and is_moderator:
            <span class="forum-nav-filter-cohort">
                <select class="forum-nav-filter-cohort-control">
                    <option value="all">${_("View all cohorts")}</option>
                        %for c in cohorts:
                            <option value="${c['id']}">${_("View as {cohort_name}").format(cohort_name=c['name'])}</option>
                        %endfor
                </select>
            </span>
            %endif

            <span class="forum-nav-sort">
                <select class="forum-nav-sort-control">
                    ## Translators: This is a menu option for sorting forum threads
                    <option value="date">${_("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>
            </span>
        </div>
        <div class="search-alerts"></div>
        <ul class="forum-nav-thread-list"></ul>
    </div>
</script>
