From f6dbad91c4f114471036695f1476dc5315a94d1a Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Wed, 22 Jun 2022 15:04:47 -1000 Subject: [PATCH] Bug 31020: Fix PassItemMarcToXSLT in system preferences description Bug 28373 added system preference PassItemMarcToXSLT is referenced is all XSLT system preferences. But it only applies on results pages. The only use in perl code is in C4::Search : > $marcrecord->delete_fields( @fields ) unless C4::Context->preference('PassItemMarcToXSLT'); I've tested by adding in all XSLT files : ITEMS Number of items only appears in OPAC and staff interface results pages. In fact only search pages get MARC record from search engine, in which items datas have been embedded for indexing. In other pages MARC record does not embed items datas. This patch adds "MARC21 952, UNIMARC 995" to be explicit we talk about MARC datas not item tags build in XML recieved by XSLT. Test plan : 1) Apply patch 2) Search for PassItemMarcToXSLT in system preferencies 3) Look at description of PassItemMarcToXSLT 4) Check PassItemMarcToXSLT only apprears in OPACXSLTResultsDisplay and XSLTResultsDisplay Signed-off-by: David Nind Signed-off-by: Victor Grousset/tuxayo Signed-off-by: Tomas Cohen Arazi --- .../intranet-tmpl/prog/en/modules/admin/preferences/opac.pref | 4 ++-- .../prog/en/modules/admin/preferences/searching.pref | 3 ++- .../prog/en/modules/admin/preferences/staff_interface.pref | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref index ea9e864911..555febc918 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -90,7 +90,7 @@ OPAC: - 'Display lists in the OPAC using XSLT stylesheet at: ' - pref: OPACXSLTListsDisplay class: file - - '
Options:
  • Enter "default" for the default stylesheet
  • Put a path to define an xslt file
  • Put a URL for an external specific stylesheet.
  • NOTE: The system preference PassItemMarcToXSLT must be enabled if your custom stylesheet utilizes data in the item fields
If you have multiple stylesheets for different languages the placeholder {langcode} will be replaced with current interface language.' + - '
Options:
  • Enter "default" for the default stylesheet
  • Put a path to define an xslt file
  • Put a URL for an external specific stylesheet.
If you have multiple stylesheets for different languages the placeholder {langcode} will be replaced with current interface language.' - - 'Display OPAC results using XSLT stylesheet at: ' - pref: OPACXSLTResultsDisplay @@ -100,7 +100,7 @@ OPAC: - 'Display OPAC details using XSLT stylesheet at: ' - pref: OPACXSLTDetailsDisplay class: file - - '
Options:
  • Enter "default" for the default stylesheet
  • Put a path to define an xslt file
  • Put a URL for an external specific stylesheet.
  • NOTE: The system preference PassItemMarcToXSLT must be enabled if your custom stylesheet utilizes data in the item fields
If you have multiple stylesheets for different languages the placeholder {langcode} will be replaced with current interface language.' + - '
Options:
  • Enter "default" for the default stylesheet
  • Put a path to define an xslt file
  • Put a URL for an external specific stylesheet.
If you have multiple stylesheets for different languages the placeholder {langcode} will be replaced with current interface language.' - - pref: OpacNoItemTypeImages default: 0 diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref index 69619fd6f8..4f551cfa05 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref @@ -281,7 +281,8 @@ Searching: choices: 1: Do 0: "Don't" - - "make item MARC tags available to XSLT stylesheets. Default is \"Don't\", items are displayed using other methods." + - "make item MARC fields (MARC21 952, UNIMARC 995) available to XSLT stylesheets for OPAC and staff interface results pages." + - "
Default is \"Don't\", items are displayed using other methods." - - pref: ShowHeadingUse choices: diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref index d9b9f46bbd..8fe46bfc79 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref @@ -76,7 +76,7 @@ Staff interface: - 'Display lists in the staff interface using XSLT stylesheet at: ' - pref: XSLTListsDisplay class: file - - '
Options:
  • Enter "default" for the default stylesheet
  • Put a path to define an xslt file
  • Put a URL for an external specific stylesheet.
  • NOTE: The system preference PassItemMarcToXSLT must be enabled if your custom stylesheet utilizes data in the item fields
If you have multiple stylesheets for different languages the placeholder {langcode} will be replaced with current interface language.' + - '
Options:
  • Enter "default" for the default stylesheet
  • Put a path to define an xslt file
  • Put a URL for an external specific stylesheet.
If you have multiple stylesheets for different languages the placeholder {langcode} will be replaced with current interface language.' - - 'Display results in the staff interface using XSLT stylesheet at: ' - pref: XSLTResultsDisplay @@ -86,7 +86,7 @@ Staff interface: - 'Display details in the staff interface using XSLT stylesheet at: ' - pref: XSLTDetailsDisplay class: file - - '
Options:
  • Enter "default" for the default stylesheet
  • Put a path to define an xslt file
  • Put a URL for an external specific stylesheet.
  • NOTE: The system preference PassItemMarcToXSLT must be enabled if your custom stylesheet utilizes data in the item fields
If you have multiple stylesheets for different languages the placeholder {langcode} will be replaced with current interface language.' + - '
Options:
  • Enter "default" for the default stylesheet
  • Put a path to define an xslt file
  • Put a URL for an external specific stylesheet.
If you have multiple stylesheets for different languages the placeholder {langcode} will be replaced with current interface language.' - - pref: DisplayIconsXSLT choices: -- 2.39.5