Skip to content
Snippets Groups Projects
Commit f928a161 authored by Robert Lange's avatar Robert Lange Committed by Dorian Merz
Browse files

refs #18213 [master] fix publication details bug (18213_new)

parent 05ea9047
No related merge requests found
<!-- finc: RecordDriver - DefaultRecord - data-publicationDetails --> <!-- finc: RecordDriver - DefaultRecord - data-publicationDetails -->
<?php if (!empty($data)): ?> <?php if (!empty($data)): ?>
<div itemscope itemtype="http://schema.org/publisher"> <div itemscope itemtype="http://schema.org/publisher">
<?php if (is_array($data)): ?> <?php if(is_array($data)): ?>
<?php foreach ($data as $field): ?> <?php foreach ($data as $field): ?>
<span property="publisher" typeof="Organization"> <span property="publisher" typeof="Organization">
<?php $pubPlace = $field->getPlace(); <?php $pubPlace = $field->getPlace();
if (!empty($pubPlace)): ?> if (!empty($pubPlace)): ?>
<span property="location" typeof="Place"> <span property="location" typeof="Place">
<span property="name"><?=$this->escapeHtml($pubPlace)?></span> <span property="name"><?=$this->escapeHtml($pubPlace)?></span>
</span> </span>
<?php endif; ?> <?php endif; ?>
<?php $pubName = $field->getName(); <?php $pubName = $field->getName();
if (!empty($pubName)): ?> if (!empty($pubName)): ?>
<span property="name"><?=$this->escapeHtml($pubName)?></span> <span property="name"><?=$this->escapeHtml($pubName)?></span>
<?php endif; ?> <?php endif; ?>
</span> </span>
<span property="datePublished"> <span property="datePublished">
<?php /* do not show solr publish date #13993 - GG */ ?> <?php /* do not show solr publish date #13993 - GG */ ?>
<?php /*$pubDateSort = $this->driver->tryMethod('getPublishDateSort');*/ ?> <?php /*$pubDateSort = $this->driver->tryMethod('getPublishDateSort');*/ ?>
<?php $pubDate = $field->getDate(); <?php $pubDate = $field->getDate();
if (!empty($pubDate)): ?> if (!empty($pubDate)): ?>
<?=$this->escapeHtml($pubDate)?> <?=$this->escapeHtml($pubDate)?>
<?php /*else: ?> <?php /*else: ?>
<?=$this->escapeHtml($pubDateSort)*/ ?> <?=$this->escapeHtml($pubDateSort)*/ ?>
<?php endif; ?> <?php endif; ?>
</span><br/> </span><br/>
<?php endforeach; ?> <?php endforeach; ?>
<?php else: ?> <?php else: ?>
<?=$this->escapeHtml($data)?> <span property="publisher" typeof="Organization"><?=$data?></span>
<?php endif; ?> <?php endif; ?>
</div> </div>
<?php endif ?> <?php endif ?>
......
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