bibb-theme/templates/RecordDriver/SolrDefault/core.phtml.20250306
2026-02-24 07:35:06 +01:00

102 lines
4.3 KiB
Plaintext
Executable File

<div class="media" vocab="http://schema.org/" resource="#record" typeof="<?=$this->driver->getSchemaOrgFormats()?> Product">
<?
$urls = $this->driver->getOnlineLinks($expand=true);
$displayDownloadButton = false;
if (isset($urls)) {
foreach($urls as $current) {
if (strcmp($current['desc'], "Inhaltsverzeichnis") == 0 || strncmp($current['desc'],"Volltext über anderen Anbieter", strlen("Volltext über anderen Anbieter")) == 0) continue;
$displayDownloadButton = true;
break;
}
}
$url = is_array($urls) ? $urls[0] : $urls;
$QRCode = $this->record($this->driver)->getQRCode("core");
$coverDetails = $this->record($this->driver)->getCoverDetails('core', 'medium', $this->record($this->driver)->getThumbnail('large'));
$cover = $coverDetails['html'];
$preview = $this->record($this->driver)->getPreviews();
$filetypes = $this->driver->getFileType();
$filetype = strlen($filetypes[0] > 0) ? $filetypes[0] : '' ;
if (strlen(trim($filetype)) == 0) $filetype = "PDF";
if (strcmp(trim(strtoupper($filetype)), "ADOBE PDF") == 0) $filetype = "PDF";
?>
<? if ($QRCode || $cover || $preview): ?>
<div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col">
<? /* Display thumbnail if appropriate: */ ?>
<? if($cover): ?>
<?=$cover?>
<? endif; ?>
<? /* Display qrcode if appropriate: */ ?>
<? if($QRCode): ?>
<span class="hidden-xs">
<br/><img alt="<?=$this->transEsc('QR Code')?>" class="qrcode" src="<?=$this->escapeHtmlAttr($QRCode);?>"/>
</span>
<? endif; ?>
<br />
<? if(strlen($url['url']) > 10): ?>
<form action="<?=$this->escapeHtmlAttr(trim($this->proxyUrl($url['url'])))?>">
<? //if (strcmp($url['desc'], "Inhaltsverzeichnis") != 0 && strncmp(strcmp($url['desc'],"Volltext über anderen Anbieter", strlen("Volltext über anderen Anbieter")) !=0)) : ?>
<? if ($displayDownloadButton) : ?>
<button type="submit" class="btn btn-lg" style="height:30px;width:130px; background-color:#ffce53;color:#5e6c78;"><i class="fa fa-download" aria-hidden="true"></i> - <?= $filetype ?></button>
<? endif; ?>
</form>
<? endif ; ?>
<? // if you have a preview tab but want to move or remove the preview link
// from this area of the record view, this can be split into
// getPreviewData() (should stay here) and
// getPreviewLink() (can go in your desired tab) ?>
<? if ($preview): ?>
<div class="record-previews">
<?=$preview?>
</div>
<? endif; ?>
</div>
<? endif; ?>
<div class="media-body">
<h3 property="name"><?=$this->escapeHtml($this->driver->getShortTitle() . ' ' . $this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection())?></h3>
<? $summary = $this->driver->getSummary(); $summary = isset($summary[0]) ? $this->escapeHtml($summary[0]) : false; ?>
<? if ($summary): ?>
<p><?=$this->truncate($summary, 300)?></p>
<? if(strlen($summary) > 300): ?>
<p><a href='<?=$this->recordLink()->getTabUrl($this->driver, 'Description')?>#tabnav'><?=$this->transEsc('Full description')?></a></p>
<? endif; ?>
<? endif; ?>
<? if ($this->userlist()->getMode() !== 'disabled'): ?>
<? /* Display the lists that this record is saved to */ ?>
<div class="savedLists">
<strong><?=$this->transEsc("Saved in")?>:</strong>
</div>
<? endif; ?>
<?/* Display Main Details */?>
<?
$formatter = $this->recordDataFormatter();
$coreFields = $formatter->getData($driver, $formatter->getDefaults('core'));
//print_r($coreFields);
?>
<? if (!empty($coreFields)) : ?>
<table class="table table-striped" summary="<?=$this->transEsc('Bibliographic Details')?>">
<? foreach ($coreFields as $key => $current): ?>
<? if (strcmp($key,"Language") == 0): ?>
<?$tr = "Language::" .$current['value'] ; ?>
<tr><th><?=$this->transEsc($key)?>:</th><td><?=$this->translate("$tr")?></td></tr>
<? continue; ?>
<? endif; ?>
<tr><th><?=$this->transEsc($key)?>:</th><td><?=$current['value']?></td></tr>
<? endforeach; ?>
<? endif; ?>
</table>
<?/* End Main Details */?>
</div>
</div>