diff --git a/module/my/control.php b/module/my/control.php index 562e8b0827..8740535aaf 100644 --- a/module/my/control.php +++ b/module/my/control.php @@ -89,10 +89,11 @@ class my extends control /** * My tasks. * + * @param string $type the browse type * @access public * @return void */ - public function task() + public function task($type = 'assignedto') { /* Save session. */ $this->session->set('taskList', $this->app->getURI(true)); @@ -102,7 +103,9 @@ class my extends control $this->view->header->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->task; $this->view->position[] = $this->lang->my->task; $this->view->tabID = 'task'; - $this->view->tasks = $this->loadModel('task')->getUserTasks($this->app->user->account, 'wait,doing'); + $this->view->tasks = $this->loadModel('task')->getUserTasks($this->app->user->account, $type); + $this->view->type = $type; + $this->view->users = $this->loadModel('user')->getPairs('noletter'); $this->display(); } diff --git a/module/my/lang/en.php b/module/my/lang/en.php index a48adeb067..36a8ada467 100644 --- a/module/my/lang/en.php +++ b/module/my/lang/en.php @@ -1,7 +1,7 @@ my->common = 'Dashboard'; -/* 方法列表。*/ +/* Methods. */ $lang->my->index = 'Index'; $lang->my->todo = 'Todo'; $lang->my->task = 'Task'; @@ -12,3 +12,9 @@ $lang->my->project = 'Project'; $lang->my->team = 'Team'; $lang->my->profile = 'Profile'; $lang->my->editProfile = 'Edit profile'; + +$lang->my->taskMenu->assignedToMe = 'To me'; +$lang->my->taskMenu->openedByMe = 'My opened'; +$lang->my->taskMenu->finishedByMe = 'My finished'; +$lang->my->taskMenu->closedByMe = 'My closed'; +$lang->my->taskMenu->canceledByMe = 'My canceled'; diff --git a/module/my/lang/zh-cn.php b/module/my/lang/zh-cn.php index c26e456e15..22b8c186bb 100644 --- a/module/my/lang/zh-cn.php +++ b/module/my/lang/zh-cn.php @@ -12,3 +12,9 @@ $lang->my->project = '我的项目'; $lang->my->team = '我的团队'; $lang->my->profile = '我的档案'; $lang->my->editProfile = '更新信息'; + +$lang->my->taskMenu->assignedToMe = '指派给我'; +$lang->my->taskMenu->openedByMe = '由我创建'; +$lang->my->taskMenu->finishedByMe = '由我完成'; +$lang->my->taskMenu->closedByMe = '由我关闭'; +$lang->my->taskMenu->canceledByMe = '由我取消'; diff --git a/module/my/view/bug.html.php b/module/my/view/bug.html.php index 06bb045e74..fe7231c933 100644 --- a/module/my/view/bug.html.php +++ b/module/my/view/bug.html.php @@ -63,7 +63,5 @@ show();?> - + diff --git a/module/my/view/task.html.php b/module/my/view/task.html.php index 3a6f1df2bb..05db380791 100644 --- a/module/my/view/task.html.php +++ b/module/my/view/task.html.php @@ -13,19 +13,33 @@
| idAB;?> | priAB;?> | -task->project;?> | +task->project;?> | task->name;?> | task->estimateAB;?> | task->consumedAB;?> | task->leftAB;?> | task->deadlineAB;?> | statusAB;?> | -actions;?> | +openedByAB;?> | +actions;?> | left;?> | delay)) echo 'delayed';?>>deadline, 0, 4) > 0) echo $task->deadline;?> | task->statusList[$task->status];?> | -createLink('task', 'edit', "taskID=$task->id"), $lang->task->edit, '_blank');?> | +openedBy];?> | ++ status == 'wait') and common::printLink('task', 'start', "taskID=$task->id", $lang->task->buttonStart))) echo $lang->task->buttonStart . ' '; + if(!(($task->status == 'wait' or $task->status == 'doing') and common::printLink('task', 'finish', "taskID=$task->id", $lang->task->buttonDone))) echo $lang->task->buttonDone . ' '; + if(!(($task->status == 'done' or $task->status == 'cancel') and common::printLink('task', 'close', "taskID=$task->id", $lang->task->buttonClose))) echo $lang->task->buttonClose . ' '; + if(!(($task->status == 'closed' or $task->status == 'done' or $task->status == 'cancel') and common::printLink('task', 'activate', "taskID=$task->id", $lang->task->buttonActivate))) echo $lang->task->buttonActivate . ' '; + ?> + |
|---|