From 1ccb1300b0262470e21d0289eac89bea8094f432 Mon Sep 17 00:00:00 2001 From: wlx Date: Fri, 15 Nov 2013 14:41:56 +0000 Subject: [PATCH] add ris download function for literatures --- application/default/controllers/ServiceController.php | 6 ++++++ application/default/views/scripts/knowledge/paper.phtml | 3 +++ 2 files changed, 9 insertions(+) diff --git a/application/default/controllers/ServiceController.php b/application/default/controllers/ServiceController.php index 8d2c5af4..4654666a 100644 --- a/application/default/controllers/ServiceController.php +++ b/application/default/controllers/ServiceController.php @@ -1667,6 +1667,8 @@ class ServiceController extends Zend_Controller_Action $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(); $uuid=$this->_request->getParam('uuid'); + //文献id + $id=(int)$this->_request->getParam('id'); $lang=$this->_request->getParam('lang'); $ris=''; if ($lang=='cn' && !empty($uuid)) @@ -1708,6 +1710,10 @@ class ServiceController extends Zend_Controller_Action $ris.='M3 - doi:'.$row['doi']."\r\n"; $ris.='DO - doi:'.$row['doi']."\r\n"; $ris.='ER -'."\r\n"; + } else if ($id) { + $sql="select ris from reference where id=$id"; + $row=$this->db->fetchRow($sql); + $ris=$row['ris']; } if (!empty($ris)) { diff --git a/application/default/views/scripts/knowledge/paper.phtml b/application/default/views/scripts/knowledge/paper.phtml index 354555fa..d457fdb6 100644 --- a/application/default/views/scripts/knowledge/paper.phtml +++ b/application/default/views/scripts/knowledge/paper.phtml @@ -70,6 +70,9 @@ $this->headLink()->appendStylesheet('/css/colorbox.css'); if (!empty($item['link'])) : echo ' 下载'; endif; + if (!empty($item['ris'])) : + echo ' RIS下载'; + endif; ?> 相关数据(共条)