add ris download function for literatures

This commit is contained in:
wlx 2013-11-15 14:41:56 +00:00
parent beb002b648
commit 1ccb1300b0
2 changed files with 9 additions and 0 deletions

View File

@ -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))
{

View File

@ -70,6 +70,9 @@ $this->headLink()->appendStylesheet('/css/colorbox.css');
if (!empty($item['link'])) :
echo ' <a href="'.$item['link'].'">下载</a>';
endif;
if (!empty($item['ris'])) :
echo ' <a href="/service/ris/id/'.$item['id'].'">RIS下载</a>';
endif;
?>
<a href="javascript:;" onclick="showdata('<?php echo $this->paper['id'];?>',0)"><i class="icon-external-link text-success"></i>相关数据(共<span id="referenceDataCount"></span>条)</a>