[%- PROCESS "opac/parts/header.tt2"; WRAPPER "opac/parts/base.tt2"; INCLUDE "opac/parts/topnav.tt2"; IF is_advanced || is_special; ctx.page_title = l("Search Results"); ELSE; ctx.page_title = l("Search Results: ") _ CGI.param('query') | html; END; page = CGI.param('page'); page = page.match('^\d+$') ? page : 0; # verify page is a sane value page_count = (!ctx.page_size.defined || !ctx.hit_count.defined || ctx.page_size == 0) ? 1 : POSIX.ceil(ctx.hit_count / ctx.page_size); # We don't want search engines indexing search results ctx.metalinks.push(''); PROCESS "opac/parts/misc_util.tt2"; PROCESS get_library; -%]

[% l('Search Results') %]

[% INCLUDE "opac/parts/searchbar.tt2" took_care_of_form=1 %]

[% l('Additional search filters and navigation') %]

[%# hide the header bar when displaying metarecord constituents instead of skipping it altogether to allow the search form variables to propagate %] [% IF ctx.metarecord; mr_attrs = {marc_xml => ctx.metarecord_master.marc_xml}; PROCESS get_marc_attrs args=mr_attrs %]
[% l('Viewing Results for Grouped Record: [_1]', mr_attrs.title) | html %]
[% IF CGI.param('query') %]
[% l('◄ Return to Grouped Search Results') %]

[% END %] [% END %]
[% INCLUDE "opac/parts/filtersort.tt2" value=CGI.param('sort') submit_on_change=1 class="form-control" %]
[%- IF show_more_details.default != 'hide' -%]
[% IF show_detail_view %] [% l('Show Fewer Details') %] [% ELSE %] [% l('Show More Details') %] [% END %]
[%- END -%] [% IF (is_advanced AND NOT is_special) AND CGI.param('qtype') %] [% END %]
[%- IF !search.no_highlight %]
[% END %]
[% IF NOT metarecords.disabled %]
[% END %] [% IF ctx.depth_sel_checkbox %]
[% END %] [% IF ctx.exclude_electronic_checkbox %]
[% END %]
[%- IF (ctx.depth_sel_checkbox OR ctx.depth_sel_button) AND CGI.param('depth') == ctx.depth_sel_depth AND ctx.depth_sel_resultshint %]
[% ctx.depth_sel_resultshint | html %]
[%- END %] [% path = "opac/parts/result/" _ (ctx.records.size ? "table.tt2" : "lowhits.tt2"); INCLUDE $path %]
[%- END %]