my $idx = "ms_".$indexes[0];
$idx =~ s/\,/comma/g; # template toolkit doesn't like variables with a , in it
$idx =~ s/-/dash/g; # template toolkit doesn't like variables with a dash in it
- $template->param($idx => 1);
+ $template->param(header_pulldown => $idx);
}
# an operand can be a single term, a phrase, or a complete ccl query
<form action="/cgi-bin/koha/catalogue/search.pl" method="get" id="cat-search-block">
<label class="tip" for="search-form">Enter search keywords:</label>
[% IF ( Koha.Preference('IntranetCatalogSearchPulldown') ) %]
- [% INCLUDE 'search_indexes.inc' %]
+ [% INCLUDE 'search_indexes.inc' $header_pulldown = 1 %]
[% END %]
<input type="text" name="q" id="search-form" size="40" value="[% ms_value | html %]" title="Enter the terms you wish to search for." class="query form-text head-searchbox" />
<input type="submit" value="Submit" class="submit" />
[% total | html %] result(s) found [% IF ( query_desc ) %]for <span class="results_query_desc">'[% query_desc | html %]'</span>[% END %][% IF limit_desc %] with limit(s): <span class="results_limit_desc">'[% limit_desc | html %]'</span>[% END %][% IF ( LibraryName ) %] in [% LibraryName | html %] Catalog[% END %].
</h3>
<a href="/cgi-bin/koha/catalogue/search.pl?advsearch=1&edit_search=1&[% query_cgi | $raw %]&[% limit_cgi | $raw %]&sort_by=[% sort_by | $raw %]">Edit this search</a>
+ <div id="search_within_results">
+ <form id="refine_search">
+ <label for="limit">Search within results</label>
+ [% IF ( Koha.Preference('IntranetCatalogSearchPulldown') ) %]
+ [% INCLUDE 'search_indexes.inc' ms_kw = 1 %]
+ [% END %]
+ <input name="limit" id="refiner" type="text" title="Search results">
+ <input type="submit" id="refine" value="Search">
+ </form>
+ </div>
<div class="searchheader" id="searchheader">
<div id="selection_ops">
first_biblionumber: "[% SEARCH_RESULTS.first.biblionumber | html %]",
last_biblionumber: "[% SEARCH_RESULTS.last.biblionumber | html %]",
}
+
+ $("#refine_search").on('submit',function(e){
+ e.preventDefault();
+ var index = $("#refine_search #idx").val() || "";
+ if( index){index += ":";}
+ window.location.href = "/cgi-bin/koha/catalogue/search.pl?[% query_cgi | $raw %]&[% limit_cgi | $raw %]&[% sort_cgi | $raw %]&limit="+index+$("#refiner").val();
+ });
</script>
[% Asset.js("js/pages/results.js") | $raw %]
[% END %]