添加待处理文献功能
This commit is contained in:
parent
4c95532808
commit
3628ece4c1
|
@ -1157,6 +1157,12 @@ class Admin_DataController extends Zend_Controller_Action
|
|||
view::addPaginator($reference->fetchThemeReferences('water'),$this,10);
|
||||
return true;
|
||||
}
|
||||
else if ($ac == "todo")
|
||||
{
|
||||
$this->view->referenceType = $reference->referenceType();
|
||||
view::addPaginator($reference->fetchTodoReferences(),$this,10);
|
||||
return true;
|
||||
}
|
||||
|
||||
//添加
|
||||
if($ac == "add")
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<ul class="nav nav-tabs">
|
||||
<li <?= empty($this->ac) ? '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=="water" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/water">WATER文献</a></li>
|
||||
<li <?= $this->ac=="todo" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/todo">待处理文献</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>
|
||||
|
|
|
@ -228,6 +228,36 @@ class Reference
|
|||
$rs=$this->db->query($sql);
|
||||
return $rs->fetchAll();
|
||||
}
|
||||
|
||||
//Get references which need to deal with
|
||||
public function fetchTodoReferences()
|
||||
{
|
||||
$wheresql = array();
|
||||
$wheresql[]=" r.uuid is not null ";
|
||||
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 mdref r left join {$this->table->reference} ref on r.refid=ref.id
|
||||
$wheresql
|
||||
ORDER BY $order";
|
||||
$rs=$this->db->query($sql);
|
||||
return $rs->fetchAll();
|
||||
}
|
||||
|
||||
//单条文献的信息
|
||||
public function getOneReferenceData($id)
|
||||
|
|
Loading…
Reference in New Issue