[Bug 35305] New: Add XSLT for authority detail page in staff interface
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 Bug ID: 35305 Summary: Add XSLT for authority detail page in staff interface Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: MARC Authority data support Assignee: koha-bugs@lists.koha-community.org Reporter: fridolin.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org Like Bug 11083 for result display, allow XSLT for details display in staff interface -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=21330 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=11083 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |fridolin.somers@biblibre.co |ity.org |m -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add XSLT for authority |Add XSLT for authority |detail page in staff |details page in staff |interface |interface -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 --- Comment #1 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 158772 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158772&action=edit Bug 35305: Add XSLT for authority details page in staff interface This adds a new system preference 'AuthorityXSLTDetailsDisplay'. If set, authority MARCXML will be transformed using the XSLT at the given filename or URL. The HTML output will be displayed in place of tabs in details page. The syspref value can contain {langcode} and {authtypecode} which will be replaced by the appropriate value (resp. current language and authority type code). Test plan: 1) Apply patch and run updatedatabase 2) Search for an authority type GEOGR_NAME and view details page 3) Verify that display is not affected yet 4) Create an XSLT file (for example in /home/koha/xslt/en/GEOGR_NAME.xsl) 5) Set 'AuthorityXSLTDetailsDisplay' syspref value to : /home/koha/xslt/{langcode}/{authtypecode}.xsl 6) Refresh details page 7) Verify that display matches what you expect from your XSLT 8) Go to an authority of another type 9) Verify that the default display is used Example of a minimal XSLT: <?xml version='1.0' encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output omit-xml-declaration="yes"/> <xsl:template match="marc:record"> <xsl:element name="div"> <xsl:attribute name="class"> <xsl:text>authority-summary</xsl:text> </xsl:attribute> <xsl:value-of select="marc:datafield[@tag='151']/marc:subfield[@code='a']"/> </xsl:element> </xsl:template> </xsl:stylesheet> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 --- Comment #2 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 158775 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158775&action=edit Bug 35305: Add sample XSLT for UNIMARC authorities Also creates UNIMARCauthUtils.xsl to share templates with UNIMARCauthResults.xsl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 --- Comment #3 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 158781 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158781&action=edit Bug 35305: (follow-up) Fix identing -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 Matthias Le Gac <matthias.le-gac@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |matthias.le-gac@inlibro.com --- Comment #4 from Matthias Le Gac <matthias.le-gac@inlibro.com> --- The display match with the XSLT for type GEOGR_NAME but for the other types the default display isn't use, it's the XSLT display who is using. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 --- Comment #5 from Fridolin Somers <fridolin.somers@biblibre.com> --- (In reply to Matthias Le Gac from comment #4)
The display match with the XSLT for type GEOGR_NAME but for the other types the default display isn't use, it's the XSLT display who is using.
Hi, could you explain more please ? Using a XSLT file only for GEOGR_NAME is just an example, you may create a file per authority type or for UNIMARC use the sample file. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 --- Comment #6 from Matthias Le Gac <matthias.le-gac@inlibro.com> --- (In reply to Fridolin Somers from comment #5)
(In reply to Matthias Le Gac from comment #4)
The display match with the XSLT for type GEOGR_NAME but for the other types the default display isn't use, it's the XSLT display who is using.
Hi, could you explain more please ?
Using a XSLT file only for GEOGR_NAME is just an example, you may create a file per authority type or for UNIMARC use the sample file.
What I meant was that when I go to the details of a GEOGR_NAME authority it looks just like what I specified in the XSL but it also has an impact on the details page of a PERSO_NAME authority and if I've understood the test plan correctly it shouldn't. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- (In reply to Matthias Le Gac from comment #6)
(In reply to Fridolin Somers from comment #5)
(In reply to Matthias Le Gac from comment #4)
The display match with the XSLT for type GEOGR_NAME but for the other types the default display isn't use, it's the XSLT display who is using.
Hi, could you explain more please ?
Using a XSLT file only for GEOGR_NAME is just an example, you may create a file per authority type or for UNIMARC use the sample file.
What I meant was that when I go to the details of a GEOGR_NAME authority it looks just like what I specified in the XSL but it also has an impact on the details page of a PERSO_NAME authority and if I've understood the test plan correctly it shouldn't.
Aaah OK, the test plan is wrong ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158772|0 |1 is obsolete| | Attachment #158775|0 |1 is obsolete| | Attachment #158781|0 |1 is obsolete| | --- Comment #8 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 167302 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=167302&action=edit Bug 35305: Add XSLT for authority details page in staff interface This adds a new system preference 'AuthorityXSLTDetailsDisplay'. If set, authority MARCXML will be transformed using the XSLT at the given filename or URL. The HTML output will be displayed in place of tabs in details page. The syspref value can contain {langcode} and {authtypecode} which will be replaced by the appropriate value (resp. current language and authority type code). Test plan: 1) Apply patch and run updatedatabase 2) Search for an authority type GEOGR_NAME and view details page 3) Verify that display is not affected yet 4) Create an XSLT file (for example in /home/koha/xslt/en/GEOGR_NAME.xsl) 5) Set 'AuthorityXSLTDetailsDisplay' system preference to : /home/koha/xslt/{langcode}/{authtypecode}.xsl 6) Refresh details page 7) Verify that display matches what you expect from the XSLT 8) Set 'AuthorityXSLTDetailsDisplay' system preference to : <path to sources>/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCauthDetails.xsl 8) Refresh details page 9) Verify that display matches what you expect from your XSLT Example of a minimal XSLT: <?xml version='1.0' encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output omit-xml-declaration="yes"/> <xsl:template match="marc:record"> <xsl:element name="div"> <xsl:attribute name="class"> <xsl:text>authority-summary</xsl:text> </xsl:attribute> <xsl:value-of select="marc:datafield[@tag='151']/marc:subfield[@code='a']"/> </xsl:element> </xsl:template> </xsl:stylesheet> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 --- Comment #9 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 167303 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=167303&action=edit Bug 35305: Add sample XSLT for UNIMARC authorities details page Also creates UNIMARCauthUtils.xsl to share templates with UNIMARCauthResults.xsl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #167303|0 |1 is obsolete| | --- Comment #10 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 167304 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=167304&action=edit Bug 35305: Add sample XSLT for UNIMARC authorities details page Also creates UNIMARCauthUtils.xsl to share templates with UNIMARCauthResults.xsl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 --- Comment #11 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 167305 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=167305&action=edit Bug 35305: (follow-up) Fix identing -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 --- Comment #12 from Fridolin Somers <fridolin.somers@biblibre.com> --- Test plan changed to test also with the sample XSLT file -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #167302|0 |1 is obsolete| | --- Comment #13 from David Nind <david@davidnind.com> --- Created attachment 167362 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=167362&action=edit Bug 35305: Add XSLT for authority details page in staff interface This adds a new system preference 'AuthorityXSLTDetailsDisplay'. If set, authority MARCXML will be transformed using the XSLT at the given filename or URL. The HTML output will be displayed in place of tabs in details page. The syspref value can contain {langcode} and {authtypecode} which will be replaced by the appropriate value (resp. current language and authority type code). Test plan: 1) Apply patch and run updatedatabase 2) Search for an authority type GEOGR_NAME and view details page 3) Verify that display is not affected yet 4) Create an XSLT file (for example in /home/koha/xslt/en/GEOGR_NAME.xsl) 5) Set 'AuthorityXSLTDetailsDisplay' system preference to : /home/koha/xslt/{langcode}/{authtypecode}.xsl 6) Refresh details page 7) Verify that display matches what you expect from the XSLT 8) Set 'AuthorityXSLTDetailsDisplay' system preference to : <path to sources>/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCauthDetails.xsl 8) Refresh details page 9) Verify that display matches what you expect from your XSLT Example of a minimal XSLT: <?xml version='1.0' encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output omit-xml-declaration="yes"/> <xsl:template match="marc:record"> <xsl:element name="div"> <xsl:attribute name="class"> <xsl:text>authority-summary</xsl:text> </xsl:attribute> <xsl:value-of select="marc:datafield[@tag='151']/marc:subfield[@code='a']"/> </xsl:element> </xsl:template> </xsl:stylesheet> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #167304|0 |1 is obsolete| | --- Comment #14 from David Nind <david@davidnind.com> --- Created attachment 167363 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=167363&action=edit Bug 35305: Add sample XSLT for UNIMARC authorities details page Also creates UNIMARCauthUtils.xsl to share templates with UNIMARCauthResults.xsl Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #167305|0 |1 is obsolete| | --- Comment #15 from David Nind <david@davidnind.com> --- Created attachment 167364 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=167364&action=edit Bug 35305: (follow-up) Fix identing Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This enhancement enables release notes| |using custom XSLT | |stylesheets to display | |authority detail pages in | |the staff interface. | | | |Enter a path to the custom | |XSLT file in the new system | |preference | |AuthorityXSLTDetailsDisplay | |(or use an external URL). | |Use placeholders for | |multiple custom style | |sheets for different | |languages ({langcode}) and | |authority types | |({authtypecode}). | | | |(Note: | |This ability is already | |available for the OPAC. It | |was added by bug 21330 to | |Koha 23.05 and 22.11.07). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #167362|0 |1 is obsolete| | --- Comment #16 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 173439 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173439&action=edit Bug 35305: Add XSLT for authority details page in staff interface This adds a new system preference 'AuthorityXSLTDetailsDisplay'. If set, authority MARCXML will be transformed using the XSLT at the given filename or URL. The HTML output will be displayed in place of tabs in details page. The syspref value can contain {langcode} and {authtypecode} which will be replaced by the appropriate value (resp. current language and authority type code). Test plan: 1) Apply patch and run updatedatabase 2) Search for an authority type GEOGR_NAME and view details page 3) Verify that display is not affected yet 4) Create an XSLT file (for example in /home/koha/xslt/en/GEOGR_NAME.xsl) 5) Set 'AuthorityXSLTDetailsDisplay' system preference to : /home/koha/xslt/{langcode}/{authtypecode}.xsl 6) Refresh details page 7) Verify that display matches what you expect from the XSLT 8) Set 'AuthorityXSLTDetailsDisplay' system preference to : <path to sources>/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCauthDetails.xsl 8) Refresh details page 9) Verify that display matches what you expect from your XSLT Example of a minimal XSLT: <?xml version='1.0' encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output omit-xml-declaration="yes"/> <xsl:template match="marc:record"> <xsl:element name="div"> <xsl:attribute name="class"> <xsl:text>authority-summary</xsl:text> </xsl:attribute> <xsl:value-of select="marc:datafield[@tag='151']/marc:subfield[@code='a']"/> </xsl:element> </xsl:template> </xsl:stylesheet> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #167363|0 |1 is obsolete| | --- Comment #17 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 173440 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173440&action=edit Bug 35305: Add sample XSLT for UNIMARC authorities details page Also creates UNIMARCauthUtils.xsl to share templates with UNIMARCauthResults.xsl Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #167364|0 |1 is obsolete| | --- Comment #18 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 173441 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173441&action=edit Bug 35305: (follow-up) Fix identing Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com Status|Signed Off |Passed QA --- Comment #19 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- I really would have liked to have see MARC21 sheets included here too but I'm not going to let that block us. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 --- Comment #20 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Pushed to main |Needs documenting --- Comment #21 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Enhancement, no 24.05.x backport. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 Aude Charillon <aude.charillon@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aude.charillon@openfifth.co | |.uk Documentation| |Aude Charillon contact| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 Aude Charillon <aude.charillon@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Documentation| |https://gitlab.com/koha-com submission| |munity/koha-manual/-/merge_ | |requests/1051 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35305 Aude Charillon <aude.charillon@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED --- Comment #22 from Aude Charillon <aude.charillon@openfifth.co.uk> --- Added to Koha Manual. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org