Skip to content
Snippets Groups Projects
Commit bf223f15 authored by Jean-Pascal Kanter's avatar Jean-Pascal Kanter :speech_balloon: Committed by Robert Lange
Browse files

refs #22603 [finc] re-added traffic light to template ajax/resolverLink

co-authored by: André Lahmann <lahmann@ub.uni-leipzig.de>
* reintroduce ExternalLink view helper in resolverLink.phtml
parent 6300713e
No related merge requests found
<!-- finc - templates - ajax - resolverLink -->
<?php if (!empty($link['href'])): ?>
<a href="<?=$this->escapeHtmlAttr($link['href'])?>" title="<?=$this->transEsc($link['service_type'] ?? '')?>"<?=!empty($link['access']) ? ' class="access-' . $link['access'] . '"':''?>>
<?=$this->escapeHtml($link['title'] ?? '')?>
</a>
<?php /* finc-specific change #7986 - CK - traffic light */ ?>
<div class="show-availability">
<span class="sr-only">
<?=$this->translate('Availability')?>: <?=$this->transEsc('resolver_link_access_' . $link['access'])?>
</span>
<div aria-hidden="true"<?php if (!empty($link['access'])): ?> data-toggle="tooltip" title="<?=$this->transEsc('resolver_link_access_' . $link['access'])?>" class="traffic-light access-<?=$link['access']?>"<?php endif;?>>
<span class="first"></span>
<span class="second"></span>
<span class="last"></span>
</div>
</div>
<?php /* finc-specific change #7986 - END */ ?>
<?= $this->externalLink(
$this->escapeHtmlAttr($link['href']),
$link['title'] ?? '',
[
'title' => $link['service_type'] ?? '',
'class' => !empty($link['access']) ? 'access-' . $link['access'] : ''
]
) ?> <br />
<?php /* finc-specific change #5334 - CK */ ?>
<small>
<?= isset($link['coverage']) ? $this->escapeHtml($link['coverage']) : '' ?>
<?= isset($link['coverageHref'])
? $this->externalLink($link['coverageHref'], $this->translate('Readme'))
: '' ?>
</small>
<?php /* finc-specific change #5334 - END */ ?>
<?php else: ?>
<?=$this->escapeHtml($link['title'] ?? '')?>
<?php endif; ?>
<?php if (!empty($link['coverage'])): ?>
<span class="openurl-coverage">
<?=$this->escapeHtml($link['coverage'])?>
</span>
<?=isset($link['title'])?$this->escapeHtml($link['title']):''?> <?=isset($link['coverage'])?$this->transEsc($link['coverage']):''?>
<?php endif; ?>
<?php if (!empty($link['notes'])): ?>
<span class="openurl-notes">
......@@ -20,3 +41,4 @@
<?=$this->escapeHtml($link['authentication'])?>
</span>
<?php endif; ?>
<!-- finc - templates - ajax - resolverLink - 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