display: inline-block;
}
+.opac-distinctive {
+ background-color: [% css_colors.distinct_medium %];
+}
+.opac-distinctive:hover {
+ background: [% css_colors.distinct_dark %];
+}
+
#myopac_checked_div {
padding: 0px;
}
primary_fade = "#007a54", # medium green
primary_offset = "#417860", # light_green
control = "#69A088", # lighter green
+ distinct_medium = "#1a7f99", # blue
+ distinct_dark = "#0f485a", # blue (dark)
accent_light = "#ccc", # grey (light)
accent_lighter = "#ddd", # grey (lighter)
accent_lighter2 = "#d8d8d8", # grey (lighter again)
node_stack = [{org => org_unit || ctx.aouct_tree || ctx.aou_tree}];
inherited_vis = ctx.get_cgf('opac.org_unit.non_inherited_visibility').enabled == 'f';
+ # Save the topmost org unit in the list (for the All Libraries global search)
+ first_selectable_ou_index = -1;
+ option_index = -1;
+
IF !name;
name = loc_name;
END;
END;
pad_depth = pad_depth * 2;
- display_name = loc_grp ? loc_grp.name : org_unit.name %]
+ display_name = loc_grp ? loc_grp.name : org_unit.name;
+
+ option_index = option_index + 1;
+
+ # This restores the library selector selected value to what it was before the "all library"
+ # express search overrode the previous value;
+ IF CGI.param('scope_restore') != -1;
+ IF option_index == CGI.param('scope_restore');
+ selected = 'selected="selected"';
+ ctx.selected_label = l('All Libraries');
+ ELSE;
+ selected = '';
+ END;
+ ELSE;
+ IF selected == 'selected="selected"';
+ ctx.selected_label = display_name;
+ END;
+ END;
+
+ IF first_selectable_ou_index == -1 AND disabled == '';
+ first_selectable_ou_index = option_index;
+ END -%]
<option value='[% node_value %]' [% selected %] [% disabled %] [% css_class %]>
[% ' ' FOR [0..pad_depth]; display_name | html %]
</option>
-
+
[%- END %]
</select>
+
[%- END %]
[% BLOCK results_count_header %]
<div class="results_header_nav1">
- <span class="h1">[% ctx.bookbag ? l('List Contents') : l('Search Results') %]</span>
+
+ <span class="h1">[% ctx.bookbag ? l('List Contents') : l('Search Results') %]</span>
+ [% IF ctx.selected_label;
+ ' ' _ l('in') _ ' ' _ ctx.selected_label _ ' ';
+ END %]
+
<span class="result_number">
[%~ |l('<span class="result_count_number">' _ ctx.result_start _'</span>',
'<span class="result_count_number">' _ ctx.result_stop _ '</span>',
[% PROCESS "opac/parts/org_selector.tt2" %]
<div id="search-wrapper">
[% UNLESS took_care_of_form -%]
- <form action="[% ctx.opac_root %]/results" method="get">
+ <form action="[% ctx.opac_root %]/results" method="get" name="searchbox_form">
[%- END %]
<div id="search-box">
<span class="search_catalog_lbl mobile_hide">[% l('Search the Catalog') %]</span>
[%- # autosuggest breaks accessibility, as the aria-label
# attribute is removed when the Dijit is created. :( %]
<label id="search_box_label" for="search_box">[% l('Search: ') %]
+ <input type="hidden" id="scope_restore" name="scope_restore" value="-1"/>
<input type="text" id="search_box" name="query" aria-label="[%
l('Enter search query:');
%]" value="[% is_advanced ? ctx.naive_query_scrub(ctx.processed_search_query) : CGI.param('query') | html %]"
[%- IF (show_more_details.default == 'true' OR show_more_details.default == 'hide') AND !CGI.param('detail_record_view') %]
<input id="detail" type="hidden" name="detail_record_view" value="1"/>
[%- END %]
+ <span id='search-submits'>
<input id='search-submit-go' type="submit" value="[% l('Search') %]" class="opac-button"
- onclick='setTimeout(function(){$("search-submit-spinner").className=""; $("search-submit-go").className="hidden"}, 2000)'/>
+ onclick='
+ setTimeout(function(){$("search-submit-spinner").className="";
+ $("search-submits").className="hidden"}, 2000)'/>
+ <input id='search-submit-global-go' type="submit" value="[% l('All Libraries') %]" class="opac-button opac-distinctive"
+ onclick='
+ document.searchbox_form.scope_restore.value = document.searchbox_form.locg.selectedIndex;
+ document.searchbox_form.locg.selectedIndex = "[% first_selectable_ou_index %]";
+ setTimeout(function(){$("search-submit-spinner").className="";
+ $("search-submits").className="hidden"}, 2000)'/>
+ </span>
<img id='search-submit-spinner' src='/opac/images/progressbar_green.gif' style='height:16px;width:16px;' class='hidden' alt='[% l("Search In Progress") %]'/>
</span>
</div>
PROCESS get_library;
-%]
<h2 class="sr-only">[% l('Search Results') %]</h2>
- <form action="[% ctx.opac_root %]/results" method="get">
+ <form action="[% ctx.opac_root %]/results" method="get" name="searchbox_form">
[% INCLUDE "opac/parts/searchbar.tt2" took_care_of_form=1 %]
<h3 class="sr-only">[% l('Additional search filters and navigation') %]</h3>
<div class="almost-content-wrapper">
--- /dev/null
+Search Scope Express Selection
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+A common usage of the catalog is to do a search in a restricted scope,
+like a local library. When the results are lacking, the search is repeated in a
+consortium-wide scope. This feature provides a distinctively-colored
+alternate search button to re-do the current search in the widest
+scope.
+
+After the wide-scope is done, the scope indicated in the drop-down control will
+be restored to what it was before.