Bug 34180: Template variable in JavaScript prevents authority MARC preview from displ...
authorOwen Leonard <oleonard@myacpl.org>
Wed, 16 Nov 2022 12:10:16 +0000 (12:10 +0000)
committerMatt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Tue, 18 Jul 2023 13:13:43 +0000 (13:13 +0000)
commitab3e4095fe963f597c6fe0e0e939b7849b9d6b2d
tree016a203517d3b744f454bf459fc7609c22fedb6d
parentdce1c4f942307f39441d44109b20939c43da0b29
Bug 34180: Template variable in JavaScript prevents authority MARC preview from displaying

Since template variables cannot be processed by JS, we must use a
template to declare a JS variable which the JS file can used. This patch
corrects this problem in the JS file which handles display of the
authority MARC preview from the authority search results page.

To test, apply the patch and go to Authorities.

- Perform a search which will return multiple authority results.
- Click "Actions -> MARC preview." The preview should display correctly.
- Click "Actions -> MARC preview" on another search result. This preview
  should also look correct.
- There should be no JavaScript errors in the browser console.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6d433ffa8931487c967ec01c483e9bb13eb5700b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 955d3a53e7c1c3a29c82d7fb8754875559c05c32)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
koha-tmpl/intranet-tmpl/prog/en/includes/authorities_js.inc
koha-tmpl/intranet-tmpl/prog/js/authorities-detail-modal.js