Browse Source

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.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22.11.x
Martin Renvoize 2 years ago
committed by Tomas Cohen Arazi
parent
commit
23bce125ea
Signed by: tomascohen GPG Key ID: 0A272EA1B2F3C15F
  1. 8
      koha-tmpl/intranet-tmpl/prog/en/includes/js-biblio-format.inc

8
koha-tmpl/intranet-tmpl/prog/en/includes/js-biblio-format.inc

@ -23,7 +23,7 @@
// add subtitle
if (biblio.subtitle != null && biblio.subtitle != '') {
title += '<span class="biblio-subtitle">' + escape_str(biblio.subtitle) + '</span>';
title += ' <span class="biblio-subtitle">' + escape_str(biblio.subtitle) + '</span>';
}
// set title as link
@ -41,7 +41,7 @@
// add medium
if (biblio.medium != null && biblio.medium != '') {
title += '<span class="biblio-medium">' + escape_str(biblio.medium) + '</span>';
title += ' <span class="biblio-medium">' + escape_str(biblio.medium) + '</span>';
}
// add part numbers/names
@ -50,10 +50,10 @@
let i = 0;
while (part_numbers[i] || part_names[i]) {
if (part_numbers[i]) {
title += '<span class="part-number">' + escape_str(part_numbers[i]) + '</span>';
title += ' <span class="part-number">' + escape_str(part_numbers[i]) + '</span>';
}
if (part_names[i]) {
title += '<span class="part-name">' + escape_str(part_name[i]) + '</span>';
title += ' <span class="part-name">' + escape_str(part_names[i]) + '</span>';
}
i++;
}

Loading…
Cancel
Save