From 4397dbff5782b6aebbf010d7bdc9bb09512946c5 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 4 Jul 2022 11:49:00 +0100 Subject: [PATCH] Bug 31083: Fix part_name handling in js-biblio-format This patch corrects the typo introduced in bug 28854 for part_name handling in the js-biblio-format include. We also introduce proper whitespace addition when concatenating subtitle, medium and parts to the title string. --- .../intranet-tmpl/prog/en/includes/js-biblio-format.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/js-biblio-format.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/js-biblio-format.inc index fe43954c22..f953337856 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/js-biblio-format.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/js-biblio-format.inc @@ -23,7 +23,7 @@ // add subtitle if (biblio.subtitle != null && biblio.subtitle != '') { - title += '' + escape_str(biblio.subtitle) + ''; + title += ' ' + escape_str(biblio.subtitle) + ''; } // set title as link @@ -41,7 +41,7 @@ // add medium if (biblio.medium != null && biblio.medium != '') { - title += '' + escape_str(biblio.medium) + ''; + title += ' ' + escape_str(biblio.medium) + ''; } // add part numbers/names @@ -50,10 +50,10 @@ let i = 0; while (part_numbers[i] || part_names[i]) { if (part_numbers[i]) { - title += '' + escape_str(part_numbers[i]) + ''; + title += ' ' + escape_str(part_numbers[i]) + ''; } if (part_names[i]) { - title += '' + escape_str(part_name[i]) + ''; + title += ' ' + escape_str(part_names[i]) + ''; } i++; } -- 2.20.1