Skip to content
Snippets Groups Projects
Commit 9fbbc09f authored by Mathias Maaß's avatar Mathias Maaß
Browse files

refs #24001 [finc] Show fallback urls if resolver request fails

parent 388dcf55
No related merge requests found
......@@ -9,6 +9,8 @@
$doiActive = $doi->isActive();
// Account for replace_other_urls setting
$urls = $this->record($this->driver)->getLinkDetails($openUrlActive);
// Finc #24001
$fallbackUrls = $this->driver->tryMethod('getURLs');
// finc-specific: externalCatalogueLink
$extUrls = $this->externalCatalogueLink($this->driver)->getLinks();
......@@ -79,23 +81,22 @@ if (!empty($holdingTitleHold)): ?>
<?php endif; ?>
<?php /* finc-specific snippet - #9274 - replaces if ($openUrlActive): ... - CK */ ?>
<?php if ($openUrlActive): ?>
<?php if (empty($urls)): ?>
<?php $fallbackUrls = $this->driver->tryMethod('getURLs');
if (!empty($fallbackUrls)): ?>
<span id="urlsHideable" style="display: none">
<?php foreach ($fallbackUrls as $current): ?>
<?php /* finc: use external link view helper #19650 */ ?>
<?= $this->externalLink($this->escapeHtmlAttr($this->proxyUrl($current['url'])), $current['desc'] ?? $current['url']) ?><br/>
<?php endforeach; ?>
</span>
<?php endif; ?>
<?php endif; ?>
<?=$openUrl->renderTemplate()?>
<?php if ($doiActive): ?><?=$doi->renderTemplate()?><?php endif; ?>
<?php endif; ?>
<?php /* finc-specific snippet - #9274 - END */ ?>
<?php endif; ?>
<?php /* Finc #24001 */ ?>
<?php if ($openUrlActive && !empty($fallbackUrls)): ?>
<span id="urlsHideable" style="display: none">
<?php foreach ($fallbackUrls as $current): ?>
<?php /* finc: use external link view helper #19650 */ ?>
<?= $this->externalLink($this->escapeHtmlAttr($this->proxyUrl($current['url'])), $current['desc'] ?? $current['url']) ?><br>
<?php endforeach; ?>
</span>
<?php endif; ?>
<?php if (!empty($holdings['electronic_holdings'])): ?>
<?=$this->context($this)->renderInContext(
'RecordTab/holdingsils/electronic.phtml',
......
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