From 3f8c141dd4cae5bd57c5b78e37847dc2a529a23f Mon Sep 17 00:00:00 2001 From: zhujinyong Date: Sun, 6 Jan 2013 05:19:00 +0000 Subject: [PATCH] * code for task#1043. --- module/my/control.php | 13 +++++++++++-- module/my/view/testtask.html.php | 19 ++++++++++--------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/module/my/control.php b/module/my/control.php index 7713a660e1..0be22e205e 100644 --- a/module/my/control.php +++ b/module/my/control.php @@ -249,8 +249,12 @@ class my extends control * @access public * @return void */ - public function testtask() + public function testtask($orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) { + /* Load pager. */ + $this->app->loadClass('pager', $static = true); + $pager = pager::init($recTotal, $recPerPage, $pageID); + /* Save session. */ $this->session->set('testtaskList', $this->app->getURI(true)); @@ -258,8 +262,13 @@ class my extends control $this->view->header->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->testTask; $this->view->position[] = $this->lang->my->testTask; - $this->view->tasks = $this->loadModel('testtask')->getByUser($this->app->user->account); + $this->view->tasks = $this->loadModel('testtask')->getByUser($this->app->user->account, $pager, $orderBy); + $this->view->recTotal = $recTotal; + $this->view->recPerPage = $recPerPage; + $this->view->pageID = $pageID; + $this->view->orderBy = $orderBy; + $this->view->pager = $pager; $this->display(); } diff --git a/module/my/view/testtask.html.php b/module/my/view/testtask.html.php index 25013a66ff..e5ed15006a 100644 --- a/module/my/view/testtask.html.php +++ b/module/my/view/testtask.html.php @@ -11,7 +11,6 @@ */ ?> -
+ - - - - - - - - + + + + + + + + @@ -55,6 +55,7 @@ +
idAB;?>testtask->name;?>testtask->project;?>testtask->build;?>testtask->begin;?>testtask->end;?>statusAB;?>actions;?> idAB);?> testtask->name);?> testtask->project);?> testtask->build);?>testtask->begin);?>testtask->end);?>statusAB);?>actions;?>
show();?>