Koha-clms/authorities
Fridolin Somers dec81e0968
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>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-30 07:47:49 +01:00
..
auth_finder.pl Bug 36379: Fix auth_finder.pl to not expect the op cud-do_search 2024-04-08 15:41:10 +02:00
authorities-home.pl Bug 34478: Manual fix - remove cud from search op - authorities-home 2024-03-01 10:56:44 +01:00
authorities.pl Bug 38200: Remove dead code to delete authorities in authorities/authorities.pl 2024-10-23 19:14:56 +02:00
blinddetail-biblio-search.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
detail-biblio-search.pl Bug 17600: Fix GetTagsLabels imports 2021-08-03 14:35:18 +02:00
detail.pl Bug 35305: Add XSLT for authority details page in staff interface 2024-10-30 07:47:49 +01:00
export.pl Bug 37235: Fix export of single authority record 2024-07-08 17:49:19 +02:00
merge.pl Bug 25387: (QA follow-up) Tidy 2024-06-27 11:49:59 +02:00
merge_ajax.pl Bug 28785: Adjust check_cookie_auth calls 2021-10-18 11:28:41 +02:00
ysearch.pl Bug 28785: Adjust check_cookie_auth calls 2021-10-18 11:28:41 +02:00