From 8cd9fafc84af8019653c4640ded5eaabd8f3f2bb Mon Sep 17 00:00:00 2001
From: Gregor Gawol <gawol@ub.uni-leipzig.de>
Date: Thu, 21 Nov 2019 10:49:40 +0100
Subject: [PATCH] refs #16355 [fid_adlr] boss-module

* set position pda-text
* set word-wrap button text
* update boss-module version to 0.0.9
---
 composer.local.2.fid-adlr.json                |  2 +-
 composer.lock                                 | 13 ++--
 themes/fid_adlr/scss/compiled.scss            |  4 ++
 .../templates/RecordTab/holdingsils.phtml     | 70 ++++++++++++-------
 4 files changed, 55 insertions(+), 34 deletions(-)

diff --git a/composer.local.2.fid-adlr.json b/composer.local.2.fid-adlr.json
index deb8c1d6545..5e300173d7a 100644
--- a/composer.local.2.fid-adlr.json
+++ b/composer.local.2.fid-adlr.json
@@ -5,7 +5,7 @@
         }
     },
     "require": {
-        "finc/boss-module": "^0.0.6",
+        "finc/boss-module": "^0.0.9",
         "finc/dbis-module": "^1.0.0",
         "finc/worldcat-search-module": "^0.0.4"
     }
diff --git a/composer.lock b/composer.lock
index 58e08cec37a..09c010784b4 100644
--- a/composer.lock
+++ b/composer.lock
@@ -170,6 +170,7 @@
             ],
             "description": "Promoting the interoperability of container objects (DIC, SL, etc.)",
             "homepage": "https://github.com/container-interop/container-interop",
+            "abandoned": "psr/container",
             "time": "2017-02-14T19:40:03+00:00"
         },
         {
@@ -509,11 +510,11 @@
         },
         {
             "name": "finc/boss-module",
-            "version": "v0.0.6",
+            "version": "v0.0.9",
             "source": {
                 "type": "git",
                 "url": "https://git.sc.uni-leipzig.de/ubl/finc/fid/boss-module.git",
-                "reference": "6aa4966189bdf40742e32418d8dde2a3cca45142"
+                "reference": "3f11c76797662861e694051235c76761ec559c13"
             },
             "require": {
                 "ext-json": "*",
@@ -548,7 +549,7 @@
                 }
             ],
             "description": "Module for BOSS Webservice",
-            "time": "2019-11-12T10:20:59+00:00"
+            "time": "2019-11-21T15:15:07+00:00"
         },
         {
             "name": "finc/dbis-module",
@@ -1209,9 +1210,9 @@
             "authors": [
                 {
                     "name": "Christian Weiske",
+                    "role": "Developer",
                     "email": "cweiske@cweiske.de",
-                    "homepage": "http://github.com/cweiske/jsonmapper/",
-                    "role": "Developer"
+                    "homepage": "http://github.com/cweiske/jsonmapper/"
                 }
             ],
             "description": "Map nested JSON structures onto PHP classes",
@@ -3734,7 +3735,7 @@
                 {
                     "name": "David Maus",
                     "email": "maus@hab.de",
-                    "role": "Developer"
+                    "role": "developer"
                 },
                 {
                     "name": "Demian Katz",
diff --git a/themes/fid_adlr/scss/compiled.scss b/themes/fid_adlr/scss/compiled.scss
index f93b6b93d0e..ddad4abb6b3 100644
--- a/themes/fid_adlr/scss/compiled.scss
+++ b/themes/fid_adlr/scss/compiled.scss
@@ -2308,6 +2308,7 @@ div[class$="-tab"] {
     padding-left: 8px;
     padding-right: 8px;
     text-transform: uppercase;
+    white-space: normal;
     width: 99%;
     &.part-order {
       border: 3px solid $white;
@@ -2317,6 +2318,9 @@ div[class$="-tab"] {
       border: 3px solid $amber;
       color: $amber;
       margin-bottom: 2em;
+      & ~ .pda-part-text {
+        margin-top: -2em;
+      }
     }
     &:hover,
     &:focus {
diff --git a/themes/fid_adlr/templates/RecordTab/holdingsils.phtml b/themes/fid_adlr/templates/RecordTab/holdingsils.phtml
index de01412e83a..f969f572364 100644
--- a/themes/fid_adlr/templates/RecordTab/holdingsils.phtml
+++ b/themes/fid_adlr/templates/RecordTab/holdingsils.phtml
@@ -35,11 +35,42 @@
   $this->headTitle($this->driver->getBreadcrumb());
 ?>
 
+<?php if ($user && $getit->showBOSSData()): ?>
+      <? $script = <<<JS
+  $(document).ready(function() {
+      var recordId = $('.hiddenId').val();
+      var recordSource = $('.hiddenSource').val();
+      // console.log({id: recordId, source: recordSource});
+      $.ajax({
+        dataType: 'json',
+        url: VuFind.path + '/AJAX/JSON?method=getBoss',
+        method: 'GET',
+        data: {id: recordId, source: recordSource}
+      }).done(function(response) {
+          if (response.data.isISIL) {
+            $('.boss-data-true').html(response.data.html);
+            $('.getitbox-notices').addClass('hidden');
+          } else {
+              $('.boss-data-false').html(response.data.html);
+          }
+          // Use to register new lightbox window networknotice
+          VuFind.lightbox.bind();
+      });
+    });
+JS;
+      ?>
+      <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET');?>
+<?php endif; ?>
+
 <div class="getitbox-getit">
   <h4><?=$getit->getBoxHeadline()?></h4>
 
     <?=($offlineMode == "ils-offline") ? $this->render('Helpers/ils-offline.phtml', ['offlineModeMsg' => 'ils_offline_holdings_message']) : ''?>
 
+    <?php if ($user && $getit->showBOSSData()): ?>
+      <div class="boss-data-true"></div>
+    <?php endif; ?>
+
     <?php if ($openUrlActive): ?>
       <div class="openUrlButton"></div>
     <?php endif; ?>
@@ -71,38 +102,23 @@
     <?php endif; ?>
 </div>
 
-  <div class="getitbox-notices">
       <?php if ($user && $getit->showBOSSData()): ?>
-          <? $script = <<<JS
-  $(document).ready(function() {
-      var recordId = $('.hiddenId').val();
-      var recordSource = $('.hiddenSource').val();
-      // console.log({id: recordId, source: recordSource});
-      $.ajax({
-        dataType: 'json',
-        url: VuFind.path + '/AJAX/JSON?method=getBoss',
-        method: 'GET',
-        data: {id: recordId, source: recordSource}
-      }).done(function(response) {
-          $('.boss-data').html(response.data.html);
-          // Use to register new lightbox window networknotice
-          VuFind.lightbox.bind();
-      });
-    });
-JS;
-          ?>
-          <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET');?>
-    <div class="boss-data"></div><br/>
+<div class="getitbox-notices">
+    <div class="boss-data-false"></div><br/>
+</div>
       <?php endif; ?>
     <?php if ($openUrlActive): ?>
+<div class="getitbox-notices">
     <div class="openUrlPrint"></div>
+</div>
     <?php endif; ?>
+<?php if (!empty($getit->getNotices())): ?>
+<div class="getitbox-notices">
     <?php
-        $url = '<a href="'.$this->url('myresearch-account').'?auth_method='.$account->getAuthMethod().'" target="_blank" data-lightbox>'.$this->transEsc('getit_text_3_2').'</a>';
-      ?>
-      <?php if (!empty($getit->getNotices())): ?>
-      <?=sprintf($getit->getNotices(), $url)?>
-      <?php endif; ?>
-  </div>
+    $url = '<a href="'.$this->url('myresearch-account').'?auth_method='.$account->getAuthMethod().'" target="_blank" data-lightbox>'.$this->transEsc('getit_text_3_2').'</a>';
+    ?>
+<?=sprintf($getit->getNotices(), $url)?>
+</div>
+<?php endif; ?>
 
 <!-- fid_adlr: recordTab - holdingsils - END -->
-- 
GitLab