From 0fba84d8e7c68eed73d49865f18a2ce33f3f7948 Mon Sep 17 00:00:00 2001 From: Garry Collum Date: Sat, 18 Dec 2021 20:31:22 -0500 Subject: [PATCH] LP1791791: Google book previews not displaying from a bib linked from a search. The javascript that queries Google Books Preview looks for ISBN(s) wrapped in a rdetail_value class. There was a line of code in which the isbn variable was not enclosed in this class. This patch just wraps that stray variable into a with the class. To test: 0. Use the TPAC skin - this bug does not affect the Bootstrap skin 1. Perform a keyword search for an bib that should have a google book's link. As of March 2023, ISBN 9780786496570 has previews enabled. 2. Go to the bib display and notice that there is no link. 3. Remove the ';query=something' text from the url and notice that the google book information displays. 4. Apply the patch. 5. Perform the same search. The google book information should now display. Signed-off-by: Garry Collum Signed-off-by: Galen Charlton --- Open-ILS/src/templates/opac/parts/record/summary.tt2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/templates/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/opac/parts/record/summary.tt2 index b6e4f25de0..452f987547 100644 --- a/Open-ILS/src/templates/opac/parts/record/summary.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/summary.tt2 @@ -335,7 +335,8 @@ END;
    [%- IF attrs.hl.isbn.size; FOR isbn IN attrs.hl.isbn %]
  • - [% l('ISBN:'); %] [% isbn %] + [% l('ISBN:'); %] + [% isbn | html %]
  • [%- END; ELSIF attrs.isbns.0; FOR isbn IN attrs.isbns; -- 2.11.0