]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates/opac/parts/qtype_selector.tt2
LP2045292 Color contrast for AngularJS patron bills
[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 ];
9     IF  ctx.get_org_setting(ctx.search_ou, 'opac.search.enable_bookplate_search');
10         query_types.push(
11             {value => "bookplate", label => l("Digital Bookplate"), plural_label => l("Digital Bookplates")}
12         );
13     END;
14 -%]
15 <select name="[% name || 'qtype' %]"[% IF id; ' id="'; id ; '"' ; END -%]
16     title="[% l('Select query type:') %]">
17     [%  query_type = query_type || CGI.param('qtype') || search.default_qtypes.0;
18       FOR qt IN query_types;
19         NEXT IF browse_only AND NOT qt.browse -%]
20     <option value='[% qt.value | html %]'[%
21         query_type == qt.value ? ' selected="selected"' : ''
22     %]>[% IF plural AND qt.plural_label;
23         qt.plural_label | html;
24     ELSE;
25         qt.label | html;
26     END %]</option>
27     [% END -%]
28 </select>