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

(-)a/catalogue/search.pl (-1 / +6 lines)
Lines 492-497 my $searcher = Koha::SearchEngine::Search->new( Link Here
492
## parse the query_cgi string and put it into a form suitable for <input>s
492
## parse the query_cgi string and put it into a form suitable for <input>s
493
my @query_inputs;
493
my @query_inputs;
494
my $scan_index_to_use;
494
my $scan_index_to_use;
495
my $scan_search_term_to_use;
495
496
496
for my $this_cgi ( split('&',$query_cgi) ) {
497
for my $this_cgi ( split('&',$query_cgi) ) {
497
    next unless $this_cgi;
498
    next unless $this_cgi;
Lines 502-510 for my $this_cgi ( split('&',$query_cgi) ) { Link Here
502
    if ($input_name eq 'idx') {
503
    if ($input_name eq 'idx') {
503
        $scan_index_to_use = $input_value; # unless $scan_index_to_use;
504
        $scan_index_to_use = $input_value; # unless $scan_index_to_use;
504
    }
505
    }
506
    if ($input_name eq 'q') {
507
        $scan_search_term_to_use = $input_value;
508
    }
505
}
509
}
506
$template->param ( QUERY_INPUTS => \@query_inputs,
510
$template->param ( QUERY_INPUTS => \@query_inputs,
507
                   scan_index_to_use => $scan_index_to_use );
511
                   scan_index_to_use => $scan_index_to_use,
512
                   scan_search_term_to_use => $scan_search_term_to_use );
508
513
509
## parse the limit_cgi string and put it into a form suitable for <input>s
514
## parse the limit_cgi string and put it into a form suitable for <input>s
510
my @limit_inputs;
515
my @limit_inputs;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt (-3 / +6 lines)
Lines 421-427 var holdForPatron = function () { Link Here
421
            <table>
421
            <table>
422
                <tr>
422
                <tr>
423
                    <td>
423
                    <td>
424
                        Scan Index for: <input type="text" name="q" id="scan-index" size="35" value="" />
424
                        [% IF ( scan_search_term_to_use ) %]
425
                            Scan Index for: <input type="text" name="q" id="scan-index" size="35" value="[% scan_search_term_to_use %]" />
426
                        [% ELSE %]
427
                            Scan Index for: <input type="text" name="q" id="scan-index" size="35" value="" />
428
                        [% END %]
425
                    </td>
429
                    </td>
426
                </tr>
430
                </tr>
427
                <tr>
431
                <tr>
Lines 467-473 var holdForPatron = function () { Link Here
467
                [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
471
                [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
468
                    <tr>
472
                    <tr>
469
                        <td>
473
                        <td>
470
                            <a href="/cgi-bin/koha/catalogue/search.pl?idx=[% SEARCH_RESULT.scan_index_to_use %]&amp;q=[% SEARCH_RESULT.scan_use |url %]&quot;[% SEARCH_RESULT.title %]&quot;">[% SEARCH_RESULT.title |html %]</a>
474
                            <a href="/cgi-bin/koha/catalogue/search.pl?idx=[% scan_index_to_use %]&amp;q=[% SEARCH_RESULT.scan_use |url %]&quot;[% SEARCH_RESULT.title %]&quot;">[% SEARCH_RESULT.title |html %]</a>
471
                        </td>
475
                        </td>
472
                        <td>
476
                        <td>
473
                            [% SEARCH_RESULT.author %]
477
                            [% SEARCH_RESULT.author %]
474
- 

Return to bug 17074