From 58e0c65ce3f4fabedb7e9b09fdd39bd9c8b83b09 Mon Sep 17 00:00:00 2001 From: Gregor Gawol <gawol@ub.uni-leipzig.de> Date: Mon, 9 Dec 2019 13:17:16 +0100 Subject: [PATCH] refs #16627 [fid_adlr] ebook notice bug * fixed some bugs --- .../templates/RecordTab/holdingsils.phtml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/themes/fid_adlr/templates/RecordTab/holdingsils.phtml b/themes/fid_adlr/templates/RecordTab/holdingsils.phtml index d49b8bdee7c..c4d2c4a3cc7 100644 --- a/themes/fid_adlr/templates/RecordTab/holdingsils.phtml +++ b/themes/fid_adlr/templates/RecordTab/holdingsils.phtml @@ -40,7 +40,6 @@ $(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', @@ -49,7 +48,6 @@ }).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); $('.boss-notice').addClass('hidden'); @@ -63,6 +61,16 @@ JS; <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET');?> <?php endif; ?> +<?php if ($getit->hideNotice()): ?> + <? $script = <<<JS + $(document).ready(function() { + $('.getitbox-notices').addClass('hidden'); + }); +JS; + ?> + <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET');?> +<?php endif; ?> + <div class="getitbox-getit"> <h4><?=$getit->getBoxHeadline()?></h4> @@ -109,7 +117,7 @@ JS; <?php if ($user && $getit->showBOSSData()): ?> <div class="boss-data-false"></div> -<?php if (!$getit->hideNotice()): ?><br/><?php endif; ?> +<?php if ($getit->hideNotice()): ?><br/><?php endif; ?> <?php endif; ?> <?php @@ -123,7 +131,7 @@ JS; <div class="getitbox-notices"> <?php if ($user && $getit->showBOSSData()): ?> <div class="boss-data-false"></div> - <?php if (!$getit->hideNotice()): ?><br/><?php endif; ?> + <?php if ($getit->hideNotice()): ?><br/><?php endif; ?> <?php endif; ?> </div> <?php endif; ?> -- GitLab