From dd4852f92a782cd8e8273e8bcb1c1826a1a52f49 Mon Sep 17 00:00:00 2001 From: Matthias Le Gac Date: Tue, 20 Feb 2024 16:52:50 -0500 Subject: [PATCH] Bug 36111: 856$h should not appear as a link in detailed record The newish MARC21 field 856$h is used to store non-functioning URLs. However, if a record has data in 856$h (or any 856 subfield), a link "Click here to access online" appears in the search results list and detailed record in the OPAC and the staff interface. This patch fixes this so that URLs in 856$h are not displayed in the search results and record details pages. Test plan: 1. Add 856$h to MARC editor 1.1. Go to Administration > MARC bibliographic frameworks 1.2. Next to Default framework, click Actions > MARC structure 1.3. Search for field 856 1.4. Click Actions > Edit subfields 1.5. Click h 1.6. Check the Editor box 1.7. Click Save changes 2. Catalog a new record with a random URL in 856$h 2.1. Go to Cataloging 2.2. Click New record 2.3. Fill out the mandatory fields (000, 003, 005, 008, 040$c, 245$a, 942$c) 2.4. Go to tab 8 and enter a value in 856$h 2.5. Click Save (No need to add an item) 3. Search for the title in the staff interface (a large enough search to have more than one result) --> Notice it says "Online resources: Click here to access online" 3.1. Try to click the link --> Blank page 4. Access the detailed record in the staff interface --> Notice it says "Online resources: Click here to access online" 4.1. Try to click the link --> Blank page 5. Search for the title in the opac (a large enough search to have more than one result) --> Notice it says "Online resources: Click here to access online" 5.1. Try to click the link --> Blank page 6. Access the detailed record in the opac --> Notice it says "Online resources: Click here to access online" 6.1. Try to click the link --> Blank page 7. Apply the patch 8. Replay steps 3 through 6, but this time, the "Online resources" field should not be present. 9. Edit the item and add a url in field 856$u 10. Replay steps 3 through 6, but this time, clicking on the link should take you to the URL specified in the 856$u field. Signed-off-by: David Nind --- .../en/xslt/MARC21slim2intranetDetail.xsl | 84 ++++---- .../en/xslt/MARC21slim2intranetResults.xsl | 25 ++- .../en/xslt/MARC21slim2OPACDetail.xsl | 96 ++++++---- .../en/xslt/MARC21slim2OPACResults.xsl | 179 ++++++++++-------- 4 files changed, 216 insertions(+), 168 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl index 48439f3a24..f90a9c37a6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl @@ -921,46 +921,56 @@ - Online resources: - - - - - - - - - - - - - - 100 - - - - y3z - - - + + + + + + + + Online resources: + + + + + + + + + + + + + pointer-events: none; color: #202020; + - - + + 100 + + + + y3z + + + + + + + + + Click here to access online + + - - Click here to access online - - - - - - - | - - - - + + + + | + + + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl index 16a423e421..3869b0e9c2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl @@ -978,8 +978,13 @@ - - Online resources: + + + + + + + Online resources: @@ -991,8 +996,11 @@ + + pointer-events: none; color: #202020; + - + 100 @@ -1005,19 +1013,20 @@ - + Click here to access online - + - - | + + | - + + diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl index 3fe783b615..c29f883572 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl @@ -1038,56 +1038,70 @@ - - Online resources: - + + + + + + | + + + diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl index c2ebe9c7d9..532825938c 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl @@ -1216,92 +1216,107 @@ - - + + + + + + + | + + + + +
-- 2.30.2