Bugzilla – Attachment 192862 Details for
Bug 39517
Make books be interpreted by MARC21slim2OPACDetail.xsl as 'Book' instead of more generic 'Text'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39517: Make books be interpreted by MARC21slim2OPACDetail.xsl as 'Book' instead of more generic 'Text'
Bug-39517-Make-books-be-interpreted-by-MARC21slim2.patch (text/plain), 2.87 KB, created by
Janusz Kaczmarek
on 2026-02-10 12:42:32 UTC
(
hide
)
Description:
Bug 39517: Make books be interpreted by MARC21slim2OPACDetail.xsl as 'Book' instead of more generic 'Text'
Filename:
MIME Type:
Creator:
Janusz Kaczmarek
Created:
2026-02-10 12:42:32 UTC
Size:
2.87 KB
patch
obsolete
>From f858988448c22aaae300573825d4c50e7734c441 Mon Sep 17 00:00:00 2001 >From: Janusz Kaczmarek <januszop@gmail.com> >Date: Tue, 1 Apr 2025 19:40:28 +0000 >Subject: [PATCH] Bug 39517: Make books be interpreted by > MARC21slim2OPACDetail.xsl as 'Book' instead of more generic 'Text' > >Currently, in OPAC, MARC21slim2OPACDetail.xsl assigns to LDR/6-7 = >'am' a label 'Text' (materialTypeLabel), which is then used in >defining variable schemaOrgType and also for display. The variable >schemaOrgType would be set to 'Book' if materialTypeLabel was 'Book', >but with the current xslt code never will be. Instead >schemaOrgType will be set to a generic type CreativeWork >for 'am'. > >materialTypeLabel is also used for display purposes as >the label next to the material type icon (when >DisplayOPACiconsXSLT enabled). > >Test plan: >========== >1. Make sure that DisplayOPACiconsXSLT is on. >2. In OPAC open any biblio record (e.g. in standard ktd - sn:1). >3. Note "Material type: [icon] Text" info below author line. >4. Edit the record, setting LDR/6-7 = 'am', 008/24-27 (Nature > of contents)=' ' (for No specified nature of contents), > and 008/33 (Literary form)='1' (fiction). >5. Note that the info "Material type: [icon] Text" has not changed. >6. Apply the patch ; restart_all >7. Verify that you get "Material type: [icon] Book" info below author > line. You can also check in browser dev tools that 'typeof' in > schema.org div is set to Book now. >8. Edit the record, 008/24-27='j ' (Patent document), and > 008/33='|' (No attempt to code). >9. Verify that you get "Material type: [icon] Text" info below author > line. > >Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> >--- > .../opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index c4d44a4234..daba885adf 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -77,7 +77,9 @@ > <xsl:when test="$leader19='a'">Set</xsl:when> > <xsl:when test="$leader6='a'"> > <xsl:choose> >- <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">Text</xsl:when> >+ <xsl:when test="$leader7='c' or $leader7='d'">Text</xsl:when> >+ <xsl:when test="$leader7='m' and substring($controlField008,25,4)=' ' and substring($controlField008,34,1)!='|'">Book</xsl:when> >+ <xsl:when test="$leader7='m'">Text</xsl:when> > <xsl:when test="$leader7='i' or $leader7='s'"> > <xsl:choose> > <xsl:when test="substring($controlField008,22,1)!='m'">Continuing resource</xsl:when> >-- >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 39517
:
180229
|
180230
| 192862