my $pref_ou = $ctx->{pref_ou};
if (defined($pref_ou) and $pref_ou ne '' and $pref_ou != $org and ($pref_ou ne $ctx->{aou_tree}->()->id) and not $query =~ / pref_ou\(\S+\)/) {
my $plib = $ctx->{get_aou}->($pref_ou)->shortname;
- $query = "pref_ou($plib) $query";
+ my $pref_scrubber = "pref_ou($plib) $query";
+ push @naive_query_re, $pref_scrubber;
}
if (my $grp = $ctx->{copy_location_group}) {
push @naive_query_re, $thing;
}
- # This gives templates a way to take site() and depth() back out of
+ # This gives templates a way to take site(), pref_ou(), and depth() back out of
# query strings when they shouldn't be there (because they're controllable
# with other widgets).
$ctx->{naive_query_scrub} = sub {
name='[% name %]'>
[%-
WHILE node_stack.size > 0;
- node = node_stack.pop(); #node becomes the popped node stack
- org_unit = node.org; #org_unit becomes node's org
- loc_grp = node.loc_grp; #loc_grp(location) becomes the node_stack's array?
- ou_id = org_unit.id; #ou_id shorthand for org_unit.id
+ node = node_stack.pop();
+ org_unit = node.org;
+ loc_grp = node.loc_grp;
+ ou_id = org_unit.id;
css_class = '';
- disabled = ''; #clear css_class, disabled, and selected
+ disabled = '';
selected = '';
visible = org_unit.opac_visible == 't'; #enable visibility for org_unit's opac_visible option
<img src="/xul/server/skin/media/images/portal/bucket.png"/>
<a target="_self" href="./cat/bucket/copy/">[% l('Copy Buckets') %]</a>
</div>
+ <div>
+ <form action="/eg/opac/results" method="get">
+ <input type="search" alt="Catalog Search" maxlength="200"
+ size="20" name="query"
+ placeholder="Search catalog for..." />
+ <input id="search-submit-go" type="submit" value="Search"
+ title="Search" class="opac-button" onclick="setTimeout
+ (function(){$("search-submit-spinner")
+ .className=""; $("search-submit-go")
+ .className="hidden"}, 2000)">
+ </form>
+ </div>
</div>
</div>
</div>
// The URL is otherwise generated through user navigation.
if ($scope.catalog_url) return;
+ var default_search_library = egCore.hatch.getLocalItem('eg.search.lib.default');
var url = $location.absUrl().replace(/\/staff.*/, '/opac/advanced');
+ if (default_search_library.id) {
+ url += '?locg=' + default_search_library.id;
+ }
// A record ID in the path indicates a request for the record-
// specific page.
if ($routeParams.record_id) {