diff --git a/module/program/js/pgmcreate.js b/module/program/js/pgmcreate.js index a9161ac955..90ba15312b 100644 --- a/module/program/js/pgmcreate.js +++ b/module/program/js/pgmcreate.js @@ -11,3 +11,15 @@ function setAclList(programID) $('.aclBox').html($('#PGMAcl').html()); } } + +$('#future').on('change', function() +{ + if($(this).prop('checked')) + { + $('#budget').val('').attr('disabled', 'disabled'); + } + else + { + $('#budget').removeAttr('disabled'); + } +}); diff --git a/module/program/lang/de.php b/module/program/lang/de.php index 35c2ff6322..34768e659f 100644 --- a/module/program/lang/de.php +++ b/module/program/lang/de.php @@ -88,12 +88,13 @@ $lang->program->ac = 'AC'; $lang->program->cv = 'CV%'; $lang->program->PRJTeamCount = 'Team'; $lang->program->PRJLongTime = 'Long-Term Project'; +$lang->program->future = 'TBD'; $lang->program->productNotEmpty = 'Please link products or create products.'; $lang->program->existProductName = 'Product name already exists.'; $lang->program->unitList[''] = ''; -$lang->program->unitList['yuan'] = 'Yuan'; +$lang->program->unitList['yuan'] = 'Wanyuan'; $lang->program->unitList['dollar'] = 'Dollars'; $lang->program->modelList['scrum'] = "Scrum"; @@ -210,7 +211,7 @@ $lang->program->PGMDesc = 'Description'; $lang->program->PGMCode = 'Code'; $lang->program->PGMCopy = 'Copy Program'; $lang->program->PGMStatus = 'Status'; -$lang->program->PGMPM = 'Manager'; +$lang->program->PGMPM = 'Program manager'; $lang->program->PGMBudget = 'Budget'; $lang->program->PGMProgress = 'Progress'; $lang->program->PGMChildren = 'Child'; @@ -224,10 +225,10 @@ $lang->program->PGMShowClosed = 'Closed programs.'; $lang->program->PGMTips = 'By modifying the parent item set, the associateable product also changes and becomes required. If no item set is selected, a product with the same name as the item is created by default and associated with that item.'; $lang->program->PGMChangeTips = 'After modifying the parent program set, the products associated with the project will be cleared, and the requirements, bugs and other data under the project will also be affected, is it modified?'; -$lang->program->PGMAclList['private'] = "Private (accessible to project portfolio holders and stakeholders)"; +$lang->program->PGMAclList['private'] = "Private (accessible to project portfolio holders and stakeholders, stakeholders can follow up maintenance)"; $lang->program->PGMAclList['open'] = "Default(user who can visit the program can access it)"; -$lang->program->subPGMAclList['private'] = "Private (accessible to this program set leader and stakeholders)"; +$lang->program->subPGMAclList['private'] = "Private (accessible to this program set leader and stakeholders, stakeholders can follow up maintenance)"; $lang->program->subPGMAclList['open'] = "Default(user who can visit the program can access it)"; $lang->program->subPGMAclList['program'] = "Open within the program (accessible to all higher-level program directors and affiliates, as well as to this program director and affiliates)"; diff --git a/module/program/lang/en.php b/module/program/lang/en.php index bf683e7ef4..2039fb5070 100644 --- a/module/program/lang/en.php +++ b/module/program/lang/en.php @@ -88,12 +88,13 @@ $lang->program->ac = 'AC'; $lang->program->cv = 'CV%'; $lang->program->PRJTeamCount = 'Team'; $lang->program->PRJLongTime = 'Long-Term Project'; +$lang->program->future = 'TBD'; $lang->program->productNotEmpty = 'Please link products or create products.'; $lang->program->existProductName = 'Product name already exists.'; $lang->program->unitList[''] = ''; -$lang->program->unitList['yuan'] = 'Yuan'; +$lang->program->unitList['yuan'] = 'Wanyuan'; $lang->program->unitList['dollar'] = 'Dollars'; $lang->program->modelList['scrum'] = "Scrum"; @@ -210,7 +211,7 @@ $lang->program->PGMDesc = 'Description'; $lang->program->PGMCode = 'Code'; $lang->program->PGMCopy = 'Copy Program'; $lang->program->PGMStatus = 'Status'; -$lang->program->PGMPM = 'Manager'; +$lang->program->PGMPM = 'Program manager'; $lang->program->PGMBudget = 'Budget'; $lang->program->PGMProgress = 'Progress'; $lang->program->PGMChildren = 'Child'; @@ -224,10 +225,10 @@ $lang->program->PGMShowClosed = 'Closed programs.'; $lang->program->PGMTips = 'By modifying the parent item set, the associateable product also changes and becomes required. If no item set is selected, a product with the same name as the item is created by default and associated with that item.'; $lang->program->PGMChangeTips = 'After modifying the parent program set, the products associated with the project will be cleared, and the requirements, bugs and other data under the project will also be affected, is it modified?'; -$lang->program->PGMAclList['private'] = "Private (accessible to project portfolio holders and stakeholders)"; +$lang->program->PGMAclList['private'] = "Private (accessible to project portfolio holders and stakeholders, stakeholders can follow up maintenance)"; $lang->program->PGMAclList['open'] = "Default(user who can visit the program can access it)"; -$lang->program->subPGMAclList['private'] = "Private (accessible to this program set leader and stakeholders)"; +$lang->program->subPGMAclList['private'] = "Private (accessible to this program set leader and stakeholders, stakeholders can follow up maintenance)"; $lang->program->subPGMAclList['open'] = "Default(user who can visit the program can access it)"; $lang->program->subPGMAclList['program'] = "Open within the program (accessible to all higher-level program directors and affiliates, as well as to this program director and affiliates)"; diff --git a/module/program/lang/fr.php b/module/program/lang/fr.php index 35c2ff6322..34768e659f 100644 --- a/module/program/lang/fr.php +++ b/module/program/lang/fr.php @@ -88,12 +88,13 @@ $lang->program->ac = 'AC'; $lang->program->cv = 'CV%'; $lang->program->PRJTeamCount = 'Team'; $lang->program->PRJLongTime = 'Long-Term Project'; +$lang->program->future = 'TBD'; $lang->program->productNotEmpty = 'Please link products or create products.'; $lang->program->existProductName = 'Product name already exists.'; $lang->program->unitList[''] = ''; -$lang->program->unitList['yuan'] = 'Yuan'; +$lang->program->unitList['yuan'] = 'Wanyuan'; $lang->program->unitList['dollar'] = 'Dollars'; $lang->program->modelList['scrum'] = "Scrum"; @@ -210,7 +211,7 @@ $lang->program->PGMDesc = 'Description'; $lang->program->PGMCode = 'Code'; $lang->program->PGMCopy = 'Copy Program'; $lang->program->PGMStatus = 'Status'; -$lang->program->PGMPM = 'Manager'; +$lang->program->PGMPM = 'Program manager'; $lang->program->PGMBudget = 'Budget'; $lang->program->PGMProgress = 'Progress'; $lang->program->PGMChildren = 'Child'; @@ -224,10 +225,10 @@ $lang->program->PGMShowClosed = 'Closed programs.'; $lang->program->PGMTips = 'By modifying the parent item set, the associateable product also changes and becomes required. If no item set is selected, a product with the same name as the item is created by default and associated with that item.'; $lang->program->PGMChangeTips = 'After modifying the parent program set, the products associated with the project will be cleared, and the requirements, bugs and other data under the project will also be affected, is it modified?'; -$lang->program->PGMAclList['private'] = "Private (accessible to project portfolio holders and stakeholders)"; +$lang->program->PGMAclList['private'] = "Private (accessible to project portfolio holders and stakeholders, stakeholders can follow up maintenance)"; $lang->program->PGMAclList['open'] = "Default(user who can visit the program can access it)"; -$lang->program->subPGMAclList['private'] = "Private (accessible to this program set leader and stakeholders)"; +$lang->program->subPGMAclList['private'] = "Private (accessible to this program set leader and stakeholders, stakeholders can follow up maintenance)"; $lang->program->subPGMAclList['open'] = "Default(user who can visit the program can access it)"; $lang->program->subPGMAclList['program'] = "Open within the program (accessible to all higher-level program directors and affiliates, as well as to this program director and affiliates)"; diff --git a/module/program/lang/vi.php b/module/program/lang/vi.php index 35c2ff6322..34768e659f 100644 --- a/module/program/lang/vi.php +++ b/module/program/lang/vi.php @@ -88,12 +88,13 @@ $lang->program->ac = 'AC'; $lang->program->cv = 'CV%'; $lang->program->PRJTeamCount = 'Team'; $lang->program->PRJLongTime = 'Long-Term Project'; +$lang->program->future = 'TBD'; $lang->program->productNotEmpty = 'Please link products or create products.'; $lang->program->existProductName = 'Product name already exists.'; $lang->program->unitList[''] = ''; -$lang->program->unitList['yuan'] = 'Yuan'; +$lang->program->unitList['yuan'] = 'Wanyuan'; $lang->program->unitList['dollar'] = 'Dollars'; $lang->program->modelList['scrum'] = "Scrum"; @@ -210,7 +211,7 @@ $lang->program->PGMDesc = 'Description'; $lang->program->PGMCode = 'Code'; $lang->program->PGMCopy = 'Copy Program'; $lang->program->PGMStatus = 'Status'; -$lang->program->PGMPM = 'Manager'; +$lang->program->PGMPM = 'Program manager'; $lang->program->PGMBudget = 'Budget'; $lang->program->PGMProgress = 'Progress'; $lang->program->PGMChildren = 'Child'; @@ -224,10 +225,10 @@ $lang->program->PGMShowClosed = 'Closed programs.'; $lang->program->PGMTips = 'By modifying the parent item set, the associateable product also changes and becomes required. If no item set is selected, a product with the same name as the item is created by default and associated with that item.'; $lang->program->PGMChangeTips = 'After modifying the parent program set, the products associated with the project will be cleared, and the requirements, bugs and other data under the project will also be affected, is it modified?'; -$lang->program->PGMAclList['private'] = "Private (accessible to project portfolio holders and stakeholders)"; +$lang->program->PGMAclList['private'] = "Private (accessible to project portfolio holders and stakeholders, stakeholders can follow up maintenance)"; $lang->program->PGMAclList['open'] = "Default(user who can visit the program can access it)"; -$lang->program->subPGMAclList['private'] = "Private (accessible to this program set leader and stakeholders)"; +$lang->program->subPGMAclList['private'] = "Private (accessible to this program set leader and stakeholders, stakeholders can follow up maintenance)"; $lang->program->subPGMAclList['open'] = "Default(user who can visit the program can access it)"; $lang->program->subPGMAclList['program'] = "Open within the program (accessible to all higher-level program directors and affiliates, as well as to this program director and affiliates)"; diff --git a/module/program/lang/zh-cn.php b/module/program/lang/zh-cn.php index 116efbae76..b4ab3d108d 100644 --- a/module/program/lang/zh-cn.php +++ b/module/program/lang/zh-cn.php @@ -61,7 +61,7 @@ $lang->program->PRJEstimate = '预计'; $lang->program->PRJConsume = '消耗'; $lang->program->PRJSurplus = '剩余'; $lang->program->PRJProgress = '进度'; -$lang->program->dateRange = '起止时间'; +$lang->program->dateRange = '起止日期'; $lang->program->to = '至'; $lang->program->realEnd = '实际完成日期'; $lang->program->realBegan = '实际开始日期'; @@ -88,12 +88,13 @@ $lang->program->ac = 'AC'; $lang->program->cv = 'CV%'; $lang->program->PRJTeamCount = '项目成员'; $lang->program->PRJLongTime = '长期'; +$lang->program->future = '待定'; $lang->program->productNotEmpty = '请关联产品或创建产品。'; $lang->program->existProductName = '产品名称已存在。'; $lang->program->unitList[''] = ''; -$lang->program->unitList['yuan'] = '元'; +$lang->program->unitList['yuan'] = '万元'; $lang->program->unitList['dollar'] = 'Dollars'; $lang->program->modelList['scrum'] = "Scrum"; @@ -210,7 +211,7 @@ $lang->program->PGMDesc = '项目集描述'; $lang->program->PGMCode = '项目集代号'; $lang->program->PGMCopy = '复制项目集'; $lang->program->PGMStatus = '状态'; -$lang->program->PGMPM = '负责人'; +$lang->program->PGMPM = '项目集负责人'; $lang->program->PGMBudget = '预算'; $lang->program->PGMProgress = '项目进度'; $lang->program->PGMChildren = '子项目集'; @@ -224,10 +225,10 @@ $lang->program->PGMShowClosed = '显示已关闭'; $lang->program->PGMTips = '修改父项目集,可关联产品也会发生变化,并且变为必填,如果未选择任何项目集,则系统会默认创建一个和该项目同名的产品并关联到该项目。'; $lang->program->PGMChangeTips = '修改父项目集后,项目已关联的产品会被清空,并且项目下的需求、bug等数据也会受影响,是否修改?'; -$lang->program->PGMAclList['private'] = "私有(项目集负责人和干系人可访问)"; +$lang->program->PGMAclList['private'] = "私有(项目集负责人和干系人可访问,干系人可后续维护)"; $lang->program->PGMAclList['open'] = "公开(有项目集视图权限,即可访问)"; -$lang->program->subPGMAclList['private'] = "私有(本项目集负责人和干系人可访问)"; +$lang->program->subPGMAclList['private'] = "私有(本项目集负责人和干系人可访问,干系人可后续维护)"; $lang->program->subPGMAclList['open'] = "全部公开(有项目集视图权限,即可访问)"; $lang->program->subPGMAclList['program'] = "项目集内公开 (所有上级项目集负责人和干系人、本项目集负责人和干系人可访问)"; diff --git a/module/program/lang/zh-tw.php b/module/program/lang/zh-tw.php index 803204e08b..9ebd3c15f8 100644 --- a/module/program/lang/zh-tw.php +++ b/module/program/lang/zh-tw.php @@ -63,7 +63,7 @@ $lang->program->PRJEstimate = '預計'; $lang->program->PRJConsume = '消耗'; $lang->program->PRJSurplus = '剩餘'; $lang->program->PRJProgress = '進度'; -$lang->program->dateRange = '起止時間'; +$lang->program->dateRange = '起止日期'; $lang->program->to = '至'; $lang->program->realEnd = '實際完成日期'; $lang->program->realBegan = '實際開始日期'; @@ -90,12 +90,13 @@ $lang->program->ac = 'AC'; $lang->program->cv = 'CV%'; $lang->program->PRJTeamCount = '項目成員'; $lang->program->PRJLongTime = '長期'; +$lang->program->future = '待定'; $lang->program->productNotEmpty = '請關聯產品或創建產品。'; $lang->program->existProductName = '產品名稱已存在。'; $lang->program->unitList[''] = ''; -$lang->program->unitList['yuan'] = '元'; +$lang->program->unitList['yuan'] = '萬元'; $lang->program->unitList['dollar'] = 'Dollars'; $lang->program->modelList['scrum'] = "Scrum"; @@ -213,7 +214,7 @@ $lang->program->PGMDesc = '項目集描述'; $lang->program->PGMCode = '項目集代號'; $lang->program->PGMCopy = '複製項目集'; $lang->program->PGMStatus = '狀態'; -$lang->program->PGMPM = '負責人'; +$lang->program->PGMPM = '項目集負責人'; $lang->program->PGMBudget = '預算'; $lang->program->PGMProgress = '項目進度'; $lang->program->PGMChildren = '子項目集'; @@ -227,10 +228,10 @@ $lang->program->PGMShowClosed = '顯示已關閉'; $lang->program->PGMTips = '修改父項目集,可關聯產品也會發生變化,並且變為必填,如果未選擇任何項目集,則系統會預設創建一個和該項目同名的產品並關聯到該項目。'; $lang->program->PGMChangeTips = '修改父項目集後,項目已關聯的產品會被清空,並且項目下的需求、bug等數據也會受影響,是否修改?'; -$lang->program->PGMAclList['private'] = "私有(項目集負責人和干係人可訪問)"; +$lang->program->PGMAclList['private'] = "私有(項目集負責人和干係人可訪問,干係人可後續維護)"; $lang->program->PGMAclList['open'] = "公開(有項目集視圖權限,即可訪問)"; -$lang->program->subPGMAclList['private'] = "私有(本項目集負責人和干係人可訪問)"; +$lang->program->subPGMAclList['private'] = "私有(本項目集負責人和干係人可訪問,干係人可後續維護)"; $lang->program->subPGMAclList['open'] = "全部公開(有項目集視圖權限,即可訪問)"; $lang->program->subPGMAclList['program'] = "項目集內公開 (所有上級項目集負責人和干係人、本項目集負責人和干係人可訪問)"; diff --git a/module/program/model.php b/module/program/model.php index 5b5f2b48ea..155bce2473 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -124,9 +124,9 @@ class programModel extends model ->setIF($this->post->delta == 999, 'end', LONG_TIME) ->add('type', 'program') ->join('whitelist', ',') - ->cleanInt('budget') + ->cleanFloat('budget') ->stripTags($this->config->program->editor->pgmcreate['id'], $this->config->allowedTags) - ->remove('delta') + ->remove('delta,future') ->get(); if($program->parent) @@ -619,6 +619,7 @@ class programModel extends model { $modules = $this->dao->select('id,name,parent,path,grade')->from(TABLE_PROGRAM) ->where('type')->eq('program') + ->andWhere('status')->ne('closed') ->andWhere('deleted')->eq(0) ->beginIF($model)->andWhere('model')->eq($model)->fi() ->orderBy('grade desc, `order`') @@ -627,6 +628,8 @@ class programModel extends model $treeMenu = array(); foreach($modules as $module) { + if(strpos($this->app->user->view->programs, $module->id) === false) continue; + $moduleName = '/'; $parentModules = explode(',', $module->path); foreach($parentModules as $parentModuleID) diff --git a/module/program/view/pgmcreate.html.php b/module/program/view/pgmcreate.html.php index d32e7ed495..7b30080c0e 100644 --- a/module/program/view/pgmcreate.html.php +++ b/module/program/view/pgmcreate.html.php @@ -53,18 +53,10 @@