From 3d0dffd995d4c8aaa749b8f5e7ace6c43714b3d4 Mon Sep 17 00:00:00 2001 From: zhujinyong Date: Sun, 6 Jan 2013 02:03:30 +0000 Subject: [PATCH] * code for task#1043. --- module/my/control.php | 19 +++++++++++-------- module/my/view/todo.html.php | 18 +++++++++--------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/module/my/control.php b/module/my/control.php index e2d82ef9eb..f1cfa89a92 100644 --- a/module/my/control.php +++ b/module/my/control.php @@ -68,7 +68,7 @@ class my extends control * @access public * @return void */ - public function todo($type = 'today', $account = '', $status = 'all', $recTotal = 0, $recPerPage = 20, $pageID = 1) + public function todo($type = 'today', $account = '', $status = 'all', $orderBy="date, status, begin", $recTotal = 0, $recPerPage = 20, $pageID = 1) { /* Save session. */ $uri = $this->app->getURI(true); @@ -85,13 +85,16 @@ class my extends control $this->view->position[] = $this->lang->my->todo; /* Assign. */ - $this->view->dates = $this->loadModel('todo')->buildDateList(); - $this->view->todos = $this->todo->getList($type, $account, $status, 0, $pager); - $this->view->date = (int)$type == 0 ? date(DT_DATE1) : date(DT_DATE1, strtotime($type)); - $this->view->type = is_numeric($type) ? 'bydate' : $type; - $this->view->status = $status; - $this->view->account = $this->app->user->account; - $this->view->pager = $pager; + $this->view->dates = $this->loadModel('todo')->buildDateList(); + $this->view->todos = $this->todo->getList($type, $account, $status, 0, $pager, $orderBy); + $this->view->date = (int)$type == 0 ? date(DT_DATE1) : date(DT_DATE1, strtotime($type)); + $this->view->type = is_numeric($type) ? 'bydate' : $type; + $this->view->recTotal = $recTotal; + $this->view->recPerPage = $recPerPage; + $this->view->status = $status; + $this->view->account = $this->app->user->account; + $this->view->orderBy = $orderBy; + $this->view->pager = $pager; $this->view->importFuture = ($type != 'today'); $this->display(); diff --git a/module/my/view/todo.html.php b/module/my/view/todo.html.php index ed75247661..839e0af349 100644 --- a/module/my/view/todo.html.php +++ b/module/my/view/todo.html.php @@ -12,7 +12,6 @@ ?> -
@@ -53,16 +52,17 @@
+ - - - - - - - - + + + + + + + +
idAB;?>todo->date;?>todo->type;?>priAB;?>todo->name;?>todo->beginAB;?>todo->endAB;?>todo->status;?> idAB);?>todo->date);?>todo->type);?> priAB);?> todo->name);?>todo->beginAB);?>todo->endAB);?>todo->status);?> actions;?>