* Formated part code.

This commit is contained in:
liukmqd@gmail.com
2011-05-01 01:04:17 +00:00
parent 6199c52cce
commit 703b125687
2 changed files with 49 additions and 53 deletions
+48 -52
View File
@@ -28,14 +28,14 @@
<th colspan='2' class='a-left'><?php echo $lang->task->status;?></th>
</tr>
<?php
$taskSum = 0;
$statusWait = 0;
$statusDone = 0;
$statusDoing = 0;
$statusCancel = 0;
$totalEstimate = 0.0;
$totalConsumed = 0.0;
$totalLeft = 0.0;
$taskSum = 0;
$statusWait = 0;
$statusDone = 0;
$statusDoing = 0;
$statusCancel = 0;
$totalEstimate = 0.0;
$totalConsumed = 0.0;
$totalLeft = 0.0;
?>
<?php $i = 0;?>
<?php foreach($tasks as $groupKey => $groupTasks):?>
@@ -45,49 +45,49 @@
<td colspan='10'><?php if($groupByList) echo $groupByList[$groupKey];?></td>
</tr>
<?php
$groupWait = 0;
$groupDone = 0;
$groupDoing = 0;
$groupCancel = 0;
$groupEstimate = 0.0;
$groupConsumed = 0.0;
$groupLeft = 0.0;
$groupWait = 0;
$groupDone = 0;
$groupDoing = 0;
$groupCancel = 0;
$groupEstimate = 0.0;
$groupConsumed = 0.0;
$groupLeft = 0.0;
?>
<?php foreach($groupTasks as $task):?>
<?php $assignedToClass = $task->assignedTo == $app->user->account ? 'style=color:red' : '';?>
<?php $class = $task->assignedTo == $app->user->account ? 'style=color:red' : '';?>
<?php $taskLink = $this->createLink('task','view',"taskID=$task->id");
$totalEstimate += $task->estimate;
$totalConsumed += $task->consumed;
$totalLeft += $task->left;
<?php $taskLink = $this->createLink('task','view',"taskID=$task->id"); ?>
<?php
$totalEstimate += $task->estimate;
$totalConsumed += $task->consumed;
$totalLeft += $task->left;
$groupEstimate += $task->estimate;
$groupConsumed += $task->consumed;
$groupLeft += $task->left;
$groupEstimate += $task->estimate;
$groupConsumed += $task->consumed;
$groupLeft += $task->left;
if($task->status == 'wait')
{
$statusWait++;
$groupWait++;
}
elseif($task->status == 'doing')
{
$statusDoing++;
$groupDoing++;
}
elseif($task->status == 'done')
{
$statusDone++;
$groupDone++;
}
else
{
$statusCancel++;
$groupCancel++;
}
$groupSum = count($groupTasks);
$taskSum += count($tasks);
?>
if($task->status == 'wait')
{
$statusWait++;
$groupWait++;
}
elseif($task->status == 'doing')
{
$statusDoing++;
$groupDoing++;
}
elseif($task->status == 'done')
{
$statusDone++;
$groupDone++;
}
else
{
$statusCancel++;
$groupCancel++;
}
$groupSum = count($groupTasks);
$taskSum += count($tasks);
?>
<tr id='<?php echo $task->id;?>' class='a-center child-of-node-<?php echo $groupKey;?>'>
<td class='<?php echo $groupClass;?>'></td>
<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>
@@ -106,12 +106,8 @@
</td>
</tr>
<?php endforeach;?>
<tr><td colspan = 12 class ='a-right'><?php printf($lang->project->taskSummaryAll, $groupSum, $groupWait,$groupDoing,$groupDone,$groupCancel,$groupEstimate,$groupConsumed,$groupLeft);?></td></tr>
<?php endforeach;?>
<?php
if(count($tasks) == 0) $taskSum = 0;
else $taskSum = $taskSum/count($tasks);
?>
<tr><td colspan='12' class='a-right'><?php printf($lang->project->taskSummaryAll, $groupSum, $groupWait,$groupDoing,$groupDone,$groupCancel,$groupEstimate,$groupConsumed,$groupLeft);?></td></tr>
<?php endforeach;?>
</table>
<script language='Javascript'>$('#<?php echo $browseType;?>Tab').addClass('active');</script>
<?php include '../../common/view/footer.html.php';?>
+1 -1
View File
@@ -116,7 +116,7 @@ $lang->story->legendProjectAndTask = 'Project & task';
$lang->story->legendLinkStories = 'Related story';
$lang->story->legendChildStories = 'Child story';
$lang->story->legendSpec = 'Spec';
$lang->story->legendVerify = 'Verified standard';
$lang->story->legendVerify = 'Verify standard';
$lang->story->legendHistory = 'History';
$lang->story->legendVersion = 'Versions';
$lang->story->legendMisc = 'Misc';