1 <select title="[% l('Search sorting') %]"
2 [% class ? ('class="' _ class _ '"') : '' %] id='[% id || "opac.result.sort" %]'
3 name="[% name || 'sort' %]" [% IF submit_on_change %]onchange='this.form.submit()'[% END %]>
4 [% IF mode != 'bookbag' %]<option value=''>[% l("Sort by Relevance") %]</option>[% END %]
5 <optgroup label='[% l("Sort by Title") %]'>
6 <option value='titlesort'[% value == 'titlesort' ? ' selected="selected"' : '' %]>[% l("Title: A to Z") %]</option>
7 <option value='titlesort.descending'[% value == 'titlesort.descending' ? ' selected="selected"' : '' %]>[% l("Title: Z to A") %]</option>
9 <optgroup label='[% l("Sort by Author") %]'>
10 <option value='authorsort'[% value == 'authorsort' ? ' selected="selected"' : '' %]>[% l("Author: A to Z") %]</option>
11 <option value='authorsort.descending'[% value == 'authorsort.descending' ? ' selected="selected"' : '' %]>[% l("Author: Z to A") %]</option>
13 <optgroup label='[% l("Sort by Publication Date") %]'>
14 <option value='pubdate.descending'[% value == 'pubdate.descending' ? ' selected="selected"' : '' %]>[% l("Date: Newest to Oldest") %]</option>
15 <option value='pubdate'[% value == 'pubdate' ? ' selected="selected"' : '' %]>[% l("Date: Oldest to Newest") %]</option>
17 <optgroup label='[% l("Sort by Popularity") %]'>
18 <option value='popularity'[% value == 'popularity' ? ' selected="selected"' : '' %]>[% l("Most Popular") %]</option>
19 <!-- Sorting by least popular items first is probably not an expected
20 choice in production, but could be useful in cases where every
21 record has at least one badge value assigned and you want
22 to investigate the long tail.
25 <option value='popularity.descending'[% value == 'popularity.descending' ? ' selected="selected"' : '' %]>[% l("Least Popular") %]</option>
27 <option value='poprel'[% value == 'poprel' ? ' selected="selected"' : '' %]>[% l("Popularity Adjusted Relevance") %]</option>