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="container">
35 <div class="row bg-light">
36 <div class="col-md-4">
37 [% l('Viewing Results for Grouped Record: [_1]',
38 mr_attrs.title) | html %]
40 [% IF CGI.param('query') %]
41 <div class="col-md-4 ml-auto">
42 <a href="[% mkurl(ctx.opac_root _ '/results', {}, ['metarecord','page']); %]">
43 [% l('◄ Return to Grouped Search Results') %]
50 <div [%- IF ctx.metarecord %]class="hidden"[%- ELSE %]class="container-fluid"[%- END %]>
52 <div id="results_header_inner">
54 <div id="refine_hits" class="btn btn-secondary"><a onclick="getFacety();">[% l('Refine these results') %]</a></div>
55 <div id="return_to_hits" class="results_header_btns"><a onclick="getResulty();">[% l('Back to results') %]</a></div>
60 <div class="search-options text-center">
62 <!-- ===== Drop Down ===== -->
63 <div class="search-option my-2">
64 <label for="opac.result.sort">[% l('Sort Results') %]</label>
65 [% INCLUDE "opac/parts/filtersort.tt2" value=CGI.param('sort') submit_on_change=1 class="form-control" %]
67 [%- IF show_more_details.default != 'hide' -%]
69 <!-- ===== Buttons ===== -->
70 <div class="search-option my-2">
71 [% IF show_detail_view %]
72 <a href="[% mkurl('', {detail_record_view => 0}) %]" class="btn btn-sm btn-secondary">[% l('Show Fewer Details') %]</a> [% ELSE %]
73 <a href="[% mkurl('', {detail_record_view => 1}) %]" class="btn btn-sm btn-secondary">[% l('Show More Details') %]</a>
77 [% IF (is_advanced AND NOT is_special) AND CGI.param('qtype') %]
78 <div class="search-option my-2">
79 <span id="refine_search_link"> <a class="btn btn-secondary btn-sm" href="[% mkurl(ctx.opac_root _ '/advanced') %]">[%
80 l('Refine My Original Search')
91 <!-- ===== Checkboxes ===== -->
92 <div class="search-check">
94 [%- IF !search.no_highlight %]
96 <div class="search-filter m-2">
97 <label for="no_highlight">
98 <input type="checkbox" id="no_highlight" name="no_highlight" value="1"
99 onchange="search_modifier_onchange('no_highlight', this, true)"
100 [% CGI.param('no_highlight').size ? ' checked="checked"' : '' %] />
101 [% l('Disable Highlighting') %]
106 <div class="search-filter m-2">
107 <label for="limit_to_available">
108 <input type="checkbox" id="limit_to_available" name="modifier" value="available"
109 onchange="search_modifier_onchange('available', this, true)"
110 [% CGI.param('modifier').grep('available').size ? ' checked="checked"' : '' %] />
111 [% l('Limit to Available Items') %]
114 [% IF NOT metarecords.disabled %]
116 <div class="search-filter m-2">
117 <label for="metabib_search_modifier">
118 <input type="checkbox" id="metabib_search_modifier"
119 name="modifier" value="metabib"
120 onchange="search_modifier_onchange('metabib', this, true)"
121 [% CGI.param('modifier').grep('metabib').size ? ' checked="checked"' : '' %] />
122 [% l('Group By Formats and Editions') %]
126 [% IF ctx.depth_sel_checkbox %]
128 <div class="search-filter m-2">
129 <label for="depth_sel" title="[% ctx.depth_sel_tooltip | html %]">
130 <input type="checkbox" id="depth_sel" name="depth" value="[% ctx.depth_sel_depth %]"
131 onchange="this.form.submit()"
132 [% CGI.param('depth') == ctx.depth_sel_depth ? ' checked="checked"' : '' %] />
133 [% ctx.depth_sel_checkbox_label | html %]
137 [% IF ctx.exclude_electronic_checkbox %]
139 <div class="search-filter m-2">
140 <label for='opac.result.excludeelec'>
141 <input type='checkbox' id='opac.result.excludeelec' name="fi:-search_format" value="electronic"
142 onchange="exclude_onchange(this)"
143 [%- CGI.param('fi:-search_format').grep('electronic').size ? ' checked="checked"' : '' %] />
144 [% l("Exclude Electronic Resources") %]
158 <div id="results-page" class="col">
159 [%- IF (ctx.depth_sel_checkbox OR ctx.depth_sel_button) AND CGI.param('depth') == ctx.depth_sel_depth AND ctx.depth_sel_resultshint %]
160 <div id="results-page-depth-hint">[% ctx.depth_sel_resultshint | html %]</div>
162 [% path = "opac/parts/result/" _
163 (ctx.records.size ? "table.tt2" : "lowhits.tt2");