]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/opac/parts/qtype_selector.tt2
TPAC: Make corner image link to server root
[working/Evergreen.git] / Open-ILS / src / templates / opac / parts / qtype_selector.tt2
1 [%  query_types = [
2     {value => "keyword", label => l("Keyword")},
3     {value => "title", label => l("Title"), plural_label => l("Titles"), browse => 1},
4     {value => "jtitle", label => l("Journal Title")},
5     {value => "author", label => l("Author"), plural_label => l("Authors"), browse => 1},
6     {value => "subject", label => l("Subject"), plural_label => l("Subjects"), browse => 1},
7     {value => "series", label => l("Series"), plural_label => l("Series"), browse => 1},
8     {value => "id|bibcn", label => l("Bib Call Number")}
9 ] %]
10 <select name="[% name || 'qtype' %]"[% IF id; ' id="'; id ; '"' ; END -%]
11     aria-label="[% l('Select query type:') %]">
12     [%  query_type = query_type || CGI.param('qtype') || search.default_qtypes.0;
13       FOR qt IN query_types;
14         NEXT IF browse_only AND NOT qt.browse -%]
15     <option value='[% qt.value | html %]'[%
16         query_type == qt.value ? ' selected="selected"' : ''
17     %]>[% IF plural AND qt.plural_label;
18         qt.plural_label | html;
19     ELSE;
20         qt.label | html;
21     END %]</option>
22     [% END -%]
23 </select>