diff --git a/local/languages/de.ini b/local/languages/de.ini index a53d75cfa663c9687a1aefaa3fd2053fc437c550..8d560f8fd1f1a4a924e50ac649fd9372b261c460 100644 --- a/local/languages/de.ini +++ b/local/languages/de.ini @@ -1829,6 +1829,8 @@ Address-Contact-Hours = "Adresse, Kontakt" resolver_link_access_denied = "nicht verfügbar" resolver_link_access_limited = "Im Campusnetz verfügbar" resolver_link_access_open = "verfügbar" +; message to be shown upon empty resolver response +no_resolver_links = "Keine Online Links verfügbar." ; reset password reset_password_text = "Bitten füllen Sie dieses Formular aus, um Ihr Passwort zurücksetzen zu lassen. Sie erhalten an u.g. Email Adresse eine Benachrichtigung, nachdem wir das Passwort zurückgesetzt haben." diff --git a/local/languages/en.ini b/local/languages/en.ini index 11aa556ef300534e152027e6d0e45766471c0a5e..fc4cff97d4bb8bda301487e3c0c72e1eba658802 100644 --- a/local/languages/en.ini +++ b/local/languages/en.ini @@ -1770,6 +1770,8 @@ Address-Contact-Hours = "Address, Contact" resolver_link_access_denied = "not available" resolver_link_access_limited = "Available in Campus LAN" resolver_link_access_open = "available" +; message to be shown upon empty resolver response +no_resolver_links = "No online links available." ; reset password reset_password_text = "Please complete the form below to reset your password. You will receive an email after we have completed resetting your password." diff --git a/module/finc/src/finc/Controller/AjaxController.php b/module/finc/src/finc/Controller/AjaxController.php index 4b98f2fe46d2a84b1d15d2cdc08592cfd0d66e40..f0e7bdbc6d20b50c49036381092a925bb7e94361 100644 --- a/module/finc/src/finc/Controller/AjaxController.php +++ b/module/finc/src/finc/Controller/AjaxController.php @@ -119,7 +119,7 @@ class AjaxController extends \VuFind\Controller\AjaxController $view = [ 'openUrlBase' => $base, 'openUrl' => $openUrl, 'print' => $print, 'electronic' => $electronic, 'services' => $services, - 'searchClassId' => $searchClassId + 'searchClassId' => $searchClassId, 'resolver' => $requestedResolver ]; } $html = $this->getViewRenderer()->render('ajax/resolverLinks.phtml', $view); diff --git a/module/finc/src/finc/Resolver/Driver/Ezb.php b/module/finc/src/finc/Resolver/Driver/Ezb.php index 8969dd783c52d30a878c0f19fe6a8f0a6ef781ef..d8af5c33db6c17916613e8810471c505497d86c1 100644 --- a/module/finc/src/finc/Resolver/Driver/Ezb.php +++ b/module/finc/src/finc/Resolver/Driver/Ezb.php @@ -80,7 +80,7 @@ class Ezb implements DriverInterface, TranslatorAwareInterface * @param string $config ezb configuration * @param \Zend\Http\Client $httpClient HTTP client */ - public function __construct($config, \Zend\Http\Client $httpClient, $translator) + public function __construct($config, \Zend\Http\Client $httpClient) { $this->baseUrl = $config->url; $this->httpClient = $httpClient; diff --git a/themes/finc/templates/ajax/resolverLinks.phtml b/themes/finc/templates/ajax/resolverLinks.phtml index bb32e7d33e93e7da0354ba4ac66c61dae88c8d82..2be57d6f06cef21f453b0978a671ad27b5d6774b 100644 --- a/themes/finc/templates/ajax/resolverLinks.phtml +++ b/themes/finc/templates/ajax/resolverLinks.phtml @@ -1,6 +1,8 @@ <!-- ajax - resolverlinks.phtml --> <div> + <? $noResolverContent = true; ?> <? if (!empty($this->electronic)): ?> + <? $noResolverContent = false; ?> <div class="openurls"> <? /*<strong><?=$this->transEsc('Electronic')?></strong>*/ ?> <ul class="no-bullet"> @@ -23,6 +25,7 @@ </div> <? endif; ?> <? /**<? if (!empty($this->print)): ?> + <? $noResolverContent = false; ?> <div class="openurls"> <strong><?=$this->transEsc('Holdings')?></strong> <ul class="no-bullet"> @@ -52,6 +55,10 @@ </ul> <? endif; ?> </div> */ ?> - <script type="text/javascript">$(document).foundation('tooltip', 'reflow');</script> + <? if ($noResolverContent): // no content to show, so tell the user ?> + <span><?=$this->resolver . ': ' . $this->translate('no_resolver_links')?></span> + <? else: // content to show, so do javascript to properly render tooltips?> + <script type="text/javascript">$(document).foundation('tooltip', 'reflow');</script> + <? endif; ?> </div> <!-- ajax - resolverlinks.phtml - END --> \ No newline at end of file