diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php index 687c23bc..a80a2835 100755 --- a/application/default/controllers/DataController.php +++ b/application/default/controllers/DataController.php @@ -580,9 +580,13 @@ class DataController extends Zend_Controller_Action $sql=$this->db->quoteInto($sql,$uuid); $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); - $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"; $this->view->authors=$this->db->fetchAll($sql,array($uuid)); diff --git a/application/default/views/scripts/data/view.phtml b/application/default/views/scripts/data/view.phtml index dcf15c75..d13fc66e 100755 --- a/application/default/views/scripts/data/view.phtml +++ b/application/default/views/scripts/data/view.phtml @@ -180,7 +180,20 @@ endforeach; endforeach; ?> + +userref) : ?> +