From 751d538cc0b03130c0f01b8332f9c379b624ef1a Mon Sep 17 00:00:00 2001 From: Gregor Gawol <gawol@ub.uni-leipzig.de> Date: Wed, 27 Nov 2019 09:44:16 +0100 Subject: [PATCH] refs #16528 [fid] sid boss resolver activate * modified get it config * bug fixing ** comment out if exists isxn ** hidden boss notice if boss false --- module/fid/src/View/Helper/Root/GetIt.php | 27 ++++++++++++++++------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/module/fid/src/View/Helper/Root/GetIt.php b/module/fid/src/View/Helper/Root/GetIt.php index cf714571d10..00d94c7a518 100644 --- a/module/fid/src/View/Helper/Root/GetIt.php +++ b/module/fid/src/View/Helper/Root/GetIt.php @@ -368,7 +368,7 @@ class GetIt extends AbstractHelper public function showPartCopyButton() { if (!in_array('Free', $this->facetAvail) - && in_array($this->sid, $this->_getSourceIds('source_idsV9')) + && in_array($this->sid, $this->_getSourceIds('source_idsV8')) && preg_grep($this->_getNonSourceIds('source_idsV8_1'), $this->format) && !$this->isCollection && !preg_grep($this->_getNonSourceIds('source_idsV8_8'), $this->collection) @@ -385,21 +385,16 @@ class GetIt extends AbstractHelper { if (!in_array('Free', $this->facetAvail) && in_array($this->sid, $this->_getSourceIds('source_idsV8')) - && (!empty($this->isbn) || !empty($this->issn)) + //&& (!empty($this->isbn) || !empty($this->issn)) && !preg_grep($this->_getNonSourceIds('source_idsV8_8'), $this->collection) ) { - if (in_array($this->sid, $this->_getSourceIds('source_idsV9')) - && preg_grep($this->_getNonSourceIds('source_idsV8_1'), $this->format) + if (preg_grep($this->_getNonSourceIds('source_idsV8_1'), $this->format) ) { return true; } elseif (in_array('Local', $this->facetAvail) && preg_grep($this->_getNonSourceIds('source_idsV8_3'), $this->format) ) { return true; - } elseif (in_array('Online', $this->facetAvail) - && preg_grep($this->_getNonSourceIds('source_idsV8_1'), $this->format) - ) { - return true; } } return false; @@ -415,4 +410,20 @@ class GetIt extends AbstractHelper } return false; } + + public function hideNotice() + { + if (in_array($this->sid, $this->_getSourceIds('source_idsV8'))) { + if (in_array('Online', $this->facetAvail) + && preg_grep($this->_getNonSourceIds('source_idsV8_1'), $this->format) + ) { + return false; + } elseif (in_array('Local', $this->facetAvail) + && preg_grep($this->_getNonSourceIds('source_idsV8_3'), $this->format) + ) { + return false; + } + } + return true; + } } -- GitLab