Bugzilla – Attachment 27790 Details for
Bug 10486
Allow external Z39.50 targets to be searched from the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED OFF] Bug 10486 - Followup: Give more accurate results and pages count
SIGNED-OFF-Bug-10486---Followup-Give-more-accurate.patch (text/plain), 5.10 KB, created by
Katrin Fischer
on 2014-04-29 21:07:24 UTC
(
hide
)
Description:
[SIGNED OFF] Bug 10486 - Followup: Give more accurate results and pages count
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-04-29 21:07:24 UTC
Size:
5.10 KB
patch
obsolete
>From 5af6832fa8fa4703690c07d1a13fb52201a9548f Mon Sep 17 00:00:00 2001 >From: Jesse Weaver <pianohacker@gmail.com> >Date: Tue, 29 Apr 2014 13:37:42 -0600 >Subject: [PATCH] [SIGNED OFF] Bug 10486 - Followup: Give more accurate results > and pages count > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-external-search.tt | 4 ++-- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt | 2 +- > koha-tmpl/opac-tmpl/prog/en/modules/opac-external-search.tt | 4 ++-- > koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt | 2 +- > 4 files changed, 6 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-external-search.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-external-search.tt >index 1f242c4..cb3f4c4 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-external-search.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-external-search.tt >@@ -172,7 +172,7 @@ function search( offset, reset_search ) { > > $( '#results tbody' ).empty(); > >- $( '#pazpar2-status' ).html( '<strong>' + _("Found __RESULTS__ results in __TARGETS__ external targets.").replace('__RESULTS__', data.total).replace('__TARGETS__', $( '#targets-facet input:checked' ).length ) ); >+ $( '#pazpar2-status' ).html( '<strong>' + _("Found __RESULTS__ results in __TARGETS__ external targets.").replace('__RESULTS__', data.merged).replace('__TARGETS__', $( '#targets-facet input:checked' ).length ) ); > > for ( var i = 0; data.hits[i]; i++ ) { > var hit = data.hits[i]; >@@ -210,7 +210,7 @@ function search( offset, reset_search ) { > > var pages = []; > var cur_page = data.start / results_per_page; >- var max_page = Math.floor( data.total / results_per_page ); >+ var max_page = Math.ceil( data.merged / results_per_page ) - 1; > > if ( cur_page != 0 ) { > pages.push( '<li><a href="#" data-offset="' + (offset - results_per_page) + '"><< ' + _("Previous") + '</a></li>' ); >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >index c4080d0..0c9b322 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >@@ -892,7 +892,7 @@ $(document).ready(function(){ > } > > first_succeeded = true; >- FinishExternalSearch( 'pazpar2', _("Found __LINK__ in __TARGETS__ external targets").replace( '__TARGETS__', num_targets ), data.total, '/cgi-bin/koha/opac-external-search.pl?q=' + escape( querystring ) ); >+ FinishExternalSearch( 'pazpar2', _("Found __LINK__ in __TARGETS__ external targets").replace( '__TARGETS__', num_targets ), data.merged, '/cgi-bin/koha/opac-external-search.pl?q=' + escape( querystring ) ); > } ); > } > [% END %] >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-external-search.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-external-search.tt >index 4fac891..d89fe20 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-external-search.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-external-search.tt >@@ -105,7 +105,7 @@ function search( offset, reset_search ) { > > $( '#results tbody' ).empty(); > >- $( '#pazpar2-status' ).html( '<strong>' + _("Found __RESULTS__ results in __TARGETS__ external targets.").replace('__RESULTS__', data.total).replace('__TARGETS__', $( '#targets-facet input:checked' ).length ) ); >+ $( '#pazpar2-status' ).html( '<strong>' + _("Found __RESULTS__ results in __TARGETS__ external targets.").replace('__RESULTS__', data.merged).replace('__TARGETS__', $( '#targets-facet input:checked' ).length ) ); > > for ( var i = 0; data.hits[i]; i++ ) { > var hit = data.hits[i]; >@@ -145,7 +145,7 @@ function search( offset, reset_search ) { > > var pages = []; > var cur_page = data.start / results_per_page; >- var max_page = Math.floor( data.total / results_per_page ); >+ var max_page = Math.ceil( data.merged / results_per_page ) - 1; > > if ( cur_page != 0 ) { > pages.push( '<a class="nav" href="#" data-offset="' + (offset - results_per_page) + '"><< ' + _("Previous") + '</a>' ); >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt >index dac7211..6f386aa 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt >@@ -320,7 +320,7 @@ $(document).ready(function(){ > } > > first_succeeded = true; >- FinishExternalSearch( 'pazpar2', _("Found __LINK__ in __TARGETS__ external targets").replace( '__TARGETS__', num_targets ), data.total, '/cgi-bin/koha/opac-external-search.pl?q=' + escape( querystring ) ); >+ FinishExternalSearch( 'pazpar2', _("Found __LINK__ in __TARGETS__ external targets").replace( '__TARGETS__', num_targets ), data.merged, '/cgi-bin/koha/opac-external-search.pl?q=' + escape( querystring ) ); > } ); > } > [% END %] >-- >1.8.3.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10486
:
19142
|
19143
|
19226
|
19227
|
19680
|
21687
|
21734
|
22084
|
22540
|
23109
|
23112
|
23113
|
24036
|
24206
|
24207
|
24208
|
25235
|
25236
|
25979
|
26002
|
26017
|
26129
|
26804
|
26988
|
27275
|
27276
|
27438
|
27439
|
27440
|
27559
|
27756
|
27781
|
27783
|
27785
|
27786
|
27787
|
27788
|
27789
| 27790