]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates-bootstrap/opac/parts/qtype_selector.tt2
LP#1778972: (follow-up) use OILSWebTemplatePath to enable/disable the bootstrap OPAC
[Evergreen.git] / Open-ILS / src / templates-bootstrap / 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
16 <select class="form-control w-100" name="[% name || 'qtype' %]"[% IF id; ' id="'; id ; '"' ; END -%]
17     title="[% l('Select query type:') %]">
18     [%  query_type = query_type || CGI.param('qtype') || search.default_qtypes.0;
19       FOR qt IN query_types;
20         NEXT IF browse_only AND NOT qt.browse -%]
21     <option value='[% qt.value | html %]'[%
22         query_type == qt.value ? ' selected="selected"' : ''
23     %]>[% IF plural AND qt.plural_label;
24         qt.plural_label | html;
25     ELSE;
26         qt.label | html;
27     END %]</option>
28     [% END -%]
29 </select>