Bugzilla – Attachment 170576 Details for
Bug 36111
Online resource link should be based on the presence of 856$u (MARC21)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36111: 856 should not appear as a link in detailed record
Bug-36111-856-should-not-appear-as-a-link-in-detai.patch (text/plain), 7.80 KB, created by
Hammat wele
on 2024-08-21 19:08:40 UTC
(
hide
)
Description:
Bug 36111: 856 should not appear as a link in detailed record
Filename:
MIME Type:
Creator:
Hammat wele
Created:
2024-08-21 19:08:40 UTC
Size:
7.80 KB
patch
obsolete
>From 90dd0849ca0664dfe2cad9184dcb51106409d632 Mon Sep 17 00:00:00 2001 >From: Hammat Wele <hammat.wele@inlibro.com> >Date: Wed, 21 Aug 2024 19:08:11 +0000 >Subject: [PATCH] Bug 36111: 856 should not appear as a link in detailed record > >Test plan: >1. Add 856 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 > 2.1. Go to Cataloging > 2.2. Click New record > 2.3. Fill out the mandatory fields (000, 003, 005, 008, 040, > 245, 942) > 2.4. Go to tab 8 and enter a value in 856 > 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. Edit the item and add a text in field 856 >8. Access the detailed record in the staff interface > --> Notice it says what you put in 856 field >9. Apply the patch >10. Replay steps 3 through 6, but this time, the "Online resources" > field should not be present. >11. Replay steps 7 through 8, but this time, what you put in 856 > field should not be present. >12. Edit the item and add a url in field 856 >13. Replay steps 3 through 6, but this time, clicking on the link > should take you to the URL specified in the 856 field. >14. Replay steps 7 through 8, but this time, what you put in 856 > field should be present and > clicking on the link should take you to the URL specified in the 856 field. > >Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: David Nind <david@davidnind.com> > >Bug 36111: fixed extra space > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: David Nind <david@davidnind.com> > >Bug 36111: online resource link should be based on the presence of 856 > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl | 4 +++- > .../intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl | 4 +++- > .../opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 4 +++- > .../opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl | 4 +++- > 4 files changed, 12 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 36b01059b0..1f255b10f1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -921,8 +921,9 @@ > </xsl:if> > > <xsl:if test="marc:datafield[@tag=856]"> >+ <xsl:if test="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]"> >+ <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> > <a> > <xsl:attribute name="href"> >@@ -961,6 +962,7 @@ > > </xsl:for-each> > </span> >+ </xsl:if> > </xsl:if> > > <!-- 505 - Formatted contents note --> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >index 16a423e421..e40e94a435 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >@@ -978,9 +978,10 @@ > </xsl:call-template> > > <xsl:if test="marc:datafield[@tag=856]"> >+ <xsl:if test="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]"> >+ <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> > <a> > <xsl:attribute name="href"> >@@ -1018,6 +1019,7 @@ > </xsl:choose> > </xsl:for-each> > </span> >+ </xsl:if> > </xsl:if> > > <!-- Content Warning --> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index 515f954345..80886efec0 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -1038,10 +1038,11 @@ > > <!-- 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']"> > <span class="results_summary online_resources"> > <span class="label">Online resources: </span> > <ul class="resource_list"> >- <xsl:for-each select="marc:datafield[@tag=856]"> >+ <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> > <li> > <a property="url"> >@@ -1087,6 +1088,7 @@ > </xsl:for-each> > </ul> > </span> >+ </xsl:if> > </xsl:if> > > <!-- 787 Other Relationship Entry --> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >index c2ebe9c7d9..02e89e6473 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >@@ -1216,10 +1216,11 @@ > </xsl:if> > > <xsl:if test="marc:datafield[@tag=856]"> >+ <xsl:if test="marc:datafield[@tag=856]/marc:subfield[@code='u']"> > <div class="results_summary online_resources"> > <span class="label">Online resources: </span> > <ul class="resource_list"> >- <xsl:for-each select="marc:datafield[@tag=856]"> >+ <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> > <xsl:if test="$OPACURLOpenInNewWindow='0'"> > <li><a> >@@ -1302,6 +1303,7 @@ > </ul> > </div> > </xsl:if> >+ </xsl:if> > > <!-- Availability line --> > <div class="results_summary availability"> >-- >2.34.1
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 36111
:
162322
|
162405
|
162406
|
163876
|
164029
|
164151
|
164275
|
164276
|
164429
|
164430
|
164476
|
165236
|
165335
|
165346
|
165347
|
165355
|
165356
|
165688
|
165709
|
165710
|
165711
|
170437
|
170471
|
170474
| 170576