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

(-)a/C4/Search.pm (-2 / +2 lines)
Lines 446-452 sub getRecords { Link Here
446
                # loop through the results
446
                # loop through the results
447
                $results_hash->{'hits'} = $size;
447
                $results_hash->{'hits'} = $size;
448
                my $times;
448
                my $times;
449
                if ( $results_per_page != 'all' && ($offset + $results_per_page <= $size) ) {
449
                if ( $offset + $results_per_page <= $size ) {
450
                    $times = $offset + $results_per_page;
450
                    $times = $offset + $results_per_page;
451
                }
451
                }
452
                else {
452
                else {
Lines 1888-1894 sub searchResults { Link Here
1888
1888
1889
    # handle which records to actually retrieve
1889
    # handle which records to actually retrieve
1890
    my $times;
1890
    my $times;
1891
    if ( $hits && $results_per_page != 'all' && ($offset + $results_per_page <= $hits) ) {
1891
    if ( $hits && ($offset + $results_per_page <= $hits) ) {
1892
        $times = $offset + $results_per_page;
1892
        $times = $offset + $results_per_page;
1893
    }
1893
    }
1894
    else {
1894
    else {
(-)a/catalogue/search.pl (-2 / +1 lines)
Lines 544-550 for (my $i=0;$i<@servers;$i++) { Link Here
544
    my $server = $servers[$i];
544
    my $server = $servers[$i];
545
    if ($server =~/biblioserver/) { # this is the local bibliographic server
545
    if ($server =~/biblioserver/) { # this is the local bibliographic server
546
        $hits = $results_hashref->{$server}->{"hits"};
546
        $hits = $results_hashref->{$server}->{"hits"};
547
        $results_per_page = $hits if $results_per_page == 'all';
548
        my $page = $cgi->param('page') || 0;
547
        my $page = $cgi->param('page') || 0;
549
        my @newresults = searchResults('intranet', $query_desc, $hits, $results_per_page, $offset, $scan,
548
        my @newresults = searchResults('intranet', $query_desc, $hits, $results_per_page, $offset, $scan,
550
                                       $results_hashref->{$server}->{"RECORDS"});
549
                                       $results_hashref->{$server}->{"RECORDS"});
Lines 608-614 for (my $i=0;$i<@servers;$i++) { Link Here
608
            if ($query_desc || $limit_desc) {
607
            if ($query_desc || $limit_desc) {
609
                $template->param(searchdesc => 1);
608
                $template->param(searchdesc => 1);
610
            }
609
            }
611
            $template->param(results_per_page =>  $results_per_page == $hits ? 'all' : $results_per_page);
610
            $template->param(results_per_page =>  $results_per_page);
612
            # must define a value for size if not present in DB
611
            # must define a value for size if not present in DB
613
            # in order to avoid problems generated by the default size value in TT
612
            # in order to avoid problems generated by the default size value in TT
614
            foreach my $line (@newresults) {
613
            foreach my $line (@newresults) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt (-1 lines)
Lines 371-377 var holdForPatron = function () { Link Here
371
                        [% IF results_per_page == '60' %]<option value="60" selected="selected">60</option>[% ELSE %]<option value="60">60</option>[% END %]
371
                        [% IF results_per_page == '60' %]<option value="60" selected="selected">60</option>[% ELSE %]<option value="60">60</option>[% END %]
372
                        [% IF results_per_page == '80' %]<option value="80" selected="selected">80</option>[% ELSE %]<option value="80">80</option>[% END %]
372
                        [% IF results_per_page == '80' %]<option value="80" selected="selected">80</option>[% ELSE %]<option value="80">80</option>[% END %]
373
                        [% IF results_per_page == '100' %]<option value="100" selected="selected">100</option>[% ELSE %]<option value="100">100</option>[% END %]
373
                        [% IF results_per_page == '100' %]<option value="100" selected="selected">100</option>[% ELSE %]<option value="100">100</option>[% END %]
374
                        [% IF results_per_page == 'all' %]<option value="all" selected="selected">all</option>[% ELSE %]<option value="all">all</option>[% END %]
375
                    </select>
374
                    </select>
376
                <!-- RESULTS_PER_PAGE END -->
375
                <!-- RESULTS_PER_PAGE END -->
377
                    <input type="submit" value="Go" />
376
                    <input type="submit" value="Go" />
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt (-6 / +5 lines)
Lines 148-158 Link Here
148
148
149
                                            <label for="results_per_page">Results per page: </label>
149
                                            <label for="results_per_page">Results per page: </label>
150
                                            <select id="results_per_page" name="results_per_page">
150
                                            <select id="results_per_page" name="results_per_page">
151
                                                <option value="20" [% 'SELECTED' IF results_per_page == '20' %]>20</option>
151
                                                [% IF results_per_page == '20' %]<option value="20" selected="selected">20</option>[% ELSE %]<option value="20">20</option>[% END %]
152
                                                <option value="40" [% 'SELECTED' IF results_per_page == '40' %]>40</option>
152
                                                [% IF results_per_page == '40' %]<option value="40" selected="selected">40</option>[% ELSE %]<option value="40">40</option>[% END %]
153
                                                <option value="60" [% 'SELECTED' IF results_per_page == '60' %]>60</option>
153
                                                [% IF results_per_page == '60' %]<option value="60" selected="selected">60</option>[% ELSE %]<option value="60">60</option>[% END %]
154
                                                <option value="80" [% 'SELECTED' IF results_per_page == '80' %]>80</option>
154
                                                [% IF results_per_page == '80' %]<option value="80" selected="selected">80</option>[% ELSE %]<option value="80">80</option>[% END %]
155
                                                <option value="100" [% 'SELECTED' IF results_per_page == '100' %]>100</option>
155
                                                [% IF results_per_page == '100' %]<option value="100" selected="selected">100</option>[% ELSE %]<option value="100">100</option>[% END %]
156
                                            </select>
156
                                            </select>
157
157
158
                                            <input type="submit" class="btn btn-small clearfix" id="sortsubmit" value="Go" />
158
                                            <input type="submit" class="btn btn-small clearfix" id="sortsubmit" value="Go" />
159
- 

Return to bug 14715