simplify image sources
This commit is contained in:
parent
ca6af3fe92
commit
443ddc343a
6 changed files with 14 additions and 60 deletions
|
|
@ -2,15 +2,11 @@
|
|||
<div>
|
||||
<?php if(!is_null($medium)) : ?>
|
||||
<img src="<?=$medium['url']?>" <?php if(!empty($medium['title'])) : ?>title="<?=$medium['title']?>"<?php endif ?> <?php if(!empty($medium['description'])) : ?>alt="<?=$medium['description']?>"<?php endif ?>/>
|
||||
<?php if(!empty($medium['sourcelabel']) || !empty($medium['sourceurl'])) : ?>
|
||||
<?php $label = (!empty($medium['sourcelabel'])) ? $medium['sourcelabel'] : \hhu\z\Utils::urlToLabel($medium['sourceurl']); ?>
|
||||
<?php if(!empty($medium['sourceurl'])) : ?>
|
||||
<span class="source">
|
||||
<?=_('Image source')?>:
|
||||
<?php if(!empty($medium['sourceurl'])): ?>
|
||||
<a href="<?=$medium['sourceurl']?>" target="_blank"><?=$label?></a>
|
||||
<?php else : ?>
|
||||
<?=$label?>
|
||||
<?php endif ?>
|
||||
<a href="<?=$medium['sourceurl']?>" target="_blank" title="<?=_('Image source')?>" rel="nofollow">
|
||||
<i class="fa fa-external-link"></i>
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php else : ?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue