From 3b199eb5266b8827d31b07d2c757c8893b10391a 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 --- 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 ca6e444cc3..1c11dc3bb0 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.11.0