1 [%- PROCESS "opac/parts/header.tt2";
2 WRAPPER "opac/parts/base.tt2";
3 INCLUDE "opac/parts/topnav.tt2";
5 IF is_advanced || is_special;
6 ctx.page_title = l("Search Results");
8 ctx.page_title = l("Search Results: ") _ CGI.param('query') | html;
11 page = CGI.param('page');
12 page = page.match('^\d+$') ? page : 0; # verify page is a sane value
14 page_count = (!ctx.page_size.defined || !ctx.hit_count.defined || ctx.page_size == 0) ? 1 : POSIX.ceil(ctx.hit_count / ctx.page_size);
16 # We don't want search engines indexing search results
17 ctx.metalinks.push('<meta name="robots" content="noindex,follow">');
19 PROCESS "opac/parts/misc_util.tt2";
22 <h2 class="sr-only">[% l('Search Results') %]</h2>
23 <form action="[% ctx.opac_root %]/results" method="get">
24 [% INCLUDE "opac/parts/searchbar.tt2" took_care_of_form=1 %]
25 <h3 class="sr-only">[% l('Additional search filters and navigation') %]</h3>
26 <div class="almost-content-wrapper border-bottom">
28 [%# hide the header bar when displaying metarecord constituents
29 instead of skipping it altogether to allow the search form
30 variables to propagate %]
32 mr_attrs = {marc_xml => ctx.metarecord_master.marc_xml};
33 PROCESS get_marc_attrs args=mr_attrs %]
34 <div class="results_header_lbl">
35 [% l('Viewing Results for Grouped Record: [_1]',
36 mr_attrs.title) | html %]
38 [% IF CGI.param('query') %]
40 <a href="[% mkurl(ctx.opac_root _ '/results', {}, ['metarecord','page']); %]">
41 [% l('◄ Return to Grouped Search Results') %]
47 <div [%- IF ctx.metarecord %]class="hidden"[%- ELSE %]class="container-fluid"[%- END %]>
49 <div id="results_header_inner">
51 <div id="refine_hits" class="btn btn-secondary"><a onclick="getFacety();">[% l('Refine these results') %]</a></div>
52 <div id="return_to_hits" class="results_header_btns"><a onclick="getResulty();">[% l('Back to results') %]</a></div>
57 <div class="search-options text-center">
59 <!-- ===== Drop Down ===== -->
60 <div class="search-option my-2">
61 <label for="opac.result.sort">[% l('Sort Results') %]</label>
62 [% INCLUDE "opac/parts/filtersort.tt2" value=CGI.param('sort') submit_on_change=1 class="form-control" %]
64 [%- IF show_more_details.default != 'hide' -%]
66 <!-- ===== Buttons ===== -->
67 <div class="search-option my-2">
68 [% IF show_detail_view %]
69 <a href="[% mkurl('', {detail_record_view => 0}) %]" class="btn btn-sm btn-secondary">[% l('Show Fewer Details') %]</a> [% ELSE %]
70 <a href="[% mkurl('', {detail_record_view => 1}) %]" class="btn btn-sm btn-secondary">[% l('Show More Details') %]</a>
74 [% IF (is_advanced AND NOT is_special) AND CGI.param('qtype') %]
75 <div class="search-option my-2">
76 <span id="refine_search_link"> <a class="btn btn-secondary btn-sm" href="[% mkurl(ctx.opac_root _ '/advanced') %]">[%
77 l('Refine My Original Search')
88 <!-- ===== Checkboxes ===== -->
89 <div class="search-check">
91 [%- IF !search.no_highlight %]
93 <div class="search-filter m-2">
94 <label for="no_highlight">
95 <input type="checkbox" id="no_highlight" name="no_highlight" value="1"
96 onchange="search_modifier_onchange('no_highlight', this, true)"
97 [% CGI.param('no_highlight').size ? ' checked="checked"' : '' %] />
98 [% l('Disable Highlighting') %]
103 <div class="search-filter m-2">
104 <label for="limit_to_available">
105 <input type="checkbox" id="limit_to_available" name="modifier" value="available"
106 onchange="search_modifier_onchange('available', this, true)"
107 [% CGI.param('modifier').grep('available').size ? ' checked="checked"' : '' %] />
108 [% l('Limit to Available Items') %]
111 [% IF NOT metarecords.disabled %]
113 <div class="search-filter m-2">
114 <label for="metabib_search_modifier">
115 <input type="checkbox" id="metabib_search_modifier"
116 name="modifier" value="metabib"
117 onchange="search_modifier_onchange('metabib', this, true)"
118 [% CGI.param('modifier').grep('metabib').size ? ' checked="checked"' : '' %] />
119 [% l('Group By Formats and Editions') %]
123 [% IF ctx.depth_sel_checkbox %]
125 <div class="search-filter m-2">
126 <label for="depth_sel" title="[% ctx.depth_sel_tooltip | html %]">
127 <input type="checkbox" id="depth_sel" name="depth" value="[% ctx.depth_sel_depth %]"
128 onchange="this.form.submit()"
129 [% CGI.param('depth') == ctx.depth_sel_depth ? ' checked="checked"' : '' %] />
130 [% ctx.depth_sel_checkbox_label | html %]
134 [% IF ctx.exclude_electronic_checkbox %]
136 <div class="search-filter m-2">
137 <label for='opac.result.excludeelec'>
138 <input type='checkbox' id='opac.result.excludeelec' name="fi:-search_format" value="electronic"
139 onchange="exclude_onchange(this)"
140 [%- CGI.param('fi:-search_format').grep('electronic').size ? ' checked="checked"' : '' %] />
141 [% l("Exclude Electronic Resources") %]
156 <div id="results-page" class="col">
157 [%- IF (ctx.depth_sel_checkbox OR ctx.depth_sel_button) AND CGI.param('depth') == ctx.depth_sel_depth AND ctx.depth_sel_resultshint %]
158 <div id="results-page-depth-hint">[% ctx.depth_sel_resultshint | html %]</div>
160 [% path = "opac/parts/result/" _
161 (ctx.records.size ? "table.tt2" : "lowhits.tt2");