From ab94f335aad8ef37ebefac68b5752b8e91eb1062 Mon Sep 17 00:00:00 2001 From: Alexander Wagner Date: Tue, 6 May 2025 13:45:55 +0000 Subject: [PATCH] Bug 38425: Add external links based on PIDs (UNIMARC) Render some (common) identifiers field UNIMARC 017 as links to external resources by evaluating `$2` and using the appropriate resolver URL. Currently implemented values for `$2`: arXiv, doi, inspire, openlibrary, pmc, pmid. The patch includes adds the class `resource_list` to the intranet scss to be able to use the identical XSLT code as for the OPAC. Test plan: 1. Open intranet interface and edit any record 2. Add PIDs to your records. For Marc21 use `024 7_` for UNIMARC use `017 7_` with the following subfield layout: - $2 doi $a 10.2147/CIA.S157877 - $2 pmid $a 29942120 - $2 pmc $a PMC6005330 - $2 arxiv: $a arxiv:2411.05889 - $2 inspire $a 2835154 - $2 openlibrary $a OL27448W (May be all or any combination. The values of $a would not matter, the above just gives valid links to the external system in question.) 3. Check intranet detail display of the record: nothing appears 4. Check OPAC detail display of the record: nothing appears 5. Apply the patch 6. Check intranet detail display of the record. It now gives a new line: External Resource(s): --- .../en/xslt/UNIMARCslim2intranetDetail.xsl | 81 +++++++++++++++++++ .../en/xslt/UNIMARCslim2OPACDetail.xsl | 81 +++++++++++++++++++ 2 files changed, 162 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl index d92d9cff86b..0ca1f185243 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl @@ -24,6 +24,87 @@ + + + + External resource(s): + + + +

diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl index 548e39aad1d..55abf2adc62 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl @@ -26,6 +26,87 @@ + + + + External resource(s): + + + +

-- 2.43.0