From a2f8311234a1a6aa76641ec4f6b8f05a10cd6dd6 Mon Sep 17 00:00:00 2001 From: Hammat Wele Date: Tue, 28 Mar 2023 16:31:34 +0000 Subject: [PATCH] Bug 27428: (QA follow-up) Add missing POD, remove ES template literals in opac-display-record-count.js --- Koha/SearchEngine/Elasticsearch/Browse.pm | 8 ++++++++ .../opac-tmpl/bootstrap/en/includes/doc-head-close.inc | 2 +- .../opac-tmpl/bootstrap/js/opac-display-record-count.js | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Koha/SearchEngine/Elasticsearch/Browse.pm b/Koha/SearchEngine/Elasticsearch/Browse.pm index 5d4282ed2f..14e1d1b0f9 100644 --- a/Koha/SearchEngine/Elasticsearch/Browse.pm +++ b/Koha/SearchEngine/Elasticsearch/Browse.pm @@ -175,6 +175,14 @@ sub _build_query_count_record { return $query; } +=head2 count_record + + $result = $browser->count_record($ses); + +Return an arrayref of record counts + +=cut + sub count_record { my ($self, $cgi_q) = @_; my @results_return; diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc index e8a66a4ba5..4c2e546e9d 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc @@ -44,7 +44,7 @@ [% END %] [% IF ( Koha.Preference('OPACDisplayRecordCount') ) %] - [% Asset.js("js/opac-display-record-count.js") %] + [% Asset.js("js/opac-display-record-count.js") | $raw %] [% END %] [% IF SCO_login %] [% SET SCOUserCSS = Koha.Preference('SCOUserCSS') %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/opac-display-record-count.js b/koha-tmpl/opac-tmpl/bootstrap/js/opac-display-record-count.js index 47265534f3..7fc68f19f0 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/js/opac-display-record-count.js +++ b/koha-tmpl/opac-tmpl/bootstrap/js/opac-display-record-count.js @@ -46,7 +46,7 @@ var not_symbols = { function NumberResultsRecord(){ - var regex = `a[href*="${regex_es_link}"]`; + var regex = 'a[href*="${' + regex_es_link + '}"]'; var all_link = $(regex); /* array json data to server */ var json_data=[]; -- 2.34.1