From 0c939014000b3eca25b75a9be173a47a9e348ce7 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 Signed-off-by: Petro Vashchuk --- 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 33458f7a93..1ba2a3a063 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 @@ -45,7 +45,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.41.0