Skip to content
Snippets Groups Projects
Commit c655d7f8 authored by Alexander Purr's avatar Alexander Purr Committed by Mathias Maaß
Browse files

refs #24323 [finc] refactor resolverLinks templates

* resolverLinks.phtml -> simplify logic / move noResolverContent-block / remove additional variable
* resolverLink.phtml -> move comments because of incorrect nesting
parent c40bebb1
Branches
Tags
No related merge requests found
<!-- finc - templates - ajax - resolverLink -->
<!-- finc: ajax - resolverLink -->
<?php if (!empty($link['href'])): ?>
<?php /* finc-specific change #7986 - CK - traffic light */ ?>
<div class="flex">
<?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->transEscAttr('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 aria-hidden="true"<?php if (!empty($link['access'])): ?> data-toggle="tooltip" title="<?=$this->transEscAttr('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 */ ?>
<div>
......@@ -30,9 +30,9 @@
? $this->externalLink($link['coverageHref'], $this->translate('Readme'))
: '' ?>
</small>
<?php /* finc-specific change #5334 - END */ ?>
</div>
</div>
<?php /* finc-specific change #5334 - END */ ?>
<?php else: ?>
<?=isset($link['title'])?$this->escapeHtml($link['title']):''?> <?=isset($link['coverage'])?$this->transEsc($link['coverage']):''?>
<?php endif; ?>
......@@ -46,4 +46,4 @@
<?=$this->escapeHtml($link['authentication'])?>
</span>
<?php endif; ?>
<!-- finc - templates - ajax - resolverLink - END -->
\ No newline at end of file
<!-- finc: ajax - resolverLink - END -->
\ No newline at end of file
<!-- finc: ajax - resolverlinks -->
<div>
<?php /* finc-specific change #8447 - CK */ ?>
<?php $noResolverContent = true; ?>
<?php if (!empty($this->electronic)): ?>
<?php $noResolverContent = false; ?>
<?php /* finc-specific change #8447 - END */ ?>
<div class="openurls">
<?php /* finc hide pseudo header */
/*
......@@ -20,6 +16,17 @@
<?php endforeach; ?>
</ul>
</div>
<?php /* finc-specific change #9274 - CK */ ?>
<?php else: // no content to show, so tell the user?>
<span id="noResolverContentMessage" class="hidden"><?=$this->resolver . ': ' . $this->translate('no_resolver_links')?></span>
<script>
if ($('#urlsHideable').length > 0) {
$('#urlsHideable').removeClass('hidden').show();
} else {
$('#noResolverContentMessage').removeClass('hidden').show();
}
</script>
<?php /* finc-specific change #9274 - END */ ?>
<?php endif; ?>
<?php /* finc-specific change - commented out in #7643 - hide info on print issues - CK */ ?>
<?php /*
......@@ -53,18 +60,5 @@
</div>
*/ ?>
<?php /* finc-specific change - commented out in #7643 - END */ ?>
<?php /* finc-specific change #9274 - CK */ ?>
<?php if ($noResolverContent): // no content to show, so tell the user?>
<span id="noResolverContentMessage" class="hidden"><?=$this->resolver . ': ' . $this->translate('no_resolver_links')?></span>
<script>
if ($('#urlsHideable').length > 0) {
$('#urlsHideable').removeClass('hidden').show();
} else {
$('#noResolverContentMessage').removeClass('hidden').show();
}
</script>
<?php endif; ?>
<?php /* finc-specific change #9274 - END */ ?>
</div>
<!-- finc: ajax - resolverlinks - END -->
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