75 lines
3.0 KiB
PHTML
Executable File
75 lines
3.0 KiB
PHTML
Executable File
<div class="media" vocab="http://schema.org/" resource="#record" typeof="<?=$this->driver->getSchemaOrgFormats()?> Product">
|
|
<?
|
|
$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();
|
|
?>
|
|
<?php if ($QRCode || $cover || $preview): ?>
|
|
<div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col">
|
|
<?php /* Display thumbnail if appropriate: */ ?>
|
|
<?php if($cover): ?>
|
|
<?=$cover?>
|
|
<?php endif; ?>
|
|
|
|
<?php /* Display qrcode if appropriate: */ ?>
|
|
<?php if($QRCode): ?>
|
|
<span class="hidden-xs">
|
|
<br/><img alt="<?=$this->transEsc('QR Code')?>" class="qrcode" src="<?=$this->escapeHtmlAttr($QRCode);?>"/>
|
|
</span>
|
|
<?php endif; ?>
|
|
|
|
<?php // 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) ?>
|
|
<?php if ($preview): ?>
|
|
<div class="record-previews">
|
|
<?=$preview?>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
<div class="media-body">
|
|
|
|
<h3 property="name"><?=$this->escapeHtml($this->driver->getShortTitle() . ' ' . $this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection())?></h3>
|
|
|
|
<?php $summary = $this->driver->getSummary(); $summary = isset($summary[0]) ? $this->escapeHtml($summary[0]) : false; ?>
|
|
<?php if ($summary): ?>
|
|
<p><?=$this->truncate($summary, 300)?></p>
|
|
|
|
<?php if(strlen($summary) > 300): ?>
|
|
<p><a href='<?=$this->recordLink()->getTabUrl($this->driver, 'Description')?>#tabnav'><?=$this->transEsc('Full description')?></a></p>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($this->userlist()->getMode() !== 'disabled'): ?>
|
|
<?php /* Display the lists that this record is saved to */ ?>
|
|
<div class="savedLists">
|
|
<strong><?=$this->transEsc("Saved in")?>:</strong>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?/* Display Main Details */?>
|
|
<?
|
|
$formatter = $this->recordDataFormatter();
|
|
$coreFields = $formatter->getData($driver, $formatter->getDefaults('core'));
|
|
// print_r($coreFields);
|
|
?>
|
|
<?php if (!empty($coreFields)) : ?>
|
|
<table class="table table-striped" summary="<?=$this->transEsc('Bibliographic Details')?>">
|
|
<?php foreach ($coreFields as $key => $current): ?>
|
|
<?php if (strcmp($key,"Language") == 0): ?>
|
|
<?$tr = "Language::" .$current['value'] ; ?>
|
|
<tr><th><?=$this->transEsc($key)?>:</th><td><?=$this->translate("$tr")?></td></tr>
|
|
<?php continue; ?>
|
|
<?php endif; ?>
|
|
<tr><th><?=$this->transEsc($key)?>:</th><td><?=$current['value']?></td></tr>
|
|
<?php endforeach; ?>
|
|
<?php endif; ?>
|
|
</table>
|
|
|
|
<?/* End Main Details */?>
|
|
</div>
|
|
</div>
|