Skip to content

Commit

Permalink
Avoid creating empty anchors if no thumbnail available.
Browse files Browse the repository at this point in the history
  • Loading branch information
kimisgold committed Sep 14, 2020
1 parent a37d4b3 commit 8d13af3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion application/view/omeka/site/item-set/browse.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ foreach ($itemSets as $itemSet):
$body = $bodyTerm ? $itemSet->value($bodyTerm) : $itemSet->displayDescription();
?>
<li class="item-set resource">
<?php echo $itemSet->linkRaw($this->thumbnail($itemSet, 'medium')); ?>
<?php if($itemSetThumbnail = $this->thumbnail($itemSet, 'medium')): ?>
<?php echo $itemSet->linkRaw($itemSetThumbnail); ?>
<?php endif; ?>
<h4><?php echo $itemSet->link($heading); ?></h4>
<?php if ($body): ?>
<div class="description"><?php echo $body; ?></div>
Expand Down
4 changes: 3 additions & 1 deletion application/view/omeka/site/item/browse.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ foreach ($items as $item):
$body = $bodyTerm ? $item->value($bodyTerm) : $item->displayDescription();
?>
<li class="item resource">
<?php echo $item->linkRaw($this->thumbnail($item, 'medium')); ?>
<?php if ($itemThumbnail = $this->thumbnail($item, 'medium')): ?>
<?php echo $item->linkRaw($itemThumbnail); ?>
<?php endif; ?>
<h4><?php echo $item->link($heading); ?></h4>
<?php if ($body): ?>
<div class="description"><?php echo $escape($body); ?></div>
Expand Down

0 comments on commit 8d13af3

Please sign in to comment.