前台元数据实现数据用户文献支持

This commit is contained in:
wlx 2012-05-19 14:15:10 +00:00
parent 4e7639cd53
commit aaba16dee6
2 changed files with 19 additions and 2 deletions

View File

@ -580,9 +580,13 @@ class DataController extends Zend_Controller_Action
$sql=$this->db->quoteInto($sql,$uuid); $sql=$this->db->quoteInto($sql,$uuid);
$this->view->resources=$this->db->fetchAll($sql); $this->view->resources=$this->db->fetchAll($sql);
//建议参考文献 //建议参考文献
$sql="select r.* from reference r left join mdref m on m.refid=r.id where m.uuid=?"; $sql="select r.* from reference r left join mdref m on m.refid=r.id where m.uuid=? and m.reftype=0";
$sql=$this->db->quoteInto($sql,$uuid); $sql=$this->db->quoteInto($sql,$uuid);
$this->view->ref=$this->db->fetchAll($sql); $this->view->ref=$this->db->fetchAll($sql);
//用户发表文献
$sql="select r.* from reference r left join mdref m on m.refid=r.id where m.uuid=? and m.reftype=1";
$sql=$this->db->quoteInto($sql,$uuid);
$this->view->userref=$this->db->fetchAll($sql);
//相关用户 //相关用户
$sql="select p.email,p.individual,p.organisation,r.role from role r left join responsible p on r.resid=p.id where r.uuid=? order by r.role,r.id"; $sql="select p.email,p.individual,p.organisation,r.role from role r left join responsible p on r.resid=p.id where r.uuid=? order by r.role,r.id";
$this->view->authors=$this->db->fetchAll($sql,array($uuid)); $this->view->authors=$this->db->fetchAll($sql,array($uuid));

View File

@ -181,6 +181,19 @@ endforeach;
?> ?>
</ol> </ol>
<?php endif; ?> <?php endif; ?>
<?php if ($this->userref) : ?>
<h2>数据用户发表文献</h2>
<ol>
<?php foreach($this->userref as $ref) :
if (empty($ref->link))
echo '<li>'.$ref->reference.'</li>';
else
echo '<li>'.$ref->reference.' <a href="'.$ref->link.'">下载</a></li>';
endforeach;
?>
</ol>
<?php endif; ?>
<h2>数据使用声明</h2> <h2>数据使用声明</h2>
<?php <?php
if ($this->uselimits) : if ($this->uselimits) :