Koha/koha-tmpl/intranet-tmpl/prog/en/modules/admin
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
..
preferences Bug 11083: Add ability to generate authority summary using XSLT 2022-04-08 15:49:15 +02:00
searchengine/elasticsearch Bug 30000: Replace the use of jQueryUI tabs on the search engine configuration page 2022-03-24 14:22:09 -10:00
additional-fields.tt
admin-home.tt
adveditorshortcuts.tt
aqbudgetperiods.tt
aqbudgets.tt Bug 30404: Enlarge all patron search pop-ups 2022-04-04 09:47:02 +02:00
aqcontract.tt
aqplan.tt
audio_alerts.tt
auth_subfields_structure.tt
auth_tag_structure.tt
authorised_values.tt Bug 29999: (follow-up) Show the remote image tab if selected 2022-03-25 11:01:03 -10:00
authtypes.tt Bug 13952: (follow-up) fixing indentation and rebasing 2022-04-04 16:23:46 +02:00
background_jobs.tt Bug 30172: Prevent race condition when enqueuing a new task 2022-04-04 16:23:46 +02:00
biblio_framework.tt
branch_transfer_limits.tt
branches.tt
cash_registers.tt
categories.tt
checkmarc.tt
cities.tt
classsources.tt
clone-rules.tt
columns_settings.tt
credit_types.tt
currency.tt
debit_types.tt
desks.tt Bug 30107: When editing desks default to the branch the desk belongs to 2022-04-04 16:23:46 +02:00
didyoumean.tt
edi_accounts.tt
edi_ean_accounts.tt
item_circulation_alerts.tt
items_search_field.tt
items_search_fields.tt
itemtypes.tt Bug 29998: Replace the use of jQueryUI tabs on item types administration page 2022-03-25 11:01:04 -10:00
koha2marclinks.tt
library_groups.tt
localization.tt
marc-overlay-rules.tt Bug 29589: (follow-up) Add TT filter 2022-03-01 22:47:47 -10:00
marc_subfields_structure.tt
marctagstructure.tt
matching-rules.tt
oai_set_mappings.tt
oai_sets.tt
overdrive.tt
patron-attr-types.tt
preferences.tt
share_content.tt
smart-rules.tt Bug 19532: Database and installer stuff 2022-03-14 22:45:50 -10:00
sms_providers.tt
smtp_servers.tt
sru_modmapping.tt
sru_modmapping_auth.tt
systempreferences.tt
transfer_limits.tt
transport-cost-matrix.tt
usage_statistics.tt
z3950servers.tt