+ finish task #551.

This commit is contained in:
wangchunsheng
2011-10-10 03:33:42 +00:00
parent 5eff52fa23
commit 26a61c522a
3 changed files with 61 additions and 66 deletions
+46 -61
View File
@@ -24,26 +24,30 @@ var browseType = '<?php echo $browseType;?>';
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<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>
<th class='w-date'> <?php common::printOrderLink('deadline', $orderBy, $vars, $lang->task->deadlineAB);?></th>
<th class='w-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='w-70px'> <?php common::printOrderLink('deadline', $orderBy, $vars, $lang->task->deadlineAB);?></th>
<?php if($this->cookie->windowWidth > $this->config->wideSize):?>
<th class='w-id'> <?php common::printOrderLink('openedDate',$orderBy, $vars, $lang->task->openedDateAB);?></th>
<?php endif;?>
<th class='w-user'> <?php common::printOrderLink('assignedTo',$orderBy, $vars, $lang->task->assignedToAB);?></th>
<th class='w-user'> <?php common::printOrderLink('finishedBy',$orderBy, $vars, $lang->task->finishedByAB);?></th>
<?php if($this->cookie->windowWidth > $this->config->wideSize):?>
<th class='w-40px'> <?php common::printOrderLink('finishedDate',$orderBy, $vars, $lang->task->finishedDateAB);?></th>
<?php endif;?>
<th class='w-35px'> <?php common::printOrderLink('estimate', $orderBy, $vars, $lang->task->estimateAB);?></th>
<th class='w-40px'> <?php common::printOrderLink('consumed', $orderBy, $vars, $lang->task->consumedAB);?></th>
<th class='w-40px'> <?php common::printOrderLink('left', $orderBy, $vars, $lang->task->leftAB);?></th>
<th><?php common::printOrderLink('story', $orderBy, $vars, $lang->task->story);?></th>
<th class='w-150px {sorter:false}'><?php echo $lang->actions;?></th>
<th class='w-100px {sorter:false}'><?php echo $lang->actions;?></th>
</tr>
</thead>
<?php
$taskSum = 0;
$statusWait = 0;
$statusDone = 0;
$statusDoing = 0;
$statusClosed = 0;
$totalEstimate = 0.0;
$totalConsumed = 0.0;
$totalLeft = 0.0;
$taskSum = $statusWait = $statusDone = $statusDoing = $statusClosed = $statusCancel = 0;
$totalEstimate = $totalConsumed = $totalLeft = 0.0;
?>
<tbody>
<?php foreach($tasks as $task):?>
@@ -52,58 +56,42 @@ var browseType = '<?php echo $browseType;?>';
$totalEstimate += $task->estimate;
$totalConsumed += $task->consumed;
$totalLeft += (($task->status == 'cancel' or $task->closedReason == 'cancel') ? 0 : $task->left);
if($task->status == 'wait')
{
$statusWait ++;
}
elseif($task->status == 'doing')
{
$statusDoing ++;
}
elseif($task->status == 'done')
{
$statusDone ++;
}
elseif($task->status == 'closed')
{
$statusClosed ++;
}
$statusVar = 'status' . ucfirst($task->status);
$$statusVar ++;
?>
<tr class='a-center'>
<td><?php if(!common::printLink('task', 'view', "task=$task->id", sprintf('%03d', $task->id))) printf('%03d', $task->id);?></td>
<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 class=<?php echo $task->status;?> >
<?php
$storyChanged = ($task->storyStatus == 'active' and $task->latestStoryVersion > $task->storyVersion);
$storyChanged ? print("<span class='warning'>{$lang->story->changed}</span> ") : print($lang->task->statusList[$task->status]);
?>
</td>
<td class=<?php if(isset($task->delay)) echo 'delayed';?>><?php if(substr($task->deadline, 0, 4) > 0) echo substr($task->deadline, 5, 6);?></td>
<?php if($this->cookie->windowWidth > $this->config->wideSize):?>
<td><?php echo substr($task->openedDate, 5, 6);?></th>
<?php endif;?>
<td <?php echo $class;?>><?php echo $task->assignedToRealName;?></td>
<td><?php echo $users[$task->finishedBy];?></td>
<?php if($this->cookie->windowWidth > $this->config->wideSize):?>
<td><?php echo substr($task->finishedDate, 5, 6);?></th>
<?php endif;?>
<td><?php echo $task->estimate;?></td>
<td><?php echo $task->consumed;?></td>
<td><?php echo $task->left;?></td>
<td class=<?php if(isset($task->delay)) echo 'delayed';?>><?php if(substr($task->deadline, 0, 4) > 0) echo $task->deadline;?></td>
<td class=<?php echo $task->status;?> >
<?php
if($task->storyStatus == 'active' and $task->latestStoryVersion > $task->storyVersion)
{
echo "<span class='warning'>{$lang->story->changed}</span> ";
}
else
{
echo $lang->task->statusList[$task->status];
}
?>
</td>
<td class='a-left nobr'>
<?php
if($task->storyID)
{
if(common::hasPriv('story', 'view'))
{
echo html::a($this->createLink('story', 'view', "storyid=$task->storyID"), $task->storyTitle);
}
else
{
echo $task->storyTitle;
}
}
$story = '';
if($task->storyID and common::hasPriv('story', 'view')) $story = html::a($this->createLink('story', 'view', "storyid=$task->storyID"), $task->storyTitle);
if($task->storyID and !common::hasPriv('story', 'view')) $story = $task->storyTitle;
echo $story;
?>
</td>
<td>
@@ -119,12 +107,9 @@ var browseType = '<?php echo $browseType;?>';
</tbody>
<tfoot>
<tr>
<td colspan='12'>
<div class='f-left'>
<?php
printf($lang->project->taskSummary, count($tasks), $statusWait, $statusDoing, $totalEstimate, $totalConsumed, $totalLeft);
?>
</div>
<?php $columns = $this->cookie->windowWidth > $this->config->wideSize ? 14 : 12;?>
<td colspan='<?php echo $columns;?>'>
<div class='f-left'><?php printf($lang->project->taskSummary, count($tasks), $statusWait, $statusDoing, $totalEstimate, $totalConsumed, $totalLeft);?></div>
<?php $pager->show();?>
</td>
</tr>
+7 -2
View File
@@ -36,22 +36,27 @@ $lang->task->type = 'Type';
$lang->task->pri = 'Pri';
$lang->task->mailto = 'Mailto';
$lang->task->estimate = 'Estimate';
$lang->task->estimateAB = 'Estimate';
$lang->task->estimateAB = 'Est';
$lang->task->left = 'Left';
$lang->task->leftAB = 'Left';
$lang->task->consumed = 'Consumed';
$lang->task->consumedAB = 'Consumed';
$lang->task->consumedAB = 'Use';
$lang->task->deadline = 'Deadline';
$lang->task->deadlineAB = 'Deadline';
$lang->task->status = 'Status';
$lang->task->statusCustom = 'Status Order';
$lang->task->desc = 'Desc';
$lang->task->assignedTo = 'Assigned To';
$lang->task->assignedToAB = 'Assign';
$lang->task->assignedDate = 'Assigned Date';
$lang->task->openedBy = 'Opened By';
$lang->task->openedByAB = 'Open';
$lang->task->openedDate = 'Opened Date';
$lang->task->openedDateAB = 'Open';
$lang->task->finishedBy = 'Finished By';
$lang->task->finishedByAB = 'Finishe';
$lang->task->finishedDate = 'Finished Date';
$lang->task->finishedDateAB = 'Date';
$lang->task->canceledBy = 'Canceled By';
$lang->task->canceledDate = 'Canceled Date';
$lang->task->closedBy = 'Closed By';
+8 -3
View File
@@ -36,22 +36,27 @@ $lang->task->type = '任务类型';
$lang->task->pri = '优先级';
$lang->task->mailto = '抄送给';
$lang->task->estimate = '最初预计';
$lang->task->estimateAB = '预计';
$lang->task->estimateAB = '预';
$lang->task->left = '预计剩余';
$lang->task->leftAB = '剩余';
$lang->task->leftAB = '剩';
$lang->task->consumed = '已经消耗';
$lang->task->consumedAB = '消耗';
$lang->task->consumedAB = '耗';
$lang->task->deadline = '截止日期';
$lang->task->deadlineAB = '截止';
$lang->task->status = '任务状态';
$lang->task->statusCustom = '状态排序';
$lang->task->desc = '任务描述';
$lang->task->assignedTo = '指派给';
$lang->task->assignedToAB = '指派给';
$lang->task->assignedDate = '指派日期';
$lang->task->openedBy = '由谁创建';
$lang->task->openedByAB = '创建者';
$lang->task->openedDate = '创建日期';
$lang->task->openedDateAB = '创建';
$lang->task->finishedBy = '由谁完成';
$lang->task->finishedByAB = '完成者';
$lang->task->finishedDate = '完成时间';
$lang->task->finishedDateAB = '完成';
$lang->task->canceledBy = '由谁取消';
$lang->task->canceledDate = '取消时间';
$lang->task->closedBy = '由谁关闭';