From 48c0e8952a46a5a3eef6cae138c88b1ae22b0986 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 8 Nov 2017 10:06:49 -0300 Subject: [PATCH] Bug 17602: Handle '60+' if there are more than 60 results The service returns "60+" if there are more than 60 results. Without this patch the "Found %s results in RecordedBooks collection" line is removed. Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 0bab09f1da..d22685b483 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt @@ -913,7 +913,8 @@ $(document).ready(function(){ return; } - if ( data.total > 0 ) { + // data.total can be either 42 or "60+" + if ( typeof(data.total) === 'string' && data.total.charAt(0) > 0 || typeof(data.total) === 'number' && data.total > 0 ) { $recordedbooks_results.html( _( "Found %s results in RecordedBooks collection" ).format('' + data.total + '') ); } else { $recordedbooks_results.remove(); -- 2.39.5