diff --git a/module/program/config.php b/module/program/config.php index 9e64cb8da7..f8a55e865b 100644 --- a/module/program/config.php +++ b/module/program/config.php @@ -19,7 +19,7 @@ $config->program->editor->prjstart = array('id' => 'comment', 'tools' => 'sim $config->program->editor->prjactivate = array('id' => 'comment', 'tools' => 'simpleTools'); $config->program->list = new stdclass(); -$config->program->list->exportFields = 'id,name,code,template,category,status,begin,end,budget,PM,end,desc'; +$config->program->list->exportFields = 'id,name,code,template,product,status,begin,end,budget,PM,end,desc'; $config->program->PGMCreate = new stdclass(); $config->program->PGMEdit = new stdclass(); diff --git a/module/program/control.php b/module/program/control.php index ec93193063..223f92a406 100644 --- a/module/program/control.php +++ b/module/program/control.php @@ -133,7 +133,7 @@ class program extends control /** * Create a project. * - * @param string $template + * @param string $parentProgramID * @access public * @return void */ @@ -676,8 +676,8 @@ class program extends control { $program->PM = zget($users, $program->PM); $program->status = $this->processStatus('project', $program); - $program->template = zget($programLang->templateList, $program->template); - $program->product = zget($programLang->categoryList, $program->product); + $program->model = zget($programLang->modelList, $program->model); + $program->product = zget($programLang->productList, $program->product); $program->budget = $program->budget . zget($programLang->unitList, $program->budgetUnit); if($this->post->exportType == 'selected') @@ -869,14 +869,14 @@ class program extends control /** * Create a project. * - * @param string $template + * @param string $model * @param int $programID * @param string $from PRJ|PGM * @param int $copyProjectID * @access public * @return void */ - public function PRJCreate($template = 'waterfall', $programID = 0, $from = 'PRJ', $copyProjectID = '') + public function PRJCreate($model = 'waterfall', $programID = 0, $from = 'PRJ', $copyProjectID = '') { if($from == 'PRJ') { @@ -917,7 +917,7 @@ class program extends control $acl = $copyProgram->acl; $privway = $copyProgram->privway; $whitelist = $copyProgram->whitelist; - if(empty($template)) $template = $copyProgram->template; + if(empty($model)) $model = $copyProgram->model; } $this->view->title = $this->lang->program->PRJCreate; @@ -925,9 +925,9 @@ class program extends control $this->view->groups = $this->loadModel('group')->getPairs(); $this->view->pmUsers = $this->loadModel('user')->getPairs('noclosed|nodeleted|pmfirst'); - $this->view->programs = array('' => '') + $this->program->getPRJPairsByTemplate($template, $programID); + $this->view->programs = array('' => '') + $this->program->getPRJPairsByTemplate($model, $programID); $this->view->programID = $programID; - $this->view->template = $template; + $this->view->model = $model; $this->view->name = $name; $this->view->code = $code; $this->view->team = $team; diff --git a/module/program/lang/en.php b/module/program/lang/en.php index 261ef12281..36f5bee47c 100644 --- a/module/program/lang/en.php +++ b/module/program/lang/en.php @@ -79,8 +79,8 @@ $lang->program->unitList[''] = ''; $lang->program->unitList['yuan'] = 'Yuan'; $lang->program->unitList['dollar'] = 'Dollars'; -$lang->program->templateList['scrum'] = "Scrum"; -$lang->program->templateList['waterfall'] = "CMMI"; +$lang->program->modelList['scrum'] = "Scrum"; +$lang->program->modelList['waterfall'] = "CMMI"; $lang->program->PRJCategoryList['single'] = "Single product"; $lang->program->PRJCategoryList['multiple'] = "Multiple products"; diff --git a/module/program/lang/zh-cn.php b/module/program/lang/zh-cn.php index 7828f53b59..0458241fc7 100644 --- a/module/program/lang/zh-cn.php +++ b/module/program/lang/zh-cn.php @@ -79,8 +79,8 @@ $lang->program->unitList[''] = ''; $lang->program->unitList['yuan'] = '元'; $lang->program->unitList['dollar'] = 'Dollars'; -$lang->program->templateList['scrum'] = "Scrum"; -$lang->program->templateList['waterfall'] = "瀑布"; +$lang->program->modelList['scrum'] = "Scrum"; +$lang->program->modelList['waterfall'] = "瀑布"; $lang->program->PRJCategoryList['single'] = "单产品项目"; $lang->program->PRJCategoryList['multiple'] = "多产品项目"; diff --git a/module/program/model.php b/module/program/model.php index f8b94a2e00..bab50b3c11 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -292,7 +292,7 @@ class programModel extends model if(!empty($groupPriv)) { $newProgram = $groupPriv->program . ",$programID"; - $this->dao->update(TABLE_USERGROUP)->set('program')->eq($newProgram)->where('account')->eq($groupPriv->account)->andWhere('`group`')->eq($groupPriv->group)->exec(); + $this->dao->update(TABLE_USERGROUP)->set('PRJ')->eq($newProgram)->where('account')->eq($groupPriv->account)->andWhere('`group`')->eq($groupPriv->group)->exec(); } else { @@ -866,7 +866,7 @@ class programModel extends model } /** - * Get project pairs by template. + * Get project pairs by model. * * @param string $model * @param int $programID @@ -1228,7 +1228,7 @@ class programModel extends model echo html::a(helper::createLink('program', 'index', "projectID=$project->id"), $project->name); break; case 'PRJModel': - echo zget($this->lang->program->templateList, $project->model); + echo zget($this->lang->program->modelList, $project->model); break; case 'PRJPM': echo zget($users, $project->PM); diff --git a/module/program/view/pgmbrowsebygrid.html.php b/module/program/view/pgmbrowsebygrid.html.php index 65109a1487..89f94649d8 100644 --- a/module/program/view/pgmbrowsebygrid.html.php +++ b/module/program/view/pgmbrowsebygrid.html.php @@ -4,7 +4,7 @@
program->ongoingStage; ?>
- + project->weekend);?> @@ -29,7 +29,7 @@| program->PRJTemplate;?> | -program->templateList, $template, '');?> | + | program->modelList, $model, '');?> | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| program->PRJCode;?> | ||||||||||
| program->PRJCategory;?> | program->PRJLifeTimeList, '', "class='form-control'");?> | |||||||||
| program->PRJCategory;?> | program->PRJCategoryList, '', "class='form-control'");?> | @@ -88,7 +88,7 @@ | ||||||||
| project->days;?> | @@ -126,7 +126,7 @@ | |||||||||
diff --git a/module/program/view/prjedit.html.php b/module/program/view/prjedit.html.php
index 24d9b71243..a0370c2d2a 100644
--- a/module/program/view/prjedit.html.php
+++ b/module/program/view/prjedit.html.php
@@ -23,7 +23,7 @@
| ||||||||||