添加无RIS的数据作者文献功能
This commit is contained in:
parent
0164f1c3fd
commit
e3fcf04eff
|
@ -1203,6 +1203,13 @@ class Admin_DataController extends Zend_Controller_Action
|
|||
view::addPaginator($reference->fetchTodoReferences(),$this,$this->view->pagelimit);
|
||||
return true;
|
||||
}
|
||||
//数据作者文献(缺少RIS)
|
||||
else if ($ac=="author")
|
||||
{
|
||||
$this->view->referenceType = $reference->referenceType();
|
||||
view::addPaginator($reference->fetchAuthorReferences(),$this,$this->view->pagelimit);
|
||||
return true;
|
||||
}
|
||||
|
||||
unset($this->view->reference);
|
||||
unset($this->view->page);
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
<li <?= empty($this->ac) && empty($this->uuid) ? 'class="active"':"" ?>><a href="/admin/data/ref">浏览所有</a></li>
|
||||
<li <?= $this->ac=="water" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/water">WATER文献</a></li>
|
||||
<li <?= $this->ac=="westdc" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/westdc">数据中心文献</a></li>
|
||||
<li <?= $this->ac=="todo" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/todo">待处理文献</a></li>
|
||||
<li <?= $this->ac=="todo" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/todo">无数据文献</a></li>
|
||||
<li <?= $this->ac=="author" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/author">数据作者文献</a></li>
|
||||
<li <?= $this->ac=="add" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/add">单篇添加</a></li>
|
||||
<li <?= $this->ac=="multiupload" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/multiupload">批量上传</a></li>
|
||||
<li <?= $this->ac=="files" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/files">文件管理</a></li>
|
||||
|
|
|
@ -309,6 +309,37 @@ class Reference
|
|||
return $rs->fetchAll();
|
||||
}
|
||||
|
||||
//Get data author references which need to deal with
|
||||
public function fetchAuthorReferences()
|
||||
{
|
||||
$wheresql = array();
|
||||
$wheresql[] = " ref.ris is NULL ";
|
||||
$wheresql[]=" ref.id in (select distinct refid from mdref where reftype=0) ";
|
||||
if(!empty($this->keyword))
|
||||
{
|
||||
$wheresql[] = " (ref.title LIKE '%{$this->keyword}%' OR ref.reference LIKE '%{$this->keyword}%') ";
|
||||
}
|
||||
if(count($wheresql)>0)
|
||||
{
|
||||
$wheresql = " WHERE ".join(" AND ",$wheresql);
|
||||
}else{
|
||||
$wheresql = "";
|
||||
}
|
||||
|
||||
if(empty($this->order))
|
||||
{
|
||||
$order = "ref.year,ref.title";
|
||||
}else{
|
||||
$order = "ref.{$this->order} {$this->sort}";
|
||||
}
|
||||
|
||||
$sql="select distinct ref.* from {$this->table->reference} ref
|
||||
$wheresql
|
||||
ORDER BY $order";
|
||||
$rs=$this->db->query($sql);
|
||||
return $rs->fetchAll();
|
||||
}
|
||||
|
||||
//Get references by data UUID
|
||||
public function fetchReferencesByUUID($uuid)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue