* adjust the task actions logic.

This commit is contained in:
wangchunsheng
2010-08-02 14:45:03 +00:00
parent fa814dc0e7
commit a9b366f5cb
6 changed files with 34 additions and 13 deletions
+3 -5
View File
@@ -156,7 +156,6 @@ class task extends control
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
}
/* 导航信息。*/
$this->view->header->title = $this->lang->task->logEfforts;
$this->view->position[] = $this->lang->task->logEfforts;
@@ -164,7 +163,6 @@ class task extends control
$this->display();
}
/* 查看任务。*/
public function view($taskID)
{
@@ -213,7 +211,7 @@ class task extends control
if($this->post->comment != '' or !empty($changes))
{
$action = !empty($changes) ? 'Edited' : 'Commented';
$action = !empty($changes) ? 'Started' : 'Commented';
$actionID = $this->action->create('task', $taskID, $action, $this->post->comment);
$this->action->logHistory($actionID, $changes);
$this->sendmail($taskID, $actionID);
@@ -243,7 +241,7 @@ class task extends control
if($this->post->comment != '' or !empty($changes))
{
$action = !empty($changes) ? 'Edited' : 'Commented';
$action = !empty($changes) ? 'Finished' : 'Commented';
$actionID = $this->action->create('task', $taskID, $action, $this->post->comment);
$this->action->logHistory($actionID, $changes);
$this->sendmail($taskID, $actionID);
@@ -273,7 +271,7 @@ class task extends control
if($this->post->comment != '' or !empty($changes))
{
$action = !empty($changes) ? 'Edited' : 'Commented';
$action = !empty($changes) ? 'Canceled' : 'Commented';
$actionID = $this->action->create('task', $taskID, $action, $this->post->comment);
$this->action->logHistory($actionID, $changes);
$this->sendmail($taskID, $actionID);