From 7470a506e1c514c942991c82d5edca5191b41068 Mon Sep 17 00:00:00 2001
From: jpkanter <kanter@ub.uni-leipzig.de>
Date: Fri, 15 Mar 2024 10:43:28 +0100
Subject: [PATCH] refs #24751 [fid_bbi] release/fid_bbi/2024_01 Addes IOSPress
 to facets and info texts

* updated regex expression in getit/links template to make it less strict
* re-added a get it rule that should have been here since #25129 but somehow ~returned~ disappeard
---
 fid_bbi/config/vufind/GetItRules.yaml           | 9 +++++++++
 fid_bbi/config/vufind/facets.ini                | 2 ++
 fid_bbi/languages/AMSLScopeNotes/de.ini         | 4 +++-
 fid_bbi/languages/AMSLScopeNotes/en.ini         | 4 +++-
 fid_bbi/languages/de.ini                        | 1 +
 fid_bbi/languages/en.ini                        | 2 ++
 themes/fid_bbi/templates/get-it-box/links.phtml | 4 ++--
 7 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/fid_bbi/config/vufind/GetItRules.yaml b/fid_bbi/config/vufind/GetItRules.yaml
index 1ff500e1e3d..ebb9f57b7f4 100644
--- a/fid_bbi/config/vufind/GetItRules.yaml
+++ b/fid_bbi/config/vufind/GetItRules.yaml
@@ -388,4 +388,13 @@ rules:
       is_loggedOn and
       is_licensed
   #############################################################################################
+  # licensed link decider #####################################################################
+  license_link_decider:
+    - 'lic_notice'
+    - >
+      !is_source13 ? '' :
+      followProxy ? this.out('lic_access') :
+      is_loggedOn and !is_licensed ? this.out('lic_noaccess') :
+      this.out('lic_req')
+  #############################################################################################
 stopFlags: 'break'
\ No newline at end of file
diff --git a/fid_bbi/config/vufind/facets.ini b/fid_bbi/config/vufind/facets.ini
index 67212ef5a4c..58b7b0cc224 100644
--- a/fid_bbi/config/vufind/facets.ini
+++ b/fid_bbi/config/vufind/facets.ini
@@ -311,6 +311,8 @@ mega_collection[] = "Bibliographie der Buch- und Bibliotheksgeschichte"
 mega_collection[] = "Cambridge Publishing and Book Culture"
 ; # 25131 source_id:222
 mega_collection[] = "Ebsco E-Books DDA"
+; # 24751 source_id:219
+mega_collection[] = "IOS-Press Zeitschriften"
 
 ; The following five mega_collections are all part of sid:159
 ; but there is no mega_collection entry in SOLR for those
diff --git a/fid_bbi/languages/AMSLScopeNotes/de.ini b/fid_bbi/languages/AMSLScopeNotes/de.ini
index af36087b2af..d104148a5c5 100644
--- a/fid_bbi/languages/AMSLScopeNotes/de.ini
+++ b/fid_bbi/languages/AMSLScopeNotes/de.ini
@@ -66,4 +66,6 @@ DigiZeitschriften = Das Portal Digizeitschriften wird von der Niedersächsischen
 # 24750
 Bibliographie der Buch- und Bibliotheksgeschichte = Die Bibliographie der Buch- und Bibliotheksgeschichte (BBB) wurde von Horst Meyer herausgegeben und erschien von 1982 (Berichtszeitraum 1980/81) bis 2004 (Berichtszeitraum 2002/03) in 23 Bänden im „Bibliographischen Verlag Horst Meyer“. Die Bibliographie wurde einst für die Virtuelle Fachbibliothek b2i digitalisiert und ist nun auch in das Portal des FID BBI eingebunden.
 # 25131
-Ebsco E-Books DDA  = Der FID BBI hat für Sie ein Paket von ca. 3000 fachbezogenen E-Books kuratiert, die Sie auf Kosten des FID BBI digital ausleihen können. Für den Zugriff auf die E-Books benötigen Forschende ein Konto im FID BBI. Nach dem Klick auf den Link werden Sie auf die Seite unseres Kooperationspartners EBSCO weitergeleitet.
\ No newline at end of file
+Ebsco E-Books DDA  = Der FID BBI hat für Sie ein Paket von ca. 3000 fachbezogenen E-Books kuratiert, die Sie auf Kosten des FID BBI digital ausleihen können. Für den Zugriff auf die E-Books benötigen Forschende ein Konto im FID BBI. Nach dem Klick auf den Link werden Sie auf die Seite unseres Kooperationspartners EBSCO weitergeleitet.
+# 24751
+IOS-Press Zeitschriften = Im Rahmen einer FID-Lizenz können FID-Nutzende auf die Volltexte der Zeitschriften "Applied Ontology", "Education for Information", "Information Services & Use", "Information Polity" und "World Digital Library" zugreifen. Die Metadaten sind im Portal des FID BBI recherchierbar. Um auf einen Artikel der Zeitschrift zuzugreifen müssen sich berechtigte Nutzende vor dem Klick auf die DOI im Portal des FID BBI anmelden.
\ No newline at end of file
diff --git a/fid_bbi/languages/AMSLScopeNotes/en.ini b/fid_bbi/languages/AMSLScopeNotes/en.ini
index 71df190e6a9..4bb72383210 100644
--- a/fid_bbi/languages/AMSLScopeNotes/en.ini
+++ b/fid_bbi/languages/AMSLScopeNotes/en.ini
@@ -68,4 +68,6 @@ DigiZeitschriften = The Digizeitschriften portal is operated by the Göttingen S
 # 24750
 Bibliographie der Buch- und Bibliotheksgeschichte = The Bibliography of Book and Library History (BBB) was edited by Horst Meyer and published from 1982 (reporting period 1980/81) to 2004 (reporting period 2002/03) in 23 volumes by the "Bibliographischer Verlag Horst Meyer". The bibliography was once digitised for the research portal b2i and is now also integrated the FID BBI portal.
 # 25131
-Ebsco E-Books DDA  = The FID BBI has curated a collection of about 3000 subject-related e-books, which you can borrow digitally at the expense of the FID BBI. To access the e-books, researchers need an account at the FID BBI. After clicking on the link, you will be redirected to the website of our cooperation partner EBSCO.
\ No newline at end of file
+Ebsco E-Books DDA  = The FID BBI has curated a collection of about 3000 subject-related e-books, which you can borrow digitally at the expense of the FID BBI. To access the e-books, researchers need an account at the FID BBI. After clicking on the link, you will be redirected to the website of our cooperation partner EBSCO.
+# 24751
+IOS-Press Zeitschriften = As part of an FID licence, FID users can access the full texts of the journals "Applied Ontology", "Education for Information", "Information Services & Use", "Information Polity" and "World Digital Library". The metadata can be searched in the FID BBI portal. To access a journal article, authorised users must log in to the FID BBI portal before clicking on the DOI.
\ No newline at end of file
diff --git a/fid_bbi/languages/de.ini b/fid_bbi/languages/de.ini
index 82476889e3d..f6f9ae82a42 100644
--- a/fid_bbi/languages/de.ini
+++ b/fid_bbi/languages/de.ini
@@ -593,6 +593,7 @@ licenses_Infodata = Infodata über WTI Frankfurt
 licenses_proquest_lisc = Library & Information Science Collection (LISC) bei ProQuest
 ; # 25130
 Cambridge Publishing and Book Culture = Elements in Publishing and Book Culture (Cambridge University Press)
+IOS-Press Zeitschriften = Zeitschriften von IOS Press
 
 ; # 21346
 licenses_neo_BookHistoryOnline = "Recherche starten"
diff --git a/fid_bbi/languages/en.ini b/fid_bbi/languages/en.ini
index c87824e8dae..886a6ba97d6 100644
--- a/fid_bbi/languages/en.ini
+++ b/fid_bbi/languages/en.ini
@@ -564,6 +564,8 @@ licenses_BookHistoryOnline = "Book History Online" bibliography hosted at brill.
 licenses_Infodata = Infodata via WTI Frankfurt
 licenses_proquest_lisc = Library & Information Science Collection (LISC) at ProQuest
 
+IOS-Press Zeitschriften = Journals from IOS Press
+
 ; # 21346
 licenses_neo_BookHistoryOnline = "Start research"
 licenses_neo_name_BookHistoryOnline = "Book History Online (BHO) by Brill"
diff --git a/themes/fid_bbi/templates/get-it-box/links.phtml b/themes/fid_bbi/templates/get-it-box/links.phtml
index 1dfd2773552..140a420f3ed 100644
--- a/themes/fid_bbi/templates/get-it-box/links.phtml
+++ b/themes/fid_bbi/templates/get-it-box/links.phtml
@@ -40,7 +40,7 @@
 
                 if ($getitConfig['followProxy']) {  // resolves doi.org links to their target
                     // if it's a DOI URl we have to use the Link Resolver first
-                    $re = '/(https?:\/\/doi.org\/)(\d{2}\.\d{4}\/\d+)$/';
+                    $re = '/(https?:\/\/doi.org\/)(\d{2}\.\d{4}\/.+)$/';
                     if (preg_match($re, $href)) {
                         $proxy['data-rawurl'] = $href;
                         $proxy['data-prefix'] = $this->proxyUrl("");
@@ -93,7 +93,7 @@
                 $proxy = [];
 
                 if ($getitConfig['followProxy']) {
-                    $re = '/(https?:\/\/doi.org\/)(\d{2}\.\d{4}\/\d+)$/';
+                    $re = '/(https?:\/\/doi.org\/)(\d{2}\.\d{4}\/.+)$/';
                     if (preg_match($re, $href)) {
                         $proxy['data-rawurl'] = $href;
                         $proxy['data-prefix'] = $this->proxyUrl("");
-- 
GitLab