Merge branch 'master' of github.com:easysoft/zentaopms

This commit is contained in:
wangyidong
2017-12-19 17:21:43 +08:00
6 changed files with 34 additions and 40 deletions
+2 -2
View File
@@ -35,8 +35,8 @@
<tr class='text-center'>
<td><?php echo $build->id;?></td>
<td class='text-left'><?php echo html::a($this->createLink('build', 'view', "build=$build->id"), $build->name);?></td>
<td class='text-left' title="<?php echo $build->scmPath?>"><?php strpos($build->scmPath, 'http') === 0 ? printf(html::a($build->scmPath)) : printf($build->scmPath);?></td>
<td class='text-left' title="<?php echo $build->filePath?>"><?php strpos($build->filePath, 'http') === 0 ? printf(html::a($build->filePath)) : printf($build->filePath);?></td>
<td class='text-left' title="<?php echo $build->scmPath?>"><?php echo strpos($build->scmPath, 'http') === true ? html::a($build->scmPath) : $build->scmPath;?></td>
<td class='text-left' title="<?php echo $build->filePath?>"><?php echo strpos($build->filePath, 'http') === true ? html::a($build->filePath) : $build->filePath;?></td>
<td><?php echo $build->date?></td>
<td><?php echo $users[$build->builder]?></td>
<td class='text-right'>
+8
View File
@@ -290,6 +290,14 @@ class project extends control
{
$groupTasks[$task->$groupBy][] = $task;
}
if(isset($task->children))
{
foreach($task->children as $child)
{
$groupTasks[$child->assignedToRealName][] = $child;
}
$task->children = true;
}
}
/* Process closed data when group by assignedTo. */
if($groupBy == 'assignedTo' and isset($groupTasks['Closed']))
+11 -4
View File
@@ -564,7 +564,7 @@ class projectModel extends model
*
* @param int $projectID
* @access public
* @return void
* @return array
*/
public function close($projectID)
{
@@ -1681,7 +1681,7 @@ class projectModel extends model
*
* @param int $projectID
* @access public
* @return void
* @return array
*/
public function getBurnDataFlot($projectID = 0)
{
@@ -1835,7 +1835,7 @@ class projectModel extends model
*/
public function summary($tasks)
{
$taskSum = $statusWait = $statusDone = $statusDoing = $statusClosed = $statusCancel = $statusPause = 0;
$taskSum = $statusWait = $statusDone = $statusDoing = $statusClosed = $statusCancel = $statusPause = 0;
$totalEstimate = $totalConsumed = $totalLeft = 0.0;
foreach($tasks as $task)
@@ -1845,7 +1845,13 @@ class projectModel extends model
$totalLeft += (($task->status == 'cancel' or $task->closedReason == 'cancel') ? 0 : $task->left);
$statusVar = 'status' . ucfirst($task->status);
$$statusVar ++;
if(!empty($task->children)) $taskSum += count($task->children);
if(!empty($task->children)){
$taskSum += count($task->children);
foreach($task->children as $child)
{
if($child->status == 'wait') $statusWait ++;
}
}
$taskSum ++;
}
@@ -1921,6 +1927,7 @@ class projectModel extends model
* @param string $end
* @param string $type
* @param string|int $interval
* @param string $format
* @access public
* @return array
*/
+11 -34
View File
@@ -65,7 +65,7 @@
if($groupBy == 'assignedTo' and $groupName == '') $groupName = $this->lang->task->noAssigned;
?>
<?php
$rowspan = 0;
$groupSum = 0;
foreach($groupTasks as $taskKey => $task)
{
if(isset($currentFilter) and $currentFilter != 'all')
@@ -87,8 +87,6 @@
}
}
if(!empty($task->children)) $rowspan += count($task->children);
$groupEstimate += $task->estimate;
$groupConsumed += $task->consumed;
$groupLeft += ($task->status == 'cancel' ? 0 : $task->left);
@@ -99,7 +97,6 @@
if($task->status == 'closed') $groupClosed++;
}
$groupSum = count($groupTasks);
$rowspan += $groupSum;
?>
<?php $i = 0;?>
<?php foreach($groupTasks as $task):?>
@@ -107,7 +104,7 @@
<?php $taskLink = $this->createLink('task','view',"taskID=$task->id"); ?>
<tr class='text-center' data-id='<?php echo $groupIndex?>'>
<?php if($i == 0):?>
<td rowspan='<?php echo $rowspan?>' class='groupby text-left'>
<td rowspan='<?php echo $groupSum?>' class='groupby text-left'>
<?php echo html::a('###', "<i class='icon-caret-down'></i> " . $groupName, '', "class='expandGroup' data-action='expand' title='$groupName'");?>
<div class='groupSummary text' style='white-space:normal'>
<?php if($groupBy == 'assignedTo' and isset($members[$task->assignedTo])) printf($lang->project->memberHours, $users[$task->assignedTo], $members[$task->assignedTo]->totalHours);?>
@@ -116,8 +113,15 @@
</td>
<?php endif;?>
<td><?php echo $task->id;?></td>
<td><span class='<?php echo 'pri' . zget($lang->task->priList, $task->pri, $task->pri)?>'><?php echo zget($lang->task->priList, $task->pri, $task->pri);?></span></td>
<td class='text-left'><?php if(!empty($task->team)) echo '<span class="label">'.$lang->task->multipleAB.'</span> ';if(!common::printLink('task', 'view', "task=$task->id", $task->name)) echo $task->name;?></td>
<td><span class='<?php echo 'pri' . zget(array_keys($lang->task->priList), $task->pri, $task->pri)?>'><?php echo zget(array_keys($lang->task->priList), $task->pri, $task->pri);?></span></td>
<td class='text-left'>
<?php
if(!empty($task->team)) echo '<span class="label">' . $lang->task->multipleAB . '</span> ';
if(!empty($task->parent)) echo '<span class="label">' . $lang->task->childrenAB . '</span> ';
if(isset($task->children) && $task->children == true) echo '<span class="label">' . $lang->task->parentAB . '</span> ';
if(!common::printLink('task', 'view', "task=$task->id", $task->name)) echo $task->name;
?>
</td>
<td class='task-<?php echo $task->status;?>'><?php echo $lang->task->statusList[$task->status];?></td>
<td class='<?php if(isset($task->delay)) echo 'delayed';?>'><?php if(substr($task->deadline, 0, 4) > 0) echo $task->deadline;?></td>
<td <?php echo $assignedToClass;?>><?php echo $task->assignedToRealName;?></td>
@@ -132,33 +136,6 @@
<?php common::printIcon('task', 'delete', "projectID=$task->project&taskid=$task->id", '', 'list', '', 'hiddenwin');?>
</td>
</tr>
<?php if(!empty($task->children)):?>
<?php foreach($task->children as $key => $child):?>
<?php $class = $key == 0 ? 'table-child-top' : '';?>
<?php $class .= ($key + 1 == count($task->children)) ? ' table-child-bottom' : '';?>
<tr class='text-center table-children <?php echo $class;?>' data-id='<?php echo $groupIndex;?>'>
<td><?php echo $child->id;?></td>
<td>
<span class='<?php echo 'pri' . zget($lang->task->priList, $child->pri, $task->pri)?>'><?php echo zget($lang->task->priList, $child->pri, $child->pri);?></span>
</td>
<td class='text-left'><span class="label"><?php echo $lang->task->childrenAB;?></span> <?php if(!common::printLink('task', 'view', "task=$child->id", $child->name)) echo $child->name;?></td>
<td class='task-<?php echo $child->status;?>'><?php echo $lang->task->statusList[$child->status];?></td>
<td class='<?php if(isset($child->delay)) echo 'delayed';?>'><?php if(substr($child->deadline, 0, 4) > 0) echo $child->deadline;?></td>
<td <?php echo $assignedToClass;?>><?php echo $child->assignedToRealName;?></td>
<td><?php echo $users[$child->finishedBy];?></td>
<td><?php echo $child->estimate;?></td>
<td><?php echo $child->consumed;?></td>
<td><?php echo $child->left;?></td>
<td class='text-left'><?php echo $child->progress . '%';?></td>
<td><?php echo $lang->task->typeList[$child->type];?></td>
<td>
<?php common::printIcon('task', 'edit', "taskid=$child->id", '', 'list');?>
<?php common::printIcon('task', 'delete', "projectID=$child->project&taskid=$child->id", '', 'list', '', 'hiddenwin');?>
</td>
</tr>
<?php $i++;?>
<?php endforeach;?>
<?php endif;?>
<?php $i++;?>
<?php endforeach;?>
<?php if($i != 0):?>
+1
View File
@@ -103,6 +103,7 @@ $lang->task->transferTo = 'Transfer To';
$lang->task->children = 'Child';
$lang->task->childrenAB = 'Child';
$lang->task->parent = 'Parent Task';
$lang->task->parentAB = 'Parent Task';
$lang->task->lblPri = 'P';
$lang->task->lblHour = '(h)';
$lang->task->deniedNotice = 'This task can only be started by the first user in the team.';
+1
View File
@@ -103,6 +103,7 @@ $lang->task->transferTo = '转交给';
$lang->task->children = '子任务';
$lang->task->childrenAB = '子';
$lang->task->parent = '父任务';
$lang->task->parentAB = '父';
$lang->task->lblPri = 'P';
$lang->task->lblHour = '(h)';
$lang->task->deniedNotice = '此任务只允许由团队第一人开始。';