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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-external-search.tt (-2 / +2 lines)
Lines 172-178 function search( offset, reset_search ) { Link Here
172
172
173
        $( '#results tbody' ).empty();
173
        $( '#results tbody' ).empty();
174
174
175
        $( '#pazpar2-status' ).html( '<strong>' + _("Found __RESULTS__ results in __TARGETS__ external targets.").replace('__RESULTS__', data.total).replace('__TARGETS__', $( '#targets-facet input:checked' ).length ) );
175
        $( '#pazpar2-status' ).html( '<strong>' + _("Found __RESULTS__ results in __TARGETS__ external targets.").replace('__RESULTS__', data.merged).replace('__TARGETS__', $( '#targets-facet input:checked' ).length ) );
176
176
177
        for ( var i = 0; data.hits[i]; i++ ) {
177
        for ( var i = 0; data.hits[i]; i++ ) {
178
            var hit = data.hits[i];
178
            var hit = data.hits[i];
Lines 210-216 function search( offset, reset_search ) { Link Here
210
210
211
        var pages = [];
211
        var pages = [];
212
        var cur_page = data.start / results_per_page;
212
        var cur_page = data.start / results_per_page;
213
        var max_page = Math.floor( data.total / results_per_page );
213
        var max_page = Math.ceil( data.merged / results_per_page ) - 1;
214
214
215
        if ( cur_page != 0 ) {
215
        if ( cur_page != 0 ) {
216
            pages.push( '<li><a href="#" data-offset="' + (offset - results_per_page) + '">&lt;&lt; ' + _("Previous") + '</a></li>' );
216
            pages.push( '<li><a href="#" data-offset="' + (offset - results_per_page) + '">&lt;&lt; ' + _("Previous") + '</a></li>' );
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt (-1 / +1 lines)
Lines 892-898 $(document).ready(function(){ Link Here
892
                }
892
                }
893
893
894
                first_succeeded = true;
894
                first_succeeded = true;
895
                FinishExternalSearch( 'pazpar2', _("Found __LINK__ in __TARGETS__ external targets").replace( '__TARGETS__', num_targets ), data.total, '/cgi-bin/koha/opac-external-search.pl?q=' + escape( querystring ) );
895
                FinishExternalSearch( 'pazpar2', _("Found __LINK__ in __TARGETS__ external targets").replace( '__TARGETS__', num_targets ), data.merged, '/cgi-bin/koha/opac-external-search.pl?q=' + escape( querystring ) );
896
            } );
896
            } );
897
        }
897
        }
898
    [% END %]
898
    [% END %]
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-external-search.tt (-2 / +2 lines)
Lines 105-111 function search( offset, reset_search ) { Link Here
105
105
106
        $( '#results tbody' ).empty();
106
        $( '#results tbody' ).empty();
107
107
108
        $( '#pazpar2-status' ).html( '<strong>' + _("Found __RESULTS__ results in __TARGETS__ external targets.").replace('__RESULTS__', data.total).replace('__TARGETS__', $( '#targets-facet input:checked' ).length ) );
108
        $( '#pazpar2-status' ).html( '<strong>' + _("Found __RESULTS__ results in __TARGETS__ external targets.").replace('__RESULTS__', data.merged).replace('__TARGETS__', $( '#targets-facet input:checked' ).length ) );
109
109
110
        for ( var i = 0; data.hits[i]; i++ ) {
110
        for ( var i = 0; data.hits[i]; i++ ) {
111
            var hit = data.hits[i];
111
            var hit = data.hits[i];
Lines 145-151 function search( offset, reset_search ) { Link Here
145
145
146
        var pages = [];
146
        var pages = [];
147
        var cur_page = data.start / results_per_page;
147
        var cur_page = data.start / results_per_page;
148
        var max_page = Math.floor( data.total / results_per_page );
148
        var max_page = Math.ceil( data.merged / results_per_page ) - 1;
149
149
150
        if ( cur_page != 0 ) {
150
        if ( cur_page != 0 ) {
151
            pages.push( '<a class="nav" href="#" data-offset="' + (offset - results_per_page) + '">&lt;&lt; ' + _("Previous") + '</a>' );
151
            pages.push( '<a class="nav" href="#" data-offset="' + (offset - results_per_page) + '">&lt;&lt; ' + _("Previous") + '</a>' );
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt (-2 / +1 lines)
Lines 320-326 $(document).ready(function(){ Link Here
320
                }
320
                }
321
321
322
                first_succeeded = true;
322
                first_succeeded = true;
323
                FinishExternalSearch( 'pazpar2', _("Found __LINK__ in __TARGETS__ external targets").replace( '__TARGETS__', num_targets ), data.total, '/cgi-bin/koha/opac-external-search.pl?q=' + escape( querystring ) );
323
                FinishExternalSearch( 'pazpar2', _("Found __LINK__ in __TARGETS__ external targets").replace( '__TARGETS__', num_targets ), data.merged, '/cgi-bin/koha/opac-external-search.pl?q=' + escape( querystring ) );
324
            } );
324
            } );
325
        }
325
        }
326
    [% END %]
326
    [% END %]
327
- 

Return to bug 10486