From e3fcf04eff2bd808d76e86b666e13c49c1d6864a Mon Sep 17 00:00:00 2001 From: wlx Date: Tue, 20 May 2014 01:17:54 +0000 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=A0RIS=E7=9A=84?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=BD=9C=E8=80=85=E6=96=87=E7=8C=AE=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controllers/DataController.php | 7 +++++ .../admin/views/scripts/data/ref-nav.phtml | 3 +- application/module/Reference/Reference.php | 31 +++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index c0ca9811..1b611772 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -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); diff --git a/application/admin/views/scripts/data/ref-nav.phtml b/application/admin/views/scripts/data/ref-nav.phtml index 97e50ac8..8de06c5a 100644 --- a/application/admin/views/scripts/data/ref-nav.phtml +++ b/application/admin/views/scripts/data/ref-nav.phtml @@ -5,7 +5,8 @@
  • ac) && empty($this->uuid) ? 'class="active"':"" ?>>浏览所有
  • ac=="water" ? 'class="active"':"" ?>>WATER文献
  • ac=="westdc" ? 'class="active"':"" ?>>数据中心文献
  • -
  • ac=="todo" ? 'class="active"':"" ?>>待处理文献
  • +
  • ac=="todo" ? 'class="active"':"" ?>>无数据文献
  • +
  • ac=="author" ? 'class="active"':"" ?>>数据作者文献
  • ac=="add" ? 'class="active"':"" ?>>单篇添加
  • ac=="multiupload" ? 'class="active"':"" ?>>批量上传
  • ac=="files" ? 'class="active"':"" ?>>文件管理
  • diff --git a/application/module/Reference/Reference.php b/application/module/Reference/Reference.php index a1f0afb3..ec13211a 100644 --- a/application/module/Reference/Reference.php +++ b/application/module/Reference/Reference.php @@ -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) {