+ 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();
}
+4
View File
@@ -92,7 +92,11 @@ $lang->project->delayed = 'Delayed';
$lang->project->groups['story'] = 'Group by story';
$lang->project->groups['status'] = 'Group by status';
$lang->project->groups['pri'] = 'Group by priority';
$lang->project->groups['openedby'] = 'Group by openedBy';
$lang->project->groups['assignedTo']= 'Group by assignedTo';
$lang->project->groups['finishedby']= 'Group by finishedBy';
$lang->project->groups['closedby'] = 'Group by closedBy';
$lang->project->groups['estimate'] = 'Group by estimate';
$lang->project->groups['consumed'] = 'Group by consumed';
$lang->project->groups['left'] = 'Group by left';
+3
View File
@@ -92,7 +92,10 @@ $lang->project->delayed = '已延期';
$lang->project->groups['story'] = '需求分组';
$lang->project->groups['status'] = '状态分组';
$lang->project->groups['pri'] = '优先级分组';
$lang->project->groups['openedby'] = '创建者分组';
$lang->project->groups['assignedTo']= '指派给分组';
$lang->project->groups['finishedby']= '完成者分组';
$lang->project->groups['closedby'] = '关闭者分组';
$lang->project->groups['estimate'] = '预计分组';
$lang->project->groups['consumed'] = '已消耗分组';
$lang->project->groups['left'] = '剩余分组';
+2
View File
@@ -20,6 +20,7 @@
<th><?php echo $lang->task->name;?></th>
<th class='w-pri'><?php echo $lang->priAB;?></th>
<th class='w-user'><?php echo $lang->task->assignedTo;?></th>
<th class='w-user'><?php echo $lang->task->finishedBy;?></th>
<th><?php echo $lang->task->estimateAB;?></th>
<th><?php echo $lang->task->consumedAB;?></th>
<th><?php echo $lang->task->leftAB;?></th>
@@ -41,6 +42,7 @@
<td class='a-left'>&nbsp;<?php echo $task->id . $lang->colon; if(common::hasPriv('task', 'view')) echo html::a($this->createLink('task', 'view', "task=$task->id"), $task->name); else echo $task->name;?></td>
<td><?php echo $task->pri;?></td>
<td <?php echo $assignedToClass;?>><?php echo $task->assignedToRealName;?></td>
<td><?php echo $users[$task->finishedBy];?></td>
<td><?php echo $task->estimate;?></td>
<td><?php echo $task->consumed;?></td>
<td><?php echo $task->left;?></td>
+2
View File
@@ -23,6 +23,7 @@
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='w-p30'> <?php common::printOrderLink('name', $orderBy, $vars, $lang->task->name);?></th>
<th class='w-user'> <?php common::printOrderLink('assignedTo',$orderBy, $vars, $lang->task->assignedTo);?></th>
<th class='w-user'> <?php common::printOrderLink('finishedBy',$orderBy, $vars, $lang->task->finishedBy);?></th>
<th class='w-hour'> <?php common::printOrderLink('estimate', $orderBy, $vars, $lang->task->estimateAB);?></th>
<th class='w-hour'> <?php common::printOrderLink('consumed', $orderBy, $vars, $lang->task->consumedAB);?></th>
<th class='w-hour'> <?php common::printOrderLink('left', $orderBy, $vars, $lang->task->leftAB);?></th>
@@ -40,6 +41,7 @@
<td><?php echo $lang->task->priList[$task->pri];?></td>
<td class='a-left nobr'><?php if(!common::printLink('task', 'view', "task=$task->id", $task->name)) echo $task->name;?></td>
<td <?php echo $class;?>><?php echo $task->assignedToRealName;?></td>
<td><?php echo $users[$task->finishedBy];?></td>
<td><?php echo $task->estimate;?></td>
<td><?php echo $task->consumed;?></td>
<td><?php echo $task->left;?></td>