* Finish task #8123.
This commit is contained in:
@@ -457,7 +457,7 @@ class program extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function createStakeholder($programID = 0, $dept = '')
|
||||
public function createStakeholder($programID = 0, $dept = '', $parentID = 0)
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
@@ -476,13 +476,14 @@ class program extends control
|
||||
$this->view->title = $this->lang->program->createStakeholder;
|
||||
$this->view->position[] = $this->lang->program->createStakeholder;
|
||||
|
||||
$this->view->programID = $programID;
|
||||
$this->view->program = $this->program->getPRJByID($programID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('nodeleted');
|
||||
$this->view->deptUsers = $deptUsers;
|
||||
$this->view->dept = $dept;
|
||||
$this->view->depts = array('' => '') + $this->dept->getOptionMenu();
|
||||
$this->view->stakeholders = $this->program->getStakeholders($programID, 't1.id_desc');
|
||||
$this->view->programID = $programID;
|
||||
$this->view->program = $this->program->getPGMByID($programID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('nodeleted');
|
||||
$this->view->deptUsers = $deptUsers;
|
||||
$this->view->dept = $dept;
|
||||
$this->view->depts = array('' => '') + $this->dept->getOptionMenu();
|
||||
$this->view->stakeholders = $this->program->getStakeholders($programID, 't1.id_desc');
|
||||
$this->view->parentStakeholders = $this->program->getStakeholders($parentID, 't1.id_desc');
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -183,6 +183,7 @@ $lang->program->PGMExport = '导出';
|
||||
$lang->program->PGMManageGroupMember = '维护分组用户';
|
||||
$lang->program->PGMStakeholder = '干系人列表';
|
||||
$lang->program->createStakeholder = '添加干系人';
|
||||
$lang->program->importStakeholder = '从父项目导入';
|
||||
|
||||
/* Fields. */
|
||||
$lang->program->PGMName = '项目集名称';
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
<span class='input-group-addon'><?php echo $lang->project->selectDept?></span>
|
||||
<?php echo html::select('dept', $depts, $dept, "class='form-control chosen' onchange='setDeptUsers(this)' data-placeholder='{$lang->project->selectDeptTitle}'");?>
|
||||
</div>
|
||||
<?php if($program->parent):?>
|
||||
<?php echo html::a($this->createLink('program', 'createStakeholder', "programID=$programID&dept=&parent=$program->parent"), $lang->program->importStakeholder, '', 'class="btn btn-primary"');?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<div id='mainContent' class='main-content'>
|
||||
@@ -48,6 +51,17 @@
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
|
||||
<?php foreach($parentStakeholders as $stakeholder):?>
|
||||
<?php if(!isset($users[$stakeholder->account])) continue;?>
|
||||
<tr>
|
||||
<td><?php echo html::select("accounts[]", $users, $stakeholder->account, "class='form-control chosen'");?></td>
|
||||
<td class='c-actions text-center'>
|
||||
<a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
|
||||
<a href='javascript:;' onclick='deleteItem(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
|
||||
<?php foreach($deptUsers as $deptAccount => $userName):?>
|
||||
<?php if(!isset($users[$deptAccount])) continue;?>
|
||||
<tr class='addedItem'>
|
||||
|
||||
Reference in New Issue
Block a user