From 8029a5c6c02e8f33be8f37bc230ef61714f06222 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 | 24 +++++++++++++-- .../prog/en/xslt/MARC21slimUtils.xsl | 30 +++++++++++++++++++ .../en/xslt/MARC21slim2OPACDetail.xsl | 24 +++++++++++++-- .../bootstrap/en/xslt/MARC21slimUtils.xsl | 30 +++++++++++++++++++ 4 files changed, 104 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..8587667d30 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl @@ -215,7 +215,12 @@ /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:() + + + + + + /cgi-bin/koha/catalogue/search.pl?q=Host-item:("") Show analytics @@ -1083,8 +1088,23 @@ + + + + + + + + + + + + + + - /cgi-bin/koha/catalogue/search.pl?q=ti,phr:+AND+au: + /cgi-bin/koha/catalogue/search.pl?q=ti,phr:("")+AND+au:("") + diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl index dfc9cc0186..18f9f453a3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl @@ -578,6 +578,36 @@ + + + + + + + + + + + + + + + + + + + + \" + + + + + + + + + +