From 579a204c0fc3d6ca4797e645b86d2247a1efe50f Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Sun, 29 Sep 2013 07:02:23 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9view::addPaginator=E7=9A=84?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controllers/DataController.php | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index 1cd8b906..6c1cdc8f 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -1123,9 +1123,15 @@ class Admin_DataController extends Zend_Controller_Action { $this->view->ac = $ac = $this->_getParam('ac'); $submit = $this->_getParam('submit'); + $keyword = $this->view->q = trim($this->_getParam('q')); $reference = new Reference(); + if(!empty($keyword)) + { + $reference->keyword = $keyword; + } + //文献首页 if(empty($ac)) { @@ -3520,13 +3526,13 @@ class Admin_DataController extends Zend_Controller_Action if(empty($uuid)) { $rows = $fund->fetch(NULL,true,0,$keyword); - view::addPaginator($rows,$this->view,$this->_request); + view::addPaginator($rows,$this,10); }else{ include('data/Metadata.php'); $md = new Metadata($this->db); $this->view->md = $md->view($uuid); $rows = $fund->fetch($uuid); - view::addPaginator($rows,$this->view,$this->_request); + view::addPaginator($rows,$this,10); } return true; } @@ -3536,7 +3542,7 @@ class Admin_DataController extends Zend_Controller_Action $this->_helper->viewRenderer('fund-data-list'); $this->view->q = $q = $this->_getParam('q'); $rows = $fund->fetchFromData(true,0,$q); - view::addPaginator($rows,$this->view,$this->_request); + view::addPaginator($rows,$this,10); return true; } @@ -3547,7 +3553,7 @@ class Admin_DataController extends Zend_Controller_Action $id = $this->_getParam('id'); $this->view->fund = $fund->view($id); $rows = $fund->fetchFromData($id,0,$q); - view::addPaginator($rows,$this->view,$this->_request); + view::addPaginator($rows,$this,10); return true; } @@ -3679,7 +3685,7 @@ class Admin_DataController extends Zend_Controller_Action $md = new Metadata($this->db); $this->view->md = $md->view($uuid); - view::addPaginator($rows,$this->view,$this->_request); + view::addPaginator($rows,$this,10); return true; }//formd @@ -3727,7 +3733,7 @@ class Admin_DataController extends Zend_Controller_Action } $rows = $fund->getData($id,$keyword); - view::addPaginator($rows,$this->view,$this->_request); + view::addPaginator($rows,$this,10); } }//fund @@ -3748,7 +3754,7 @@ class Admin_DataController extends Zend_Controller_Action if(empty($uuid)) { $rows = $doi->fetch(0,$q); - view::addPaginator($rows,$this->view,$this->_request); + view::addPaginator($rows,$this,10); }else{ $this->_redirect('/admin/data/doi/ac/edit/?uuid='.$uuid); return true;