From 89dd33b408b3898db9341c31c1e93ed32bbbe590 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 4 Jul 2022 21:09:05 -0300 Subject: [PATCH] Bug 31106: Fix links generated in XSLTs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch addresses the case of links that are generated on the XSLT side, those linking to and from host records using 773$t and 773$a. To test: 1. Pick a bibliographic record (I chose 'Unconditional' from the sample data 2. Add " and ? to the title statement. I changed it to 'Uncond"itional?¿' 3. Add a child record to it 4. Open the detail page for the host record => FAIL: It doesn't show the 'Show analytics' link 5. Repeat 4 for the same record, in the OPAC => FAIL: It doesn't show the 'Show analytics' link 6. Apply this patch 7. Repeat 4 and 5. => SUCCESS: Links are shown! 8. Follow the links => SUCCESS: The links take you to the right resultset! 9. Go to the child record, and notice the link back to the parent works :-D 10. Sign off :-D Sponsored-by: Theke Solutions Signed-off-by: Tomas Cohen Arazi --- .../en/xslt/MARC21slim2intranetDetail.xsl | 28 ++++++++++++++++-- .../prog/en/xslt/MARC21slimUtils.xsl | 29 +++++++++++++++++++ .../en/xslt/MARC21slim2OPACDetail.xsl | 28 ++++++++++++++++-- .../bootstrap/en/xslt/MARC21slimUtils.xsl | 29 +++++++++++++++++++ 4 files changed, 110 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl index 88f60ae598..acaf38a650 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl @@ -215,7 +215,14 @@ /cgi-bin/koha/catalogue/search.pl?q=rcn:+AND+(bib-level:a+OR+bib-level:b) - /cgi-bin/koha/catalogue/search.pl?q=Host-item:() + + Host-item:( + + + + ) + + /cgi-bin/koha/catalogue/search.pl?q= Show analytics @@ -1083,8 +1090,25 @@ + + ti,phr:( + + + + ) + + AND au:( + + + + + + ) + + - /cgi-bin/koha/catalogue/search.pl?q=ti,phr:+AND+au: + /cgi-bin/koha/catalogue/search.pl?q= + diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl index dfc9cc0186..e3271c85b5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl @@ -578,6 +578,35 @@ + + + " + + + + + + " + + + + + + + + + + \" + + + + + + + + + +