fix #3459, 实现DOI的前台展示

This commit is contained in:
wlx 2013-05-08 05:47:28 +00:00
parent 219ff85920
commit 33660fac17
2 changed files with 10 additions and 5 deletions

View File

@ -533,8 +533,8 @@ class DataController extends Zend_Controller_Action
function viewAction()
{
$id = (int)$this->_request->getParam('id');
$sql="select m.*,s.status,g.id as gid,t.filename from normalmetadata m left join mdstatus s on m.uuid=s.uuid
left join thumbnail t on t.id=m.id left join geonetworkmetadata g on m.uuid=g.uuid where ";
$sql="select m.*,s.status,g.id as gid,t.filename,i.doi as datadoi,i.authors,i.author_en,i.publisher,i.publisher_en, date_part('year',i.ts_published) as publish_year from normalmetadata m left join mdstatus s on m.uuid=s.uuid
left join thumbnail t on t.id=m.id left join geonetworkmetadata g on m.uuid=g.uuid left join datadoi i on i.uuid=m.uuid where ";
if (empty($id)) {
$uuid = $this->_request->getParam('uuid');
if (empty($uuid)) $this->_redirect('/data');

View File

@ -30,9 +30,14 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
<?php if ($md->citation) : ?>
<hr />
<h4><i class="icon-quote-left muted"></i>本数据引用方式<a class="btn btn-danger pull-right" href="/archives/help/dataplatformhelp/archive-23.html" ><i class="icon-comment"></i>数据引用帮助</a></h4>
<p><?php echo $this->escape($md->citation);?></p>
<?php endif; ?>
<?php if ($this->ref) : ?>
<p><?php if (empty($md->datadoi) || strpos($md->citation,$md->datadoi)) : ?><span class="label label-info">文章的引用</span>
<?php endif; echo $this->escape($md->citation);?></p>
<?php if (!empty($md->datadoi) && !strpos($md->citation,$md->datadoi)) : ?>
<p><span class="label label-info">数据的引用</span><?php
echo substr($md->authors,1,-1).'. '.$md->title.'. '.$md->publisher.', '.$md->publish_year.'. doi:'.$md->doi;
echo ' ['.substr($md->author_en,1,-1).'. '.$md->title_en.'. '.$md->publisher_en.', '.$md->publish_year.'. doi:'.$md->doi.']';
?> (下载引用:<a href="/service/ris/lang/cn/uuid/<?php echo $md->uuid; ?>">RIS格式</a> | <a href="/service/ris/lang/en/uuid/<?php echo $md->uuid; ?>">RIS英文格式</a> | <a href="/service/bibtex/lang/cn/uuid/<?php echo $md->uuid; ?>">Bibtex格式</a> | <a href="/service/bibtex/lang/en/uuid/<?php echo $md->uuid; ?>">Bibtex英文格式</a>)</p>
<?php endif; endif; if ($this->ref) : ?>
<hr />
<h4><i class="icon-eye-open text-success"></i>建议参考文献</h4>
<ol>