searchdesc is now just a flag
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
# these are treated as OR
elsif ( $this_limit =~ /mc/ ) {
$group_OR_limits .= " or " if $group_OR_limits;
# these are treated as OR
elsif ( $this_limit =~ /mc/ ) {
$group_OR_limits .= " or " if $group_OR_limits;
+ $limit_desc .=" or " if $group_OR_limits;
$group_OR_limits .= "$this_limit";
$limit_cgi .="&limit=$this_limit";
$group_OR_limits .= "$this_limit";
$limit_cgi .="&limit=$this_limit";
- $limit_desc .= " or $this_limit";
+ $limit_desc .= "$this_limit";
my $expanded_facet = $params->{'expand'};
# Define some global variables
my $expanded_facet = $params->{'expand'};
# Define some global variables
-my ( $error,$query,$simple_query,$query_cgi,$query_search_desc,$limit,$limit_cgi,$limit_desc,$query_type);
+my ( $error,$query,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_desc,$query_type);
my @results;
## I. BUILD THE QUERY
my @results;
## I. BUILD THE QUERY
-( $error,$query,$simple_query,$query_cgi,$query_search_desc,$limit,$limit_cgi,$limit_desc,$query_type) = buildQuery(\@operators,\@operands,\@indexes,\@limits,\@sort_by);
+( $error,$query,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_desc,$query_type) = buildQuery(\@operators,\@operands,\@indexes,\@limits,\@sort_by);
## parse the query_cgi string and put it into a form suitable for <input>s
my @query_inputs;
## parse the query_cgi string and put it into a form suitable for <input>s
my @query_inputs;
if ($server =~/biblioserver/) { # this is the local bibliographic server
$hits = $results_hashref->{$server}->{"hits"};
my $page = $cgi->param('page') || 0;
if ($server =~/biblioserver/) { # this is the local bibliographic server
$hits = $results_hashref->{$server}->{"hits"};
my $page = $cgi->param('page') || 0;
- my @newresults = searchResults( $query_search_desc,$hits,$results_per_page,$offset,@{$results_hashref->{$server}->{"RECORDS"}});
+ my @newresults = searchResults( $query_desc,$hits,$results_per_page,$offset,@{$results_hashref->{$server}->{"RECORDS"}});
$total = $total + $results_hashref->{$server}->{"hits"};
if ($hits) {
$template->param(total => $hits);
$template->param(limit_cgi => $limit_cgi);
$template->param(query_cgi => $query_cgi);
$total = $total + $results_hashref->{$server}->{"hits"};
if ($hits) {
$template->param(total => $hits);
$template->param(limit_cgi => $limit_cgi);
$template->param(query_cgi => $query_cgi);
- $template->param(searchdesc => ($query_type?"$query_type=":"")."$query_search_desc" );
+ $template->param(query_desc => $query_desc);
+ $template->param(limit_desc => $limit_desc);
+ if ($query_desc || $limit_desc) {
+ $template->param(searchdesc => 1);
+ }
$template->param(results_per_page => $results_per_page);
$template->param(SEARCH_RESULTS => \@newresults);
## Build the page numbers on the bottom of the page
$template->param(results_per_page => $results_per_page);
$template->param(SEARCH_RESULTS => \@newresults);
## Build the page numbers on the bottom of the page
$template->param(
#classlist => $classlist,
total => $total,
$template->param(
#classlist => $classlist,
total => $total,
- searchdesc => ($query_type?"$query_type=":"")."$query_search_desc",
opacfacets => 1,
facets_loop => $facets,
scan => $scan,
search_error => $error,
);
opacfacets => 1,
facets_loop => $facets,
scan => $scan,
search_error => $error,
);
+
+if ($query_desc || $limit_desc) {
+ $template->param(searchdesc => 1);
+}
+
## Now let's find out if we have any supplemental data to show the user
# and in the meantime, save the current query for statistical purposes, etc.
my $koha_spsuggest; # a flag to tell if we've got suggestions coming from Koha
my @koha_spsuggest; # place we store the suggestions to be returned to the template as LOOP
## Now let's find out if we have any supplemental data to show the user
# and in the meantime, save the current query for statistical purposes, etc.
my $koha_spsuggest; # a flag to tell if we've got suggestions coming from Koha
my @koha_spsuggest; # place we store the suggestions to be returned to the template as LOOP
-my $phrases = $query_search_desc;
+my $phrases = $query_desc;
my $ipaddress;
if ( C4::Context->preference("kohaspsuggest") ) {
my $ipaddress;
if ( C4::Context->preference("kohaspsuggest") ) {
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
-<title>Koha › Catalog › <!-- TMPL_IF NAME="searchdesc" -->Results of Search for '<!-- TMPL_VAR NAME="searchdesc" -->'<!-- TMPL_ELSE -->You did not specify any search criteria<!-- /TMPL_IF --></title>
+<title>Koha › Catalog › <!-- TMPL_IF NAME="searchdesc" -->Results of Search for '<!-- TMPL_VAR NAME="query_desc" --><!-- TMPL_VAR NAME="limit_desc" -->'<!-- TMPL_ELSE -->You did not specify any search criteria<!-- /TMPL_IF --></title>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
</head>
<body>
<!-- TMPL_INCLUDE NAME="header.inc" -->
<!-- TMPL_INCLUDE NAME="cat-search.inc" -->
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
</head>
<body>
<!-- TMPL_INCLUDE NAME="header.inc" -->
<!-- TMPL_INCLUDE NAME="cat-search.inc" -->
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/catalogue/search.pl">Catalogue</a> › Search for <i><!-- TMPL_VAR NAME="searchdesc" --></i></div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/catalogue/search.pl">Catalogue</a> › Search for <i><!-- TMPL_VAR NAME="query_desc" --><!-- TMPL_VAR NAME="limit_desc" --></i></div>
<div id="doc3" class="yui-t2">
<div id="doc3" class="yui-t2">
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="total" -->
<h3>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="total" -->
<h3>
- <!-- TMPL_VAR NAME="total" --> results found for '<!-- TMPL_VAR NAME="searchdesc" -->'
+ <!-- TMPL_VAR NAME="total" --> results found for '<!-- TMPL_VAR NAME="query_desc" --><!-- TMPL_VAR NAME="limit_desc" -->'
</h3>
<!-- TMPL_ELSE -->
<!-- TMPL_IF NAME="searchdesc" -->
<h3>No results found</h3>
<p>
</h3>
<!-- TMPL_ELSE -->
<!-- TMPL_IF NAME="searchdesc" -->
<h3>No results found</h3>
<p>
- No results match your search for <span style="font-weight: bold;">“<!-- TMPL_VAR NAME="searchdesc" -->”</span> in <!-- TMPL_VAR NAME="LibraryName" --> Catalog.
+ No results match your search for <span style="font-weight: bold;">“<!-- TMPL_VAR NAME="query_desc" --><!-- TMPL_VAR NAME="limit_desc" -->”</span> in <!-- TMPL_VAR NAME="LibraryName" --> Catalog.
</p>
<!-- TMPL_ELSE -->
<h3>No results found</h3>
</p>
<!-- TMPL_ELSE -->
<h3>No results found</h3>