<h3 id="DiscussionListOptionsHandle" class="JsOnly"><a href="#">{xen:phrase thread_display_options}</a></h3>
<form action="{xen:link 'forums', $forum}" method="post" class="DiscussionListOptions secondaryContent">
<xen:hook name="thread_list_options">
<div class="controlGroup">
<label for="ctrl_order">{xen:phrase sort_threads_by}:</label>
<select name="order" id="ctrl_order" class="textCtrl">
<option value="last_post_date" {xen:selected "{$order} == 'last_post_date'"}>{xen:phrase last_message_time}</option>
<option value="post_date" {xen:selected "{$order} == 'post_date'"}>{xen:phrase thread_creation_time}</option>
<option value="title" {xen:selected "{$order} == 'title'"}>{xen:phrase title_alphabetical}</option>
<option value="reply_count" {xen:selected "{$order} == 'reply_count'"}>{xen:phrase number_of_replies}</option>
<option value="view_count" {xen:selected "{$order} == 'view_count'"}>{xen:phrase number_of_views}</option>
<option value="first_post_likes" {xen:selected "{$order} == 'first_post_likes'"}>{xen:phrase first_message_likes}</option>
</select>
</div>
<div class="controlGroup">
<label for="ctrl_direction">{xen:phrase order_threads_in}:</label>
<select name="direction" id="ctrl_direction" class="textCtrl">
<option value="desc" {xen:selected "{$orderDirection} == 'desc'"}>{xen:phrase descending_order}</option>
<option value="asc" {xen:selected "{$orderDirection} == 'asc'"}>{xen:phrase ascending_order}</option>
</select>
</div>
<xen:if is="{$forum.prefixCache}">
<div class="controlGroup">
<label for="ctrl_prefix_id">{xen:phrase prefix}:</label>
<select name="prefix_id" id="ctrl_prefix_id" class="textCtrl">
<option value="0" {xen:selected '!{$displayConditions.prefix_id}'}>({xen:phrase any})</option>
<xen:foreach loop="$forum.prefixCache" key="$prefixGroupId" value="$prefixes">
<xen:if is="{$prefixGroupId}">
<optgroup label="{xen:helper threadPrefixGroup, $prefixGroupId}">
<xen:foreach loop="$prefixes" value="$prefixId">
<option value="{$prefixId}" {xen:selected '{$displayConditions.prefix_id} == {$prefixId}'}>{xen:helper threadPrefix, $prefixId, escaped, ''}</option>
</xen:foreach>
</optgroup>
<xen:else />
<xen:foreach loop="$prefixes" value="$prefixId">
<option value="{$prefixId}" {xen:selected '{$displayConditions.prefix_id} == {$prefixId}'}>{xen:helper threadPrefix, $prefixId, escaped, ''}</option>
</xen:foreach>
</xen:if>
</xen:foreach>
</select>
</div>
</xen:if>
<div class="buttonGroup">
<input type="submit" class="button primary" value="{xen:phrase set_options}" />
<input type="reset" class="button" value="{xen:phrase cancel}" />
</div>
</xen:hook>
<input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
</form>