Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
@@ -224,4 +224,4 @@ $(".btn[data-toggle='modalTeam']").click(function()
|
||||
{
|
||||
$('#modalTeam').modal('show');
|
||||
adjustSortBtn();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -88,4 +88,4 @@ $(document).ready(function()
|
||||
$('#teamTr').addClass('hidden');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1082,7 +1082,7 @@ class taskModel extends model
|
||||
|
||||
$taskList = array_keys($tasks);
|
||||
$children = $this->dao->select('*')->from(TABLE_TASK)->where('parent')->in($taskList)->orderBy('id_desc')->fetchGroup('parent');
|
||||
if($children) foreach($children as $key => $child) $tasks[$key]->children = $child;
|
||||
if(!empty($children)) foreach($children as $key => $child) $tasks[$key]->children = $child;
|
||||
$teams = $this->dao->select('*')->from(TABLE_TEAM)->where('task')->in($taskList)->fetchGroup('task');
|
||||
if($teams) foreach($teams as $key => $team) if(!empty($team)) $tasks[$key]->team = $team;
|
||||
|
||||
@@ -1362,7 +1362,7 @@ class taskModel extends model
|
||||
foreach($tasks as $task)
|
||||
{
|
||||
$task = $this->processTask($task);
|
||||
if(isset($task->children))
|
||||
if(!empty($task->children))
|
||||
{
|
||||
foreach($task->children as $child) $task = $this->processTask($child);
|
||||
}
|
||||
@@ -1393,7 +1393,7 @@ class taskModel extends model
|
||||
|
||||
/* Story changed or not. */
|
||||
$task->needConfirm = false;
|
||||
if($task->storyStatus == 'active' and $task->latestStoryVersion > $task->storyVersion) $task->needConfirm = true;
|
||||
if(!empty($task->storyStatus) and $task->storyStatus == 'active' and $task->latestStoryVersion > $task->storyVersion) $task->needConfirm = true;
|
||||
|
||||
/* Set product type for task. */
|
||||
if(isset($task->product))
|
||||
@@ -1832,16 +1832,17 @@ class taskModel extends model
|
||||
echo "</span>";
|
||||
break;
|
||||
case 'name':
|
||||
if(isset($branchGroups[$task->product][$task->branch])) echo "<span class='label label-info label-badge'>" . $branchGroups[$task->product][$task->branch] . '</span> ';
|
||||
if(!empty($task->product) && isset($branchGroups[$task->product][$task->branch])) echo "<span class='label label-info label-badge'>" . $branchGroups[$task->product][$task->branch] . '</span> ';
|
||||
if($modulePairs and $task->module) echo "<span class='label label-info label-badge'>" . $modulePairs[$task->module] . '</span> ';
|
||||
echo html::a($taskLink, $task->name, null, "style='color: $task->color'");
|
||||
if($task->fromBug) echo html::a(helper::createLink('bug', 'view', "id=$task->fromBug"), "[BUG#$task->fromBug]", '_blank', "class='bug'");
|
||||
if(!empty($task->children)) echo '<span class="task-toggle" data-id="'.$task->id.'"> <i class="icon icon-minus"></i> </span>';
|
||||
break;
|
||||
case 'type':
|
||||
echo $this->lang->task->typeList[$task->type];
|
||||
break;
|
||||
case 'status':
|
||||
$storyChanged = ($task->storyStatus == 'active' and $task->latestStoryVersion > $task->storyVersion);
|
||||
$storyChanged = (!empty($task->storyStatus) and $task->storyStatus == 'active' and $task->latestStoryVersion > $task->storyVersion);
|
||||
$storyChanged ? print("<span class='warning'>{$this->lang->story->changed}</span> ") : print($this->lang->task->statusList[$task->status]);
|
||||
break;
|
||||
case 'estimate':
|
||||
@@ -1899,7 +1900,7 @@ class taskModel extends model
|
||||
echo $this->lang->task->reasonList[$task->closedReason];
|
||||
break;
|
||||
case 'story':
|
||||
if($task->storyID)
|
||||
if(!empty($task->storyID))
|
||||
{
|
||||
if(!common::printLink('story', 'view', "storyid=$task->storyID", $task->storyTitle)) print $task->storyTitle;
|
||||
}
|
||||
@@ -1932,7 +1933,7 @@ class taskModel extends model
|
||||
common::printIcon('task', 'finish', "taskID=$task->id", $task, 'list', '', '', 'iframe', true);
|
||||
common::printIcon('task', 'close', "taskID=$task->id", $task, 'list', '', '', 'iframe', true);
|
||||
common::printIcon('task', 'edit',"taskID=$task->id", $task, 'list');
|
||||
if(!$task->team or !$task->children) common::printIcon('task', 'batchCreate', "project=$task->project&storyID=$task->story&moduleID=$task->module&taskID=$task->id", $task, 'list','plus','','','','',$this->lang->task->children);
|
||||
if(empty($task->team) or empty($task->children)) common::printIcon('task', 'batchCreate', "project=$task->project&storyID=$task->story&moduleID=$task->module&taskID=$task->id", $task, 'list','plus','','','','',$this->lang->task->children);
|
||||
break;
|
||||
}
|
||||
echo '</td>';
|
||||
|
||||
@@ -87,7 +87,6 @@
|
||||
<div class='article-content'><?php echo $task->storyVerify;?></div>
|
||||
</fieldset>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if(isset($task->cases) and $task->cases):?>
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->task->case;?></legend>
|
||||
@@ -98,7 +97,52 @@
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if(!empty($task->children)):?>
|
||||
<fieldset>
|
||||
<legend><?php echo $this->lang->task->children;?></legend>
|
||||
<table class='table table-hover table-data table-fixed'>
|
||||
<tr class='text-center'>
|
||||
<th class='w-60px'> <?php echo$lang->task->id;?></th>
|
||||
<th class='w-40px'> <?php echo$lang->task->lblPri;?></th>
|
||||
<th> <?php echo$lang->task->name;?></th>
|
||||
<th class='w-100px'><?php echo$lang->task->deadline;?></th>
|
||||
<th class='w-80px'> <?php echo$lang->task->assignedTo;?></th>
|
||||
<th class='w-90px'> <?php echo$lang->task->status;?></th>
|
||||
<th class='w-50px visible-lg'> <?php echo $lang->task->consumedAB . $lang->task->lblHour;?></th>
|
||||
<th class='w-50px visible-lg'><?php echo $lang->task->leftAB . $lang->task->lblHour;?></th>
|
||||
<th class='w-150px'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
<?php foreach($task->children as $child):?>
|
||||
<tr class='text-center'>
|
||||
<td><?php echo $child->id;?></td>
|
||||
<td>
|
||||
<?php
|
||||
echo "<span class='pri" . zget($this->lang->task->priList, $child->pri, $child->pri) . "'>";
|
||||
echo $child->pri == '0' ? '' : zget($this->lang->task->priList, $child->pri, $child->pri);
|
||||
echo "</span>";
|
||||
?>
|
||||
</td>
|
||||
<td class='text-left'><a href="<?php echo $this->createLink('task', 'view', "taskID=$child->id"); ?>"><?php echo $child->name;?></a></td>
|
||||
<td><?php echo $child->deadline;?></td>
|
||||
<td><?php if(isset($users[$child->assignedTo])) echo $users[$child->assignedTo];?></td>
|
||||
<td><?php echo zget($lang->task->statusList, $child->status);?></td>
|
||||
<td class='visible-lg'><?php echo $child->consumed;?></td>
|
||||
<td class='visible-lg'><?php echo $child->left;?></td>
|
||||
<td>
|
||||
<?php
|
||||
common::printIcon('task', 'assignTo', "projectID=$child->project&taskID=$child->id", $child, 'list', '', '', 'iframe', true);
|
||||
common::printIcon('task', 'start', "taskID=$child->id", $child, 'list', '', '', 'iframe', true);
|
||||
common::printIcon('task', 'recordEstimate', "taskID=$child->id", $child, 'list', 'time', '', 'iframe', true);
|
||||
common::printIcon('task', 'finish', "taskID=$child->id", $child, 'list', '', '', 'iframe', true);
|
||||
common::printIcon('task', 'close', "taskID=$child->id", $child, 'list', '', '', 'iframe', true);
|
||||
common::printIcon('task', 'edit',"taskID=$child->id", $child, 'list');
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
</fieldset>
|
||||
<?php endif;?>
|
||||
<?php echo $this->fetch('file', 'printFiles', array('files' => $task->files, 'fieldset' => 'true'));?>
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
<div class='actions'> <?php if(!$task->deleted) echo $actionLinks;?></div>
|
||||
|
||||
Reference in New Issue
Block a user