Bugzilla – Attachment 188311 Details for
Bug 41081
Link from 856$u points to http://%20%20%20%20
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41081: Remove spaces around 856$u in results and detail xslt
Bug-41081-Remove-spaces-around-856u-in-results-and.patch (text/plain), 4.29 KB, created by
Marcel de Rooy
on 2025-10-23 09:03:26 UTC
(
hide
)
Description:
Bug 41081: Remove spaces around 856$u in results and detail xslt
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2025-10-23 09:03:26 UTC
Size:
4.29 KB
patch
obsolete
>From 1be645eba8d0d0b8a20a1ec953d817bbe006a69c Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 23 Oct 2025 10:57:58 +0200 >Subject: [PATCH] Bug 41081: Remove spaces around 856$u in results and detail > xslt >Content-Type: text/plain; charset=utf-8 > >This patch does prevent creating useless links built on spaces like >http://%20%20%20%20 on the bug report. >A next step would be to stop preventing to create them when validating >during cataloguing. > >Test plan: >Check without patch. >Create biblio with 856u having just a few spaces. >Verify that you see a useless Online resources link on OPAC or intranet >(detail and results). >Apply patch. >Restart all. Verify that you do not see the link anymore. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl | 2 +- > .../intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl | 2 +- > koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 2 +- > .../opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl | 2 +- > 4 files changed, 4 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 70adb5ffbc..5c8f8bbae7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -946,7 +946,7 @@ > </xsl:if> > > <xsl:if test="marc:datafield[@tag=856]"> >- <xsl:if test="marc:datafield[@tag=856]/marc:subfield[@code='u']"> >+ <xsl:if test="normalize-space(marc:datafield[@tag=856]/marc:subfield[@code='u'])"> > <span class="results_summary online_resources"><span class="label">Online resources: </span> > <xsl:for-each select="marc:datafield[@tag=856 and marc:subfield[@code='u']]"> > <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >index b03a8c1f9d..2b4d8eb918 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >@@ -978,7 +978,7 @@ > </xsl:call-template> > > <xsl:if test="marc:datafield[@tag=856]"> >- <xsl:if test="marc:datafield[@tag=856]/marc:subfield[@code='u']"> >+ <xsl:if test="normalize-space(marc:datafield[@tag=856]/marc:subfield[@code='u'])"> > <span class="results_summary online_resources"> > <span class="label">Online resources: </span> > <xsl:for-each select="marc:datafield[@tag=856 and marc:subfield[@code='u']]"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index 5d09a54b97..2d5c76607c 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -1065,7 +1065,7 @@ > > <!-- Image processing code added here, takes precedence over text links including y3z text --> > <xsl:if test="marc:datafield[@tag=856]"> >- <xsl:if test="marc:datafield[@tag=856]/marc:subfield[@code='u']"> >+ <xsl:if test="normalize-space(marc:datafield[@tag=856]/marc:subfield[@code='u'])"> > <span class="results_summary online_resources"> > <span class="label">Online resources: </span> > <ul class="resource_list"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >index 96acfdced1..9da8f22543 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >@@ -1187,7 +1187,7 @@ > </xsl:call-template> > > <xsl:if test="marc:datafield[@tag=856]"> >- <xsl:if test="marc:datafield[@tag=856]/marc:subfield[@code='u']"> >+ <xsl:if test="normalize-space(marc:datafield[@tag=856]/marc:subfield[@code='u'])"> > <div class="results_summary online_resources"> > <span class="label">Online resources: </span> > <ul class="resource_list"> >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41081
: 188311