View | Details | Raw Unified | Return to bug 7620
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+1 lines)
Lines 196-201 OPAC: Link Here
196
            - a library select pulldown menu on the OPAC masthead.
196
            - a library select pulldown menu on the OPAC masthead.
197
        -
197
        -
198
            - 'Display this HTML when no results are found for a search in the OPAC:'
198
            - 'Display this HTML when no results are found for a search in the OPAC:'
199
	    - '<br />Note: The placeholder {QUERY_KW} will be replaced with the keywords of the query.'
199
            - pref: OPACNoResultsFound
200
            - pref: OPACNoResultsFound
200
              type: textarea
201
              type: textarea
201
              class: code
202
              class: code
(-)a/opac/opac-search.pl (-1 / +7 lines)
Lines 674-680 for (my $i=0;$i<@servers;$i++) { Link Here
674
            $template->param(next_page_offset => $next_page_offset) unless $pages eq $current_page_number;
674
            $template->param(next_page_offset => $next_page_offset) unless $pages eq $current_page_number;
675
        }
675
        }
676
        # no hits
676
        # no hits
677
        # extracting keywords in case of relaunching search
677
        else {
678
        else {
679
            (my $query_kw=$query_desc)=~s/ and|or / /g;
680
            my @query_kw=($query_kw=~ /([-\w]+\b)(?:[^,:]|$)/g);
681
            $query_kw=join('+',@query_kw);
682
	    my $nohits=C4::Context->preference('OPACNoResultsFound');
683
	    $nohits=~s/{QUERY_KW}/$query_kw/g;
684
	    $template->param( 'OPACNoResultsFound' =>$nohits);
678
            $template->param(searchdesc => 1,query_desc => $query_desc,limit_desc => $limit_desc);
685
            $template->param(searchdesc => 1,query_desc => $query_desc,limit_desc => $limit_desc);
679
        }
686
        }
680
    } # end of the if local
687
    } # end of the if local
681
- 

Return to bug 7620