Skip to content
Snippets Groups Projects
Commit a994039e authored by Josef Moravec's avatar Josef Moravec Committed by Robert Lange
Browse files

Enable DOI linker in EDS records (#1493)

parent 8f2e73de
No related merge requests found
......@@ -569,4 +569,21 @@ class EDS extends DefaultRecord
// EDS is not export-friendly; disable all formats.
return true;
}
/**
* Return the first valid DOI found in the record (false if none).
*
* @return mixed
*/
public function getCleanDOI()
{
if (isset($this->fields['Items'])) {
foreach ($this->fields['Items'] as $item) {
if ('DOI' == $item['Name']) {
return $item['Data'];
}
}
}
return false;
}
}
......@@ -105,6 +105,10 @@
</span>
<?php endforeach; ?>
<?php endif; ?>
<?php $doi = $this->doi($this->driver, 'record'); if ($doi->isActive()): ?>
<div><?=$doi->renderTemplate()?></div>
<?php endif; ?>
</div>
</div>
</div>
......@@ -88,6 +88,11 @@
<?=$this->transEsc('PDF Full Text')?>
</a>
<?php endif; ?>
<?php /* Links from DOI linker */ ?>
<?php $doi = $this->doi($this->driver, 'results'); if ($doi->isActive()):?>
<?=$doi->renderTemplate()?>
<?php endif; ?>
</div>
<div class="result-links hidden-print">
<?php /* Display qrcode if appropriate: */ ?>
......
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