* Finish task #9006.
This commit is contained in:
@@ -84,13 +84,24 @@ class product extends control
|
||||
|
||||
$this->app->loadLang('my');
|
||||
$this->app->loadLang('program');
|
||||
$this->view->projectStats = $this->product->getProjectStatsByProduct($productID, $status, $branch, $PRJMine);
|
||||
|
||||
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->product->project;
|
||||
$this->view->position[] = $this->products[$productID];
|
||||
$this->view->position[] = $this->lang->product->project;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->status = $status;
|
||||
/* Get PM id list. */
|
||||
$accounts = array();
|
||||
$projectStats = $this->product->getProjectStatsByProduct($productID, $status, $branch, $PRJMine);
|
||||
foreach($projectStats as $project)
|
||||
{
|
||||
if(!empty($project->PM) and !in_array($project->PM, $accounts)) $accounts[] = $project->PM;
|
||||
}
|
||||
$PMList = $this->user->getListByAccounts($accounts, 'account');
|
||||
|
||||
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->product->project;
|
||||
$this->view->position[] = $this->products[$productID];
|
||||
$this->view->position[] = $this->lang->product->project;
|
||||
$this->view->projectStats = $projectStats;
|
||||
$this->view->PMList = $PMList;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->status = $status;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,10 @@
|
||||
<td><?php printf('%03d', $project->id);?></td>
|
||||
<td class='text-left'><?php echo html::a($this->createLink('project', 'task', 'project=' . $project->id, '', false, $project->id), $project->name, '_parent');?></td>
|
||||
<td><?php echo isset($project->programName) ? $project->programName : '';?></td>
|
||||
<td><?php echo $project->PM;?></td>
|
||||
<td>
|
||||
<?php $userID = isset($PMList[$project->PM]) ? $PMList[$project->PM]->id : ''?>
|
||||
<?php if(!empty($project->PM)) echo html::a($this->createLink('user', 'profile', "userID=$userID", '', true), zget($users, $project->PM), '', "data-toggle='modal' data-type='iframe' data-width='600'");?>
|
||||
</td>
|
||||
<td><?php echo $project->begin;?></td>
|
||||
<td><?php echo $project->end;?></td>
|
||||
<?php $status = $this->processStatus('project', $project);?>
|
||||
|
||||
@@ -78,14 +78,23 @@ class program extends control
|
||||
$programs = $this->program->getPGMList($status, $orderBy, null, true);
|
||||
}
|
||||
|
||||
/* Get PM id list. */
|
||||
$accounts = array();
|
||||
foreach($programs as $program)
|
||||
{
|
||||
if(!empty($program->PM) and !in_array($program->PM, $accounts)) $accounts[] = $program->PM;
|
||||
}
|
||||
$PMList = $this->loadModel('user')->getListByAccounts($accounts, 'account');
|
||||
|
||||
$this->view->title = $this->lang->program->PGMBrowse;
|
||||
$this->view->position[] = $this->lang->program->PGMBrowse;
|
||||
|
||||
$this->view->programs = $programs;
|
||||
$this->view->status = $status;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->users = $this->user->getPairs('noletter');
|
||||
$this->view->programType = $programType;
|
||||
$this->view->PMList = $PMList;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -1684,7 +1684,10 @@ class programModel extends model
|
||||
echo $PRJProgram;
|
||||
break;
|
||||
case 'PM':
|
||||
echo zget($users, $project->PM);
|
||||
$user = $this->loadModel('user')->getByID($project->PM, 'account');
|
||||
$userID = !empty($user) ? $user->id : '';
|
||||
$PMLink = helper::createLink('user', 'profile', "userID=$userID", '', true);
|
||||
echo empty($project->PM) ? '' : html::a($PMLink, zget($users, $project->PM), '', "data-toggle='modal' data-type='iframe' data-width='600'");
|
||||
break;
|
||||
case 'begin':
|
||||
echo $project->begin;
|
||||
|
||||
@@ -52,7 +52,10 @@
|
||||
<?php echo html::a($this->createLink('program', 'index', "programID=$program->id", '', '', $program->id), $program->name);?>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
<td><?php echo zget($users, $program->PM);?></td>
|
||||
<td>
|
||||
<?php $userID = isset($PMList[$program->PM]) ? $PMList[$program->PM]->id : ''?>
|
||||
<?php if(!empty($program->PM)) echo html::a($this->createLink('user', 'profile', "userID=$userID", '', true), zget($users, $program->PM), '', "data-toggle='modal' data-type='iframe' data-width='600'");?>
|
||||
</td>
|
||||
<td class='text-left'><?php echo $program->budget != 0 ? $program->budget . ' ' . zget($lang->program->unitList, $program->budgetUnit) : $lang->program->future;?></td>
|
||||
<td class='c-status'><span class="status-program status-<?php echo $program->status?>"><?php echo zget($lang->project->statusList, $program->status, '');?></span></td>
|
||||
<td><?php echo $program->begin;?></td>
|
||||
|
||||
Reference in New Issue
Block a user