Koha/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences
Julian Maurice 4978f3d562 Bug 11083: Add ability to generate authority summary using XSLT
This patch only affects authority search results in the staff interface.
It adds a new system preference AuthorityXSLTResultsDisplay. If set,
each authority search result MARCXML will be transformed using the XSLT
at the given filename or URL. The output will be displayed in place of
the default summary.
If errors occur, the XSLT is ignored and the default summary is
displayed.

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. Verify that authority search results are not affected yet.
3. Create an XSLT file (for instance in
/home/koha/xslt/en/GEOGR_NAME.xsl)
4. Set AuthorityXSLTResultsDisplay syspref value to
/home/koha/xslt/{langcode}/{authtypecode}.xsl
5. Do an authority search that returns GEOGR_NAME results. Verify that
the summary matches what you expect from your XSLT
6. Do an authority search that returns authorities of other types.
Verify that the default summary is displayed.

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: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-08 15:49:15 +02:00
..
accounting.pref
acquisitions.pref
admin.pref Bug 20076: (RM follow-up) Fix system preference boolean logic 2022-01-13 16:37:33 -10:00
authorities.pref
borrowers.json Bug 29591: Add autorenew_checkouts column to preferences json 2022-01-03 20:54:31 -10:00
cataloguing.pref Bug 29286: Typo: Librarien will need the manage_auth_values subpermission. 2021-10-26 16:46:03 +02:00
circulation.pref Bug 19532: (follow-up) Fix calls, tests, syspref settings, checks 2022-03-14 22:45:51 -10:00
enhanced_content.pref Bug 29200: Remove Adlibris cover service 2021-10-21 12:24:04 +02:00
i18n_l10n.pref Bug 28598: Update DateFormat and TimeFormat descriptions to remove warnings 2021-06-22 12:06:29 +02:00
items.json
local_use.pref
logs.pref Bug 19532: (follow-up) Fix calls, tests, syspref settings, checks 2022-03-14 22:45:51 -10:00
opac.pref Bug 24221: Move OPACMySummaryNote to HTML customizations in additional-contents 2022-03-25 11:01:04 -10:00
patrons.pref Bug 29576: (QA follow-up) Rename road type to street type to match patron form 2022-04-04 16:23:45 +02:00
searching.pref Bug 5229: Remove from searching.pref 2021-11-19 15:23:27 +01:00
serials.pref
staff_interface.pref Bug 11083: Add ability to generate authority summary using XSLT 2022-04-08 15:49:15 +02:00
suggestions.json Bug 26296: (follow-up) Make sure title remains mandatory 2022-01-09 21:04:17 -10:00
tools.pref Bug 29530: Fix handling of NumSavedReports preference in reports table 2022-01-13 16:37:32 -10:00
web_services.pref