Koha/koha-tmpl/intranet-tmpl/prog/en/modules
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
..
acqui Bug 30404: Enlarge all patron search pop-ups 2022-04-04 09:47:02 +02:00
admin Bug 11083: Add ability to generate authority summary using XSLT 2022-04-08 15:49:15 +02:00
authorities Bug 11083: Add ability to generate authority summary using XSLT 2022-04-08 15:49:15 +02:00
basket
batch
catalogue Bug 30227: Replace the use of jQueryUI tabs on bibliographic detail page 2022-03-25 11:01:04 -10:00
cataloguing Bug 30161: Remove duplicate z3950_search include 2022-03-22 10:17:34 -10:00
circ Bug 30094: (QA follow-up) Mke the QA script happy 2022-04-04 09:47:00 +02:00
clubs
course_reserves
errors
ill Bug 30212: Make Select2 available for ILL backends 2022-03-17 11:22:56 -10:00
installer
labels
mana
members Bug 30063: Fix QA issues 2022-04-04 09:47:02 +02:00
offline_circ
onboarding
patron_lists
patroncards Bug 30404: Enlarge all patron search pop-ups 2022-04-04 09:47:02 +02:00
plugins Bug 25285: Fix wrong message about required Koha version in plugins 2022-03-17 11:22:56 -10:00
pos Bug 30003: Prevent double up of point-of-sale items 2022-04-04 16:23:45 +02:00
recalls
reports
reserve Bug 30395: Fix TT filtering of publicationyear in reserve/request.tt 2022-04-04 16:24:26 +02:00
reviews
rotating_collections
serials Bug 30404: Enlarge all patron search pop-ups 2022-04-04 09:47:02 +02:00
services
suggestion Bug 30404: Enlarge all patron search pop-ups 2022-04-04 09:47:02 +02:00
tags
test
tools Bug 30093: Rename patron-search.inc to patron-search-header.inc 2022-04-04 09:47:00 +02:00
virtualshelves
about.tt
auth.tt Bug 29915: Add selenium tests 2022-03-22 10:17:33 -10:00
intranet-main.tt Revert "Bug 30425: April fools 🐟: Add ponies to staff homepage" 2022-04-04 09:47:03 +02:00