From 7b867212803659a0d8dffb30c01d8c1ab75ea15f 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 (cherry picked from commit f6dbad91c4f114471036695f1476dc5315a94d1a) Signed-off-by: Lucas Gass (cherry picked from commit f70fd04521e560f55a45742e1c3ba388a34e6d98) Signed-off-by: Arthur Suzuki --- .../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 15cff4f4a6..95f4948ef5 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.' - - "Show itemtype icons in the OPAC: " - pref: OpacNoItemTypeImages 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 b5515fde82..735aa56fb1 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." Did you mean/spell checking: - - "Swedish service for spellchecking.
" 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 c909f9076d..51f6219ea3 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 @@ -71,7 +71,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 @@ -81,7 +81,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