From 06d945794fca67c693c1691e1d38e39643fbe500 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Tue, 16 Aug 2011 16:44:16 -0400 Subject: [PATCH] Address ISBN issues in T-PAC A few problems fixed here: * Refer to args.isbns (plural) consistently; at times we were referring to args.isbn which did not exist * Grab the textContent of the SFX ISBN node rather than the raw XML::LibXML Element * Use an assignment operation when regex'ing the SFX ISBN, as the in-place was interpreted as a "print me" stmt and displaying the raw SFX ISBN. Signed-off-by: Dan Scott --- Open-ILS/src/templates/default/opac/parts/misc_util.tt2 | 6 +++--- Open-ILS/src/templates/default/opac/parts/result/table.tt2 | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/templates/default/opac/parts/misc_util.tt2 b/Open-ILS/src/templates/default/opac/parts/misc_util.tt2 index 48eea03573..346b32b584 100644 --- a/Open-ILS/src/templates/default/opac/parts/misc_util.tt2 +++ b/Open-ILS/src/templates/default/opac/parts/misc_util.tt2 @@ -29,7 +29,7 @@ args.marc_cn = xml.findnodes('//*[@tag="092" or @tag="099"]/*').textContent; # clean up the ISBN - args.isbn_clean = args.isbn.0.replace('\ .*', ''); + args.isbn_clean = args.isbns.0.replace('\ .*', ''); args.holdings = []; args.uris = []; @@ -40,8 +40,8 @@ IF sfx_isbn; IF sfx_isbn.textContent == "SFX"; my_parent = sfx_isbn.parentNode(); - sfx_isbn = my_parent.findnodes('./*[@code="a"]'); - sfx_isbn.replace('-', ''); + sfx_isbn = my_parent.findnodes('./*[@code="a"]').textContent; + sfx_isbn = sfx_isbn.replace('-', ''); args.resolver_isbn = sfx_isbn.replace('\ .*', ''); END; END; diff --git a/Open-ILS/src/templates/default/opac/parts/result/table.tt2 b/Open-ILS/src/templates/default/opac/parts/result/table.tt2 index e6343d42b6..07fe359f10 100644 --- a/Open-ILS/src/templates/default/opac/parts/result/table.tt2 +++ b/Open-ILS/src/templates/default/opac/parts/result/table.tt2 @@ -89,7 +89,7 @@ [% attrs.publisher; %] [% END %] - [% IF attrs.isbn.0 %] + [% IF attrs.isbns.size > 0 %] [% l('ISBN:') %] -- 2.43.2