Skip to content
Snippets Groups Projects
Commit 26467f0a authored by Robert Lange's avatar Robert Lange
Browse files

refs #20550 [finc] cover: load default icon for missing records

* avoid loading spinner
parent fa4fe406
No related merge requests found
......@@ -3,7 +3,13 @@
<?php /* If you want to load covers in lightbox use .recordcover;
the class .nocover prevents nocover images from loading in lightbox or can be used to hide the images */ ?>
<?php $alt = $alt ?? $this->transEsc('Cover Image')?>
<?php $coverId = "cover-" . $driver->getUniqueID() . "-" . time(); ?>
<?php $id = $driver->getUniqueID() ?>
<?php if ($id) {
$coverId = "cover-$id-" . time();
} else {
$cover = false;
}
?>
<?php if ($cover): ?>
<?php if ($this->link): ?><a id="<?=$coverId?>" href="<?=$this->escapeHtmlAttr($this->link)?>" tabindex="-1" aria-hidden="true"><?php endif; ?>
<img alt="<?=$alt?>" <?php if ($linkPreview): ?>data-linkpreview="true" <?php endif; ?>class="recordcover" src="<?=$this->escapeHtmlAttr($cover); ?>" />
......
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