From c57e79b7a0a62de37a788228c79e70d9d31a989f Mon Sep 17 00:00:00 2001
From: Dorian Merz <merz@ub.uni-leipzig.de>
Date: Thu, 29 Aug 2019 10:52:19 +0200
Subject: [PATCH] refs #15917 [fid_bbi] conditions on payment info

* show payment note for "Volltext" links and where link type is unknown
---
 themes/fid_bbi/templates/RecordTab/holdingsils.phtml | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/themes/fid_bbi/templates/RecordTab/holdingsils.phtml b/themes/fid_bbi/templates/RecordTab/holdingsils.phtml
index 6cce7102685..79c012c6f54 100644
--- a/themes/fid_bbi/templates/RecordTab/holdingsils.phtml
+++ b/themes/fid_bbi/templates/RecordTab/holdingsils.phtml
@@ -21,7 +21,18 @@
     <caption><?php if (in_array('Free',$this->driver->tryMethod('getFacetAvail'))):?>
             <?=$this->translate('Open Access')?>
     <?php else: ?>
+        <?php if (!empty(array_filter($urls,
+                function ($elem) {
+                    return !isset($elem['desc']) || in_array(
+                                $elem['desc'],
+                                [
+                                    'Volltext',
+                                ]
+                            );
+                    }
+                ))):?>
             <?=$this->translate('charges_may_apply')?>
+        <?php endif;?>
     <?php endif;?></caption>
       <tr>
         <th><?=$this->transEsc("Link")?>:</th>
-- 
GitLab