Skip to content
Snippets Groups Projects
Commit e5e96ef8 authored by André Lahmann's avatar André Lahmann
Browse files

refs #8447:

* fixed Ezb constructor
* added message to be shown if resolver returned no useful content
parent 3564e20d
Branches
Tags
No related merge requests found
...@@ -1829,6 +1829,8 @@ Address-Contact-Hours = "Adresse, Kontakt" ...@@ -1829,6 +1829,8 @@ Address-Contact-Hours = "Adresse, Kontakt"
resolver_link_access_denied = "nicht verfügbar" resolver_link_access_denied = "nicht verfügbar"
resolver_link_access_limited = "Im Campusnetz verfügbar" resolver_link_access_limited = "Im Campusnetz verfügbar"
resolver_link_access_open = "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
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." 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."
......
...@@ -1770,6 +1770,8 @@ Address-Contact-Hours = "Address, Contact" ...@@ -1770,6 +1770,8 @@ Address-Contact-Hours = "Address, Contact"
resolver_link_access_denied = "not available" resolver_link_access_denied = "not available"
resolver_link_access_limited = "Available in Campus LAN" resolver_link_access_limited = "Available in Campus LAN"
resolver_link_access_open = "available" resolver_link_access_open = "available"
; message to be shown upon empty resolver response
no_resolver_links = "No online links available."
; reset password ; 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." reset_password_text = "Please complete the form below to reset your password. You will receive an email after we have completed resetting your password."
......
...@@ -119,7 +119,7 @@ class AjaxController extends \VuFind\Controller\AjaxController ...@@ -119,7 +119,7 @@ class AjaxController extends \VuFind\Controller\AjaxController
$view = [ $view = [
'openUrlBase' => $base, 'openUrl' => $openUrl, 'print' => $print, 'openUrlBase' => $base, 'openUrl' => $openUrl, 'print' => $print,
'electronic' => $electronic, 'services' => $services, 'electronic' => $electronic, 'services' => $services,
'searchClassId' => $searchClassId 'searchClassId' => $searchClassId, 'resolver' => $requestedResolver
]; ];
} }
$html = $this->getViewRenderer()->render('ajax/resolverLinks.phtml', $view); $html = $this->getViewRenderer()->render('ajax/resolverLinks.phtml', $view);
......
...@@ -80,7 +80,7 @@ class Ezb implements DriverInterface, TranslatorAwareInterface ...@@ -80,7 +80,7 @@ class Ezb implements DriverInterface, TranslatorAwareInterface
* @param string $config ezb configuration * @param string $config ezb configuration
* @param \Zend\Http\Client $httpClient HTTP client * @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->baseUrl = $config->url;
$this->httpClient = $httpClient; $this->httpClient = $httpClient;
......
<!-- ajax - resolverlinks.phtml --> <!-- ajax - resolverlinks.phtml -->
<div> <div>
<? $noResolverContent = true; ?>
<? if (!empty($this->electronic)): ?> <? if (!empty($this->electronic)): ?>
<? $noResolverContent = false; ?>
<div class="openurls"> <div class="openurls">
<? /*<strong><?=$this->transEsc('Electronic')?></strong>*/ ?> <? /*<strong><?=$this->transEsc('Electronic')?></strong>*/ ?>
<ul class="no-bullet"> <ul class="no-bullet">
...@@ -23,6 +25,7 @@ ...@@ -23,6 +25,7 @@
</div> </div>
<? endif; ?> <? endif; ?>
<? /**<? if (!empty($this->print)): ?> <? /**<? if (!empty($this->print)): ?>
<? $noResolverContent = false; ?>
<div class="openurls"> <div class="openurls">
<strong><?=$this->transEsc('Holdings')?></strong> <strong><?=$this->transEsc('Holdings')?></strong>
<ul class="no-bullet"> <ul class="no-bullet">
...@@ -52,6 +55,10 @@ ...@@ -52,6 +55,10 @@
</ul> </ul>
<? endif; ?> <? endif; ?>
</div> */ ?> </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> </div>
<!-- ajax - resolverlinks.phtml - END --> <!-- ajax - resolverlinks.phtml - END -->
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment