+ add finishedBy field to the list.

+ add others group fields.
This commit is contained in:
wangchunsheng
2010-12-01 13:38:53 +00:00
parent 726c37bc0f
commit f8a9ae4932
5 changed files with 28 additions and 0 deletions
+17
View File
@@ -132,6 +132,7 @@ class project extends control
$this->view->orderBy = $orderBy;
$this->view->browseType = strtolower($status);
$this->view->status = $status;
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->display();
}
@@ -164,6 +165,9 @@ class project extends control
$taskLang = $this->lang->task;
$groupByList = array();
$groupTasks = array();
/* Get users. */
$users = $this->loadModel('user')->getPairs('noletter');
foreach($tasks as $task)
{
if($groupBy == 'story')
@@ -179,6 +183,18 @@ class project extends control
{
$groupTasks[$task->assignedToRealName][] = $task;
}
elseif($groupBy == 'openedby')
{
$groupTasks[$users[$task->openedBy]][] = $task;
}
elseif($groupBy == 'finishedby')
{
$groupTasks[$users[$task->finishedBy]][] = $task;
}
elseif($groupBy == 'closedby')
{
$groupTasks[$users[$task->closedBy]][] = $task;
}
elseif($groupBy == 'type')
{
$groupTasks[$taskLang->typeList[$task->type]][] = $task;
@@ -195,6 +211,7 @@ class project extends control
$this->view->groupByList = $groupByList;
$this->view->browseType = 'group';
$this->view->groupBy = $groupBy;
$this->view->users = $users;
$this->display();
}