* Adjusting the code of the personnel module.
This commit is contained in:
@@ -84,7 +84,6 @@ class personnel extends control
|
||||
$this->program->setPGMViewMenu($programID);
|
||||
|
||||
$inputPersonnel = $this->personnel->getInputPersonnel($programID, $browseType, $orderBy);
|
||||
echo array_keys($inputPersonnel);
|
||||
|
||||
$this->view->title = $this->lang->personnel->putInto;
|
||||
$this->view->position[] = $this->lang->personnel->putInto;
|
||||
|
||||
21
module/personnel/lang/de.php
Normal file
21
module/personnel/lang/de.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
$lang->personnel->accessible = 'List of accessible';
|
||||
$lang->personnel->putInto = 'Input personnel list';
|
||||
$lang->personnel->department = 'Department';
|
||||
$lang->personnel->realName = 'Name';
|
||||
$lang->personnel->userName = 'Account';
|
||||
$lang->personnel->job = 'Job';
|
||||
$lang->personnel->genders = 'Gender';
|
||||
$lang->personnel->project = 'Project';
|
||||
$lang->personnel->sprint = 'Sprint/Stage';
|
||||
$lang->personnel->user = 'Name';
|
||||
$lang->personnel->role = 'Role';
|
||||
$lang->personnel->search = 'Search';
|
||||
$lang->personnel->program = 'Program';
|
||||
$lang->personnel->emptyTip = 'No data.';
|
||||
|
||||
$lang->personnel->inputLabel['all'] = 'All';
|
||||
$lang->personnel->inputLabel['noempty'] = 'No empty';
|
||||
$lang->personnel->inputLabel['parent'] = 'Direct project';
|
||||
$lang->personnel->inputLabel['scrum'] = 'Scrum project';
|
||||
$lang->personnel->inputLabel['waterfall'] = 'Waterfall project';
|
||||
@@ -1,20 +1,21 @@
|
||||
<?php
|
||||
$lang->personnel->accessible = '可访问人员列表';
|
||||
$lang->personnel->putInto = '投入人员列表';
|
||||
$lang->personnel->department = '部门';
|
||||
$lang->personnel->realName = '真实姓名';
|
||||
$lang->personnel->userName = '用户名';
|
||||
$lang->personnel->job = '岗位';
|
||||
$lang->personnel->genders = '性别';
|
||||
$lang->personnel->project = '项目';
|
||||
$lang->personnel->sprint = '迭代/阶段';
|
||||
$lang->personnel->user = '用户';
|
||||
$lang->personnel->role = '角色';
|
||||
$lang->personnel->search = '搜索';
|
||||
$lang->personnel->program = '项目集';
|
||||
$lang->personnel->emptyTip = '暂无';
|
||||
|
||||
$lang->personnel->inputLabel['all'] = '全部';
|
||||
$lang->personnel->inputLabel['parent'] = '直属项目';
|
||||
$lang->personnel->inputLabel['exist'] = '非空项目';
|
||||
$lang->personnel->accessible = 'List of accessible';
|
||||
$lang->personnel->putInto = 'Input personnel list';
|
||||
$lang->personnel->department = 'Department';
|
||||
$lang->personnel->realName = 'Name';
|
||||
$lang->personnel->userName = 'Account';
|
||||
$lang->personnel->job = 'Job';
|
||||
$lang->personnel->genders = 'Gender';
|
||||
$lang->personnel->project = 'Project';
|
||||
$lang->personnel->sprint = 'Sprint/Stage';
|
||||
$lang->personnel->user = 'Name';
|
||||
$lang->personnel->role = 'Role';
|
||||
$lang->personnel->search = 'Search';
|
||||
$lang->personnel->program = 'Program';
|
||||
$lang->personnel->emptyTip = 'No data.';
|
||||
|
||||
$lang->personnel->inputLabel['all'] = 'All';
|
||||
$lang->personnel->inputLabel['noempty'] = 'No empty';
|
||||
$lang->personnel->inputLabel['parent'] = 'Direct project';
|
||||
$lang->personnel->inputLabel['scrum'] = 'Scrum project';
|
||||
$lang->personnel->inputLabel['waterfall'] = 'Waterfall project';
|
||||
|
||||
21
module/personnel/lang/fr.php
Normal file
21
module/personnel/lang/fr.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
$lang->personnel->accessible = 'List of accessible';
|
||||
$lang->personnel->putInto = 'Input personnel list';
|
||||
$lang->personnel->department = 'Department';
|
||||
$lang->personnel->realName = 'Name';
|
||||
$lang->personnel->userName = 'Account';
|
||||
$lang->personnel->job = 'Job';
|
||||
$lang->personnel->genders = 'Gender';
|
||||
$lang->personnel->project = 'Project';
|
||||
$lang->personnel->sprint = 'Sprint/Stage';
|
||||
$lang->personnel->user = 'Name';
|
||||
$lang->personnel->role = 'Role';
|
||||
$lang->personnel->search = 'Search';
|
||||
$lang->personnel->program = 'Program';
|
||||
$lang->personnel->emptyTip = 'No data.';
|
||||
|
||||
$lang->personnel->inputLabel['all'] = 'All';
|
||||
$lang->personnel->inputLabel['noempty'] = 'No empty';
|
||||
$lang->personnel->inputLabel['parent'] = 'Direct project';
|
||||
$lang->personnel->inputLabel['scrum'] = 'Scrum project';
|
||||
$lang->personnel->inputLabel['waterfall'] = 'Waterfall project';
|
||||
21
module/personnel/lang/vi.php
Normal file
21
module/personnel/lang/vi.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
$lang->personnel->accessible = 'List of accessible';
|
||||
$lang->personnel->putInto = 'Input personnel list';
|
||||
$lang->personnel->department = 'Department';
|
||||
$lang->personnel->realName = 'Name';
|
||||
$lang->personnel->userName = 'Account';
|
||||
$lang->personnel->job = 'Job';
|
||||
$lang->personnel->genders = 'Gender';
|
||||
$lang->personnel->project = 'Project';
|
||||
$lang->personnel->sprint = 'Sprint/Stage';
|
||||
$lang->personnel->user = 'Name';
|
||||
$lang->personnel->role = 'Role';
|
||||
$lang->personnel->search = 'Search';
|
||||
$lang->personnel->program = 'Program';
|
||||
$lang->personnel->emptyTip = 'No data.';
|
||||
|
||||
$lang->personnel->inputLabel['all'] = 'All';
|
||||
$lang->personnel->inputLabel['noempty'] = 'No empty';
|
||||
$lang->personnel->inputLabel['parent'] = 'Direct project';
|
||||
$lang->personnel->inputLabel['scrum'] = 'Scrum project';
|
||||
$lang->personnel->inputLabel['waterfall'] = 'Waterfall project';
|
||||
@@ -1,20 +1,23 @@
|
||||
<?php
|
||||
$lang->personnel->accessible = '可访问人员列表';
|
||||
$lang->personnel->putInto = '投入人员列表';
|
||||
$lang->personnel->department = '部门';
|
||||
$lang->personnel->realName = '真实姓名';
|
||||
$lang->personnel->userName = '用户名';
|
||||
$lang->personnel->job = '岗位';
|
||||
$lang->personnel->genders = '性别';
|
||||
$lang->personnel->project = '项目';
|
||||
$lang->personnel->sprint = '迭代/阶段';
|
||||
$lang->personnel->user = '用户';
|
||||
$lang->personnel->role = '角色';
|
||||
$lang->personnel->search = '搜索';
|
||||
$lang->personnel->program = '项目集';
|
||||
$lang->personnel->emptyTip = '暂无';
|
||||
$lang->personnel->accessible = '可访问人员列表';
|
||||
$lang->personnel->putInto = '投入人员列表';
|
||||
$lang->personnel->department = '部门';
|
||||
$lang->personnel->realName = '真实姓名';
|
||||
$lang->personnel->userName = '用户名';
|
||||
$lang->personnel->job = '岗位';
|
||||
$lang->personnel->genders = '性别';
|
||||
$lang->personnel->project = '项目';
|
||||
$lang->personnel->sprint = '迭代/阶段';
|
||||
$lang->personnel->user = '用户';
|
||||
$lang->personnel->role = '角色';
|
||||
$lang->personnel->search = '搜索';
|
||||
$lang->personnel->program = '项目集';
|
||||
$lang->personnel->emptyTip = '暂无';
|
||||
$lang->personnel->childrenStage = '子阶段';
|
||||
|
||||
$lang->personnel->inputLabel['all'] = '全部';
|
||||
$lang->personnel->inputLabel['parent'] = '直属项目';
|
||||
$lang->personnel->inputLabel['exist'] = '非空项目';
|
||||
$lang->personnel->inputLabel['all'] = '全部';
|
||||
$lang->personnel->inputLabel['noempty'] = '非空项目';
|
||||
$lang->personnel->inputLabel['parent'] = '直属项目';
|
||||
$lang->personnel->inputLabel['scrum'] = 'Scrum项目';
|
||||
$lang->personnel->inputLabel['waterfall'] = '瀑布项目';
|
||||
|
||||
|
||||
@@ -1,20 +1,23 @@
|
||||
<?php
|
||||
$lang->personnel->accessible = '可訪問人員列表';
|
||||
$lang->personnel->putInto = '投入人員列表';
|
||||
$lang->personnel->department = '部門';
|
||||
$lang->personnel->realName = '真實姓名';
|
||||
$lang->personnel->userName = '用戶名';
|
||||
$lang->personnel->job = '崗位';
|
||||
$lang->personnel->genders = '性別';
|
||||
$lang->personnel->project = '項目';
|
||||
$lang->personnel->sprint = '迭代/階段';
|
||||
$lang->personnel->user = '用戶';
|
||||
$lang->personnel->role = '角色';
|
||||
$lang->personnel->search = '搜索';
|
||||
$lang->personnel->program = '項目集';
|
||||
$lang->personnel->emptyTip = '暫無';
|
||||
$lang->personnel->accessible = '可訪問人員列表';
|
||||
$lang->personnel->putInto = '投入人員列表';
|
||||
$lang->personnel->department = '部門';
|
||||
$lang->personnel->realName = '真實姓名';
|
||||
$lang->personnel->userName = '用戶名';
|
||||
$lang->personnel->job = '崗位';
|
||||
$lang->personnel->genders = '性別';
|
||||
$lang->personnel->project = '項目';
|
||||
$lang->personnel->sprint = '迭代/階段';
|
||||
$lang->personnel->user = '用戶';
|
||||
$lang->personnel->role = '角色';
|
||||
$lang->personnel->search = '搜索';
|
||||
$lang->personnel->program = '項目集';
|
||||
$lang->personnel->emptyTip = '暫無';
|
||||
$lang->personnel->childrenStage = '子階段';
|
||||
|
||||
$lang->personnel->inputLabel['all'] = '全部';
|
||||
$lang->personnel->inputLabel['parent'] = '直屬項目';
|
||||
$lang->personnel->inputLabel['exist'] = '非空項目';
|
||||
$lang->personnel->inputLabel['all'] = '全部';
|
||||
$lang->personnel->inputLabel['noempty'] = '非空項目';
|
||||
$lang->personnel->inputLabel['parent'] = '直屬項目';
|
||||
$lang->personnel->inputLabel['scrum'] = 'Scrum項目';
|
||||
$lang->personnel->inputLabel['waterfall'] = '瀑布項目';
|
||||
|
||||
|
||||
@@ -66,18 +66,22 @@ class personnelModel extends model
|
||||
/* Get all projects under the current program. */
|
||||
$projects = $this->dao->select('id,model,type,template,parent,path,name')->from(TABLE_PROJECT)
|
||||
->where('type')->eq('project')
|
||||
->beginIF($browseType != 'parent')->andWhere('path')->like("%,{$programID},%")->fi()
|
||||
->andWhere('path')->like("%,$programID,%")
|
||||
->beginIF($browseType == 'scrum')->andWhere('model')->eq('scrum')->fi()
|
||||
->beginIF($browseType == 'waterfall')->andWhere('model')->eq('waterfall')->fi()
|
||||
->beginIF($browseType == 'parent')->andWhere('parent')->eq($programID)->fi()
|
||||
->andWhere('deleted')->eq('0')
|
||||
->orderBy($orderBy)
|
||||
->fetchAll('id');
|
||||
|
||||
$personnelList['projects'] = $projects;
|
||||
if(empty($projects)) return $personnelList;
|
||||
|
||||
$teams = $this->getTeams($projects);
|
||||
$personnelList['stages'] = $teams['stages'];
|
||||
$personnelList['sprints'] = $teams['sprints'];
|
||||
$personnelList['teams'] = $teams['teams'];
|
||||
$personnelList['sprintAndStage'] = $teams['sprintAndStage'];
|
||||
$personnelList['childrenStage'] = $teams['childrenStage'];
|
||||
$personnelList['teams'] = $teams['teams'];
|
||||
$personnelList['objectRows'] = $teams['objectRows'];
|
||||
|
||||
/* Get the program name for each level. */
|
||||
$programNameList = $this->getProgramPairs();
|
||||
@@ -90,7 +94,7 @@ class personnelModel extends model
|
||||
foreach($path as $program)
|
||||
{
|
||||
if($program == $id) continue;
|
||||
$programName .= '/'. $programNameList[$program];
|
||||
$programName .= '/' . $programNameList[$program];
|
||||
}
|
||||
$personnelList['projects'][$id]->programName = $programName;
|
||||
}
|
||||
@@ -101,60 +105,76 @@ class personnelModel extends model
|
||||
/**
|
||||
* Get team members for projects, stage, sprints.
|
||||
*
|
||||
* @param string $projects
|
||||
* @param object $projects
|
||||
* @access public
|
||||
* @return object
|
||||
* @return array
|
||||
*/
|
||||
public function getTeams($projects)
|
||||
{
|
||||
$sprintParent = array();
|
||||
$stageParent = array();
|
||||
foreach($projects as $project)
|
||||
{
|
||||
$project->model == 'scrum' ? $sprintParent[] = $project->id : $stageParent[] = $project->id;
|
||||
}
|
||||
|
||||
$sprints = $this->dao->select('id,model,type,template,parent,path,name')->from(TABLE_PROJECT)
|
||||
->where('type')->eq('sprint')
|
||||
->andWhere('parent')->in($sprintParent)
|
||||
/* Get all sprints and iterations under the project. */
|
||||
$projectKeys = array_keys($projects);
|
||||
$projectObjet = $this->dao->select('id,project,model,type,parent,path,grade,name')->from(TABLE_PROJECT)
|
||||
->where('project')->in($projectKeys)
|
||||
->andWhere('deleted')->eq('0')
|
||||
->fetchGroup('parent', 'id');
|
||||
->orderBy('id_desc')
|
||||
->fetchAll();
|
||||
|
||||
$stages = $this->dao->select('id,model,type,template,parent,path,name')->from(TABLE_PROJECT)
|
||||
->where('type')->eq('stage')
|
||||
->andWhere('parent')->in($stageParent)
|
||||
->andWhere('deleted')->eq('0')
|
||||
->fetchGroup('parent', 'id');
|
||||
|
||||
$rootIDList = array();
|
||||
foreach($stages as $stage)
|
||||
/* Get the team's root ID, separate the parent-child iteration. */
|
||||
$rootIDList = array();
|
||||
$sprintAndStage = array();
|
||||
$childrenStage = array();
|
||||
foreach($projectObjet as $id => $object)
|
||||
{
|
||||
foreach($stage as $stageFields)
|
||||
if($object->grade == 1)
|
||||
{
|
||||
$stageFields->children = $this->dao->select('id,model,type,template,parent,path,name')->from(TABLE_PROJECT)
|
||||
->where('type')->eq('stage')
|
||||
->andWhere('grade')->eq('2')
|
||||
->andWhere('path')->like(",$stageFields->id,%")
|
||||
->andWhere('deleted')->eq('0')
|
||||
->fetchAll('id');
|
||||
$childrenIDList = array_keys($stageFields->children);
|
||||
$rootIDList = array_merge($childrenIDList, $rootIDList);
|
||||
$rootIDList[] = $stageFields->id;
|
||||
$sprintAndStage[$object->project][] = $object;
|
||||
}
|
||||
}
|
||||
|
||||
foreach($sprints as $sprint)
|
||||
{
|
||||
foreach($sprint as $id => $data) $rootIDList[] = $id;
|
||||
else
|
||||
{
|
||||
$childrenStage[$object->parent][] = $object;
|
||||
}
|
||||
$rootIDList[] = $object->id;
|
||||
}
|
||||
|
||||
$teams = $this->dao->select('t1.id,t1.root,t1.type,t1.role,t1.account,t2.realname')->from(TABLE_TEAM)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.root=t2.id')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account=t2.account')
|
||||
->where('t1.root')->in($rootIDList)
|
||||
->andWhere('t1.type')->in('stage,sprint')
|
||||
->fetchGroup('root', 'id');
|
||||
|
||||
return array('sprints' => $sprints, 'stages' => $stages, 'teams' => $teams);
|
||||
/* Calculate the number of cross rows for iterations and sprints. */
|
||||
$objectRows = array();
|
||||
foreach($projects as $project)
|
||||
{
|
||||
$objectRows[$project->id] = isset($sprintAndStage[$project->id]) ? count($sprintAndStage[$project->id]) : 1;
|
||||
if(!isset($sprintAndStage[$project->id])) continue;
|
||||
foreach($sprintAndStage[$project->id] as $object)
|
||||
{
|
||||
$objectRows[$object->id] = 1;
|
||||
if($object->type == 'sprint')
|
||||
{
|
||||
$objectRows[$object->id] = isset($teams[$object->id]) ? count($teams[$object->id]) + 1 : 1;
|
||||
$objectRows[$project->id] += isset($teams[$object->id]) ? count($teams[$object->id]) + 1 : 0;;
|
||||
}
|
||||
elseif($object->type == 'stage' && isset($childrenStage[$object->id]))
|
||||
{
|
||||
$objectRows[$object->id] += count($childrenStage[$object->id]);
|
||||
foreach($childrenStage[$object->id] as $stage)
|
||||
{
|
||||
$objectRows[$stage->id] = isset($teams[$stage->id]) ? count($teams[$stage->id]) + 1 : 1;
|
||||
$objectRows[$object->id] += isset($teams[$stage->id]) ? count($teams[$stage->id]) : 0;
|
||||
$objectRows[$project->id] += $objectRows[$stage->id];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$objectRows[$object->id] = isset($teams[$object->id]) ? count($teams[$object->id]) + 1 : 1;
|
||||
$objectRows[$project->id] += $objectRows[$object->id];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return array('sprintAndStage' => $sprintAndStage, 'childrenStage' => $childrenStage, 'teams' => $teams, 'objectRows' => $objectRows);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -30,87 +30,99 @@
|
||||
<div class="main-col">
|
||||
<form class="main-table table-personnel" action="" data-ride="table">
|
||||
<?php $vars = "programID=$programID&browseType=$browseType&orderBy=%s";?>
|
||||
<?php $existChildrenStage = empty($inputPersonnel['childrenStage']) ? false : true;?>
|
||||
<table id="accessibleList" class="table table-bordered has-sort-head">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="w-160px"><?php echo $lang->personnel->program;?></th>
|
||||
<th class="w-100px"><?php echo common::printOrderLink('id', $orderBy, $vars, $lang->personnel->project);?></th>
|
||||
<th class="w-80px"><?php echo $lang->personnel->sprint;?></th>
|
||||
<?php if($existChildrenStage):?>
|
||||
<th class="w-80px"><?php echo $lang->personnel->childrenStage;?></th>
|
||||
<?php endif;?>
|
||||
<th class="w-60px"><?php echo $lang->personnel->user;?></th>
|
||||
<th class="w-60px"><?php echo $lang->personnel->role;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($inputPersonnel['projects'] as $project):?>
|
||||
<?php
|
||||
$sprintRow = isset($inputPersonnel['sprints'][$project->id]) ? count($inputPersonnel['sprints'][$project->id]) : 0;
|
||||
$stageRow = isset($inputPersonnel['stages'][$project->id]) ? count($inputPersonnel['stages'][$project->id]) : 0;
|
||||
if($browseType == 'exist' && $sprintRow == 0 && $stageRow == 0) continue; // If the stage or sprint is empty, skip it.
|
||||
|
||||
$teamMemberRow = 0;
|
||||
if($sprintRow > 0)
|
||||
{
|
||||
foreach($inputPersonnel['sprints'][$project->id] as $sprint)
|
||||
{
|
||||
$teamMemberRow += isset($inputPersonnel['teams'][$sprint->id]) ? count($inputPersonnel['teams'][$sprint->id]) : 0;
|
||||
}
|
||||
}
|
||||
if($stageRow > 0)
|
||||
{
|
||||
foreach($inputPersonnel['stages'][$project->id] as $stages)
|
||||
{
|
||||
$teamMemberRow += isset($inputPersonnel['teams'][$stages->id]) ? count($inputPersonnel['teams'][$stages->id]) : 0;
|
||||
}
|
||||
}
|
||||
$projectRow = $sprintRow + $stageRow + $teamMemberRow;
|
||||
?>
|
||||
<tr>
|
||||
<td class="text-ellipsis" rowspan="<?php echo $projectRow + 1;?>" title="<?php echo $project->programName;?>"><?php echo $project->programName;?></td>
|
||||
<td class="text-ellipsis" rowspan="<?php echo $projectRow + 1;?>" title="<?php echo $project->name;?>"><?php echo $project->name;?></td>
|
||||
<?php if($sprintRow == 0 && $stageRow == 0):?>
|
||||
<?php $projectRow = $inputPersonnel['objectRows'][$project->id];?>
|
||||
<?php if($browseType == 'noempty' && $projectRow == 1) continue;?>
|
||||
<td class="text-ellipsis" rowspan="<?php echo $projectRow;?>" title="<?php echo $project->programName;?>"><?php echo $project->programName;?></td>
|
||||
<td class="text-ellipsis" rowspan="<?php echo $projectRow;?>" title="<?php echo $project->name;?>"><?php echo $project->name;?></td>
|
||||
<?php if($projectRow == 1):?>
|
||||
<?php if($existChildrenStage):?>
|
||||
<td></td>
|
||||
<?php endif;?>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php if($sprintRow > 0):;?>
|
||||
<?php foreach($inputPersonnel['sprints'][$project->id] as $sprint):?>
|
||||
<?php $teamRow = isset($inputPersonnel['teams'][$sprint->id]) ? $inputPersonnel['teams'][$sprint->id] : 0;?>
|
||||
|
||||
<?php if(isset($inputPersonnel['sprintAndStage'][$project->id])):;?>
|
||||
<?php foreach($inputPersonnel['sprintAndStage'][$project->id] as $object):?>
|
||||
<?php $objectRow = $inputPersonnel['objectRows'][$object->id];?>
|
||||
<tr>
|
||||
<td class="text-ellipsis" rowspan="<?php echo $teamRow + 1;?>" title="<?php echo $sprint->name;?>"><?php echo $sprint->name;?></td>
|
||||
<td class="text-ellipsis" id="<?php echo $object->id;?>" rowspan="<?php echo $objectRow;?>" title="<?php echo $object->name;?>"><?php echo $object->name;?></td>
|
||||
<?php if($objectRow == 1):?>
|
||||
<?php if($existChildrenStage):?>
|
||||
<td></td>
|
||||
<?php endif;?>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php if($teamRow):?>
|
||||
<?php foreach($inputPersonnel['teams'][$sprint->id] as $team):?>
|
||||
<tr>
|
||||
<td><?php echo $team->realname;?></td>
|
||||
<td><?php echo $team->role;?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
|
||||
<?php if($object->type == 'sprint' && $objectRow > 1):?>
|
||||
<?php foreach($inputPersonnel['teams'][$object->id] as $team):?>
|
||||
<tr>
|
||||
<?php if($existChildrenStage):?>
|
||||
<td></td>
|
||||
<?php endif;?>
|
||||
<td><?php echo $team->realname;?></td>
|
||||
<td><?php echo $team->role;?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if($object->type == 'stage' && $object->grade == 1):?>
|
||||
<?php if(isset($inputPersonnel['childrenStage'][$object->id])):?>
|
||||
<?php foreach($inputPersonnel['childrenStage'][$object->id] as $stage):?>
|
||||
<tr>
|
||||
<?php $teamRow = $inputPersonnel['objectRows'][$stage->id];?>
|
||||
<td class="text-ellipsis" rowspan="<?php echo $teamRow;?>" title="<?php echo $stage->name;?>"><?php echo $stage->name;?></td>
|
||||
<?php if($teamRow == 1):?>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php if($teamRow > 1):?>
|
||||
<?php foreach($inputPersonnel['teams'][$stage->id] as $team):?>
|
||||
<tr>
|
||||
<td><?php echo $team->realname;?></td>
|
||||
<td><?php echo $team->role;?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
<?php endforeach;?>
|
||||
<?php else:?>
|
||||
<?php if(isset($inputPersonnel['teams'][$object->id])):?>
|
||||
<?php foreach($inputPersonnel['teams'][$object->id] as $team):?>
|
||||
<tr>
|
||||
<?php if($existChildrenStage):?>
|
||||
<td></td>
|
||||
<?php endif;?>
|
||||
<td><?php echo $team->realname;?></td>
|
||||
<td><?php echo $team->role;?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if($stageRow > 0):?>
|
||||
<?php foreach($inputPersonnel['stages'][$project->id] as $stages):?>
|
||||
<?php $teamRow = isset($inputPersonnel['teams'][$stages->id]) ? $inputPersonnel['teams'][$stages->id] : 0;?>
|
||||
<tr>
|
||||
<td class="text-ellipsis" rowspan="<?php echo $teamRow + 1;?>" title="<?php echo $stages->name;?>"><?php echo $stages->name;?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php if($teamRow):?>
|
||||
<?php foreach($inputPersonnel['teams'][$stages->id] as $team):?>
|
||||
<tr>
|
||||
<td><?php echo $team->realname;?></td>
|
||||
<td><?php echo $team->role;?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -71,7 +71,7 @@ class programplanModel extends model
|
||||
|
||||
$plans = $this->dao->select('*')->from(TABLE_PROJECT)
|
||||
->where('type')->eq('stage')
|
||||
->beginIF($browseType == 'all')->andWhere('path')->like(",$programID,%")->fi()
|
||||
->beginIF($browseType == 'all')->andWhere('project')->eq($programID)->fi()
|
||||
->beginIF($browseType == 'parent')->andWhere('parent')->eq($programID)->fi()
|
||||
->beginIF($browseType == 'children')->andWhere('parent')->eq($planID)->fi()
|
||||
->beginIF($productID)->andWhere('id')->in($projects)->fi()
|
||||
|
||||
Reference in New Issue
Block a user