diff --git a/module/doc/model.php b/module/doc/model.php index 8cc8815937..a79c8ec4b7 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -780,7 +780,7 @@ class docModel extends model $this->config->doc->search['actionURL'] = $actionURL; $this->config->doc->search['queryID'] = $queryID; $this->config->doc->search['params']['product']['values'] = array(''=>'') + $this->loadModel('product')->getPairs('nocode', $this->session->project) + array('all'=>$this->lang->doc->allProduct); - $this->config->doc->search['params']['execution']['values'] = array(''=>'') + $this->loadModel('execution')->getPairs($this->session->project, 'all', 'noclosed') + array('all'=>$this->lang->doc->allProject); + $this->config->doc->search['params']['execution']['values'] = array(''=>'') + $this->loadModel('execution')->getPairs($this->session->project, 'all', 'noclosed') + array('all'=>$this->lang->doc->allExecution); $this->config->doc->search['params']['lib']['values'] = array(''=>'', $libID => ($libID ? $libs[$libID] : 0), 'all' => $this->lang->doclib->all); /* Get the modules. */ @@ -1683,6 +1683,13 @@ class docModel extends model return $html; } + /** + * Set past menu. + * + * @param string $fastLib + * @access public + * @return string + */ public function setFastMenu($fastLib) { $actions = ''; @@ -1821,7 +1828,7 @@ class docModel extends model { $navCSS .= <<

project->empty;?> - + config->maxVersion) and common::hasPriv('project', 'createGuide')):?> createLink('project', 'createGuide'), " " . $lang->my->createProgram, '', "class='btn btn-info' data-toggle=modal");?> + config->systemMode == 'new' and common::hasPriv('project', 'create')):?> + createLink('project', 'create'), '' . $lang->project->create, '', 'class="btn btn-info" data-toggle="modal" data-target="#guideDialog"');?> + config->systemMode == 'classic' and common::hasPriv('execution', 'create')):?> + createLink('execution', 'create'), '' . $lang->execution->create, '', 'class="btn btn-info"');?>

diff --git a/module/product/control.php b/module/product/control.php index 02db4712ca..789064d94c 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -127,8 +127,9 @@ class product extends control /* Lower browse type. */ $browseType = strtolower($browseType); - /* Load datatable. */ + /* Load datatable and execution. */ $this->loadModel('datatable'); + $this->loadModel('execution'); /* Set product, module and query. */ $productID = $this->product->saveState($productID, $this->products); @@ -202,7 +203,7 @@ class product extends control { $this->session->set('currentProductType', $product->type); $projectProducts = $this->product->getProductsByProject($this->session->project); - $productPlans = $this->loadModel('execution')->getPlans($projectProducts); + $productPlans = $this->execution->getPlans($projectProducts); if($browseType == 'bybranch') $param = $branch; $stories = $this->story->getExecutionStories($this->session->project, $productID, $branch, $sort, $browseType, $param, 'story', '', $pager); @@ -311,9 +312,9 @@ class product extends control $this->app->rawModule = 'program'; $this->app->rawMethod = 'product'; $this->lang->navGroup->program = 'program'; - $this->loadModel('program')->setPGMViewMenu($programID); - $this->lang->program->switcherMenu = $this->program->getPGMSwitcher($programID, true); - $this->lang->program->mainMenuAction = $this->program->getPGMMainAction(); + $this->loadModel('program')->setViewMenu($programID); + $this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true); + $this->lang->program->mainMenuAction = $this->program->getMainAction(); } $this->loadModel('user'); @@ -362,7 +363,7 @@ class product extends control /* Init vars. */ $product = $this->product->getById($productID); $unmodifiableProjects = array(); - $canChangePGM = true; + $canChangeProgram = true; $singleLinkProjects = array(); $multipleLinkProjects = array(); $linkStoriesProjects = array(); @@ -375,7 +376,7 @@ class product extends control ->andWhere('t2.deleted')->eq('0') ->fetchPairs('project', 'product'); - if(!empty($unmodifiableProjects)) $canChangePGM = false; + if(!empty($unmodifiableProjects)) $canChangeProgram = false; /* Get the projects linked with this product. */ $projectPairs = $this->dao->select('t2.id,t2.name')->from(TABLE_PROJECTPRODUCT)->alias('t1') @@ -389,7 +390,7 @@ class product extends control { foreach($projectPairs as $projectID => $projectName) { - if($canChangePGM) + if($canChangeProgram) { $products = $this->dao->select('product')->from(TABLE_PROJECTPRODUCT)->where('project')->eq($projectID)->fetchPairs(); if(count($products) == 1) @@ -453,9 +454,9 @@ class product extends control $this->app->rawModule = 'program'; $this->app->rawMethod = 'product'; $this->lang->navGroup->program = 'program'; - $this->loadModel('program')->setPGMViewMenu($programID); - $this->lang->program->switcherMenu = $this->program->getPGMSwitcher($programID, true); - $this->lang->program->mainMenuAction = $this->program->getPGMMainAction(); + $this->loadModel('program')->setViewMenu($programID); + $this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true); + $this->lang->program->mainMenuAction = $this->program->getMainAction(); } /* Get the relevant person in charge. */ @@ -488,7 +489,7 @@ class product extends control $this->view->programs = array('') + $this->loadModel('program')->getTopPairs(); $this->view->lines = $lines; $this->view->URSRPairs = $this->loadModel('custom')->getURSRPairs(); - $this->view->canChangePGM = $canChangePGM; + $this->view->canChangeProgram = $canChangeProgram; $this->view->singleLinkProjects = $singleLinkProjects; $this->view->multipleLinkProjects = $multipleLinkProjects; $this->view->linkStoriesProjects = $linkStoriesProjects; @@ -545,9 +546,9 @@ class product extends control $this->app->rawModule = 'program'; $this->app->rawMethod = 'product'; $this->lang->navGroup->program = 'program'; - $this->loadModel('program')->setPGMViewMenu($programID); - $this->lang->program->switcherMenu = $this->program->getPGMSwitcher($programID, true); - $this->lang->program->mainMenuAction = $this->program->getPGMMainAction(); + $this->loadModel('program')->setViewMenu($programID); + $this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true); + $this->lang->program->mainMenuAction = $this->program->getMainAction(); $this->loadModel('user'); $poUsers = $this->user->getPairs('nodeleted|pofirst', $appendPoUsers); @@ -909,7 +910,7 @@ class product extends control $this->view->extra = $extra; $this->view->products = $products; $this->view->projectID = $moduleGroup == 'project' ? $this->session->project : 0; - $this->view->programs = $this->loadModel('program')->getPGMPairs(true); + $this->view->programs = $this->loadModel('program')->getPairs(true); $this->view->openApp = $moduleGroup; $this->display(); } diff --git a/module/product/js/edit.js b/module/product/js/edit.js index 9b7015931a..8cc74a545b 100644 --- a/module/product/js/edit.js +++ b/module/product/js/edit.js @@ -3,10 +3,10 @@ $(function() $('#program').change(function() { var programID = $(this).val(); - if(!canChangePGM || singleLinkProjects.length !== 0 || multipleLinkProjects.length !== 0) + if(!canChangeProgram || singleLinkProjects.length !== 0 || multipleLinkProjects.length !== 0) { $('#changeProgram').modal({show: true}); - if(!canChangePGM) + if(!canChangeProgram) { $('#program').val(oldProgramID); $('#program').trigger("chosen:updated"); diff --git a/module/product/lang/de.php b/module/product/lang/de.php index 1a2c6e5958..dca39a99b2 100644 --- a/module/product/lang/de.php +++ b/module/product/lang/de.php @@ -65,13 +65,13 @@ $lang->product->unResolvedBugsTitle = 'Active Bugs'; $lang->product->assignToNullBugs = 'Nicht zugewiesene [B]'; $lang->product->assignToNullBugsTitle = 'Unassigned Bugs'; -$lang->product->confirmDelete = " Möchten Sie {$lang->productCommon} löschen?"; -$lang->product->errorNoProduct = "Kein {$lang->productCommon} erstellt!"; -$lang->product->accessDenied = "Sie haben keinen Zugriff auf {$lang->productCommon}."; -$lang->product->PGMChangeTip = "The projects linked with this {$lang->productCommon}: %s will be transferred to the modified program set together."; -$lang->product->notChangePGMTip = "The {$lang->SRCommon} of {$lang->productCommon} has been linked to the following projects, please cancel the link before proceeding"; -$lang->product->confirmChangePGM = "The projects linked with this {$lang->productCommon}: %s is also linked with other products, whether to transfer projects to the modified program set."; -$lang->product->changePGMError = "The {$lang->SRCommon} of this {$lang->productCommon} has been linked to the project, please unlink it before proceeding"; +$lang->product->confirmDelete = " Möchten Sie {$lang->productCommon} löschen?"; +$lang->product->errorNoProduct = "Kein {$lang->productCommon} erstellt!"; +$lang->product->accessDenied = "Sie haben keinen Zugriff auf {$lang->productCommon}."; +$lang->product->programChangeTip = "The projects linked with this {$lang->productCommon}: %s will be transferred to the modified program set together."; +$lang->product->notChangeProgramTip = "The {$lang->SRCommon} of {$lang->productCommon} has been linked to the following projects, please cancel the link before proceeding"; +$lang->product->confirmChangeProgram = "The projects linked with this {$lang->productCommon}: %s is also linked with other products, whether to transfer projects to the modified program set."; +$lang->product->changeProgramError = "The {$lang->SRCommon} of this {$lang->productCommon} has been linked to the project, please unlink it before proceeding"; $lang->product->id = 'ID'; $lang->product->program = "Program"; diff --git a/module/product/lang/en.php b/module/product/lang/en.php index 7d05e23914..a0606c730d 100644 --- a/module/product/lang/en.php +++ b/module/product/lang/en.php @@ -65,13 +65,13 @@ $lang->product->unResolvedBugsTitle = 'Active Bugs'; $lang->product->assignToNullBugs = 'Unassigned [B]'; $lang->product->assignToNullBugsTitle = 'Unassigned Bugs'; -$lang->product->confirmDelete = " Do you want to delete the {$lang->productCommon}?"; -$lang->product->errorNoProduct = "No {$lang->productCommon} is created yet!"; -$lang->product->accessDenied = "You have no access to the {$lang->productCommon}."; -$lang->product->PGMChangeTip = "The projects linked with this {$lang->productCommon}: %s will be transferred to the modified program set together."; -$lang->product->notChangePGMTip = "The {$lang->SRCommon} of {$lang->productCommon} has been linked to the following projects, please cancel the link before proceeding"; -$lang->product->confirmChangePGM = "The projects linked with this {$lang->productCommon}: %s is also linked with other products, whether to transfer projects to the modified program set."; -$lang->product->changePGMError = "The {$lang->SRCommon} of this {$lang->productCommon} has been linked to the project, please unlink it before proceeding"; +$lang->product->confirmDelete = " Do you want to delete the {$lang->productCommon}?"; +$lang->product->errorNoProduct = "No {$lang->productCommon} is created yet!"; +$lang->product->accessDenied = "You have no access to the {$lang->productCommon}."; +$lang->product->programChangeTip = "The projects linked with this {$lang->productCommon}: %s will be transferred to the modified program set together."; +$lang->product->notChangeProgramTip = "The {$lang->SRCommon} of {$lang->productCommon} has been linked to the following projects, please cancel the link before proceeding"; +$lang->product->confirmChangeProgram = "The projects linked with this {$lang->productCommon}: %s is also linked with other products, whether to transfer projects to the modified program set."; +$lang->product->changeProgramError = "The {$lang->SRCommon} of this {$lang->productCommon} has been linked to the project, please unlink it before proceeding"; $lang->product->id = 'ID'; $lang->product->program = "Program"; diff --git a/module/product/lang/fr.php b/module/product/lang/fr.php index 392420f382..e8eadd80d6 100644 --- a/module/product/lang/fr.php +++ b/module/product/lang/fr.php @@ -65,13 +65,13 @@ $lang->product->unResolvedBugsTitle = 'Bugs Ouverts'; $lang->product->assignToNullBugs = 'Orphelins [B]'; $lang->product->assignToNullBugsTitle = 'Bugs non assignés'; -$lang->product->confirmDelete = "Voulez-vous vraiment supprimer le {$lang->productCommon} ?"; -$lang->product->errorNoProduct = "Aucun {$lang->productCommon} n'est créé pour l'instant !"; -$lang->product->accessDenied = "Vous n'avez pas accès au {$lang->productCommon}."; -$lang->product->PGMChangeTip = "The projects linked with this {$lang->productCommon}: %s will be transferred to the modified program set together."; -$lang->product->notChangePGMTip = "The {$lang->SRCommon} of {$lang->productCommon} has been linked to the following projects, please cancel the link before proceeding"; -$lang->product->confirmChangePGM = "The projects linked with this {$lang->productCommon}: %s is also linked with other products, whether to transfer projects to the modified program set."; -$lang->product->changePGMError = "The {$lang->SRCommon} of this {$lang->productCommon} has been linked to the project, please unlink it before proceeding"; +$lang->product->confirmDelete = "Voulez-vous vraiment supprimer le {$lang->productCommon} ?"; +$lang->product->errorNoProduct = "Aucun {$lang->productCommon} n'est créé pour l'instant !"; +$lang->product->accessDenied = "Vous n'avez pas accès au {$lang->productCommon}."; +$lang->product->programChangeTip = "The projects linked with this {$lang->productCommon}: %s will be transferred to the modified program set together."; +$lang->product->notChangeProgramTip = "The {$lang->SRCommon} of {$lang->productCommon} has been linked to the following projects, please cancel the link before proceeding"; +$lang->product->confirmChangeProgram = "The projects linked with this {$lang->productCommon}: %s is also linked with other products, whether to transfer projects to the modified program set."; +$lang->product->changeProgramError = "The {$lang->SRCommon} of this {$lang->productCommon} has been linked to the project, please unlink it before proceeding"; $lang->product->id = 'ID'; $lang->product->program = "Program"; diff --git a/module/product/lang/vi.php b/module/product/lang/vi.php index 49b81c8cb9..fb5686e99d 100644 --- a/module/product/lang/vi.php +++ b/module/product/lang/vi.php @@ -65,13 +65,13 @@ $lang->product->unResolvedBugsTitle = 'Kích hoạt Bugs'; $lang->product->assignToNullBugs = 'Chưa giao [B]'; $lang->product->assignToNullBugsTitle = 'Chưa giao Bugs'; -$lang->product->confirmDelete = " Bạn có muốn xóa {$lang->productCommon} này?"; -$lang->product->errorNoProduct = "Không có {$lang->productCommon} được tạo!"; -$lang->product->accessDenied = "Bạn không có quyền truy cập tới {$lang->productCommon} này."; -$lang->product->PGMChangeTip = "The projects linked with this {$lang->productCommon}: %s will be transferred to the modified program set together."; -$lang->product->notChangePGMTip = "The {$lang->SRCommon} of {$lang->productCommon} has been linked to the following projects, please cancel the link before proceeding"; -$lang->product->confirmChangePGM = "The projects linked with this {$lang->productCommon}: %s is also linked with other products, whether to transfer projects to the modified program set."; -$lang->product->changePGMError = "The {$lang->SRCommon} of this {$lang->productCommon} has been linked to the project, please unlink it before proceeding"; +$lang->product->confirmDelete = " Bạn có muốn xóa {$lang->productCommon} này?"; +$lang->product->errorNoProduct = "Không có {$lang->productCommon} được tạo!"; +$lang->product->accessDenied = "Bạn không có quyền truy cập tới {$lang->productCommon} này."; +$lang->product->programChangeTip = "The projects linked with this {$lang->productCommon}: %s will be transferred to the modified program set together."; +$lang->product->notChangeProgramTip = "The {$lang->SRCommon} of {$lang->productCommon} has been linked to the following projects, please cancel the link before proceeding"; +$lang->product->confirmChangeProgram = "The projects linked with this {$lang->productCommon}: %s is also linked with other products, whether to transfer projects to the modified program set."; +$lang->product->changeProgramError = "The {$lang->SRCommon} of this {$lang->productCommon} has been linked to the project, please unlink it before proceeding"; $lang->product->id = 'ID'; $lang->product->program = "Program"; diff --git a/module/product/lang/zh-cn.php b/module/product/lang/zh-cn.php index 1c7267ed80..b23632362e 100644 --- a/module/product/lang/zh-cn.php +++ b/module/product/lang/zh-cn.php @@ -65,13 +65,13 @@ $lang->product->unResolvedBugsTitle = '未解决Bug'; $lang->product->assignToNullBugs = '未指派Bug'; $lang->product->assignToNullBugsTitle = '未指派Bug'; -$lang->product->confirmDelete = " 您确定删除该{$lang->productCommon}吗?"; -$lang->product->errorNoProduct = "还没有创建{$lang->productCommon}!"; -$lang->product->accessDenied = "您无权访问该{$lang->productCommon}"; -$lang->product->PGMChangeTip = "如下项目只关联了该{$lang->productCommon}, 将直接转移至新项目集下。"; -$lang->product->notChangePGMTip = "该{$lang->productCommon}的{$lang->SRCommon}已经关联到如下项目,请取消关联后再操作"; -$lang->product->confirmChangePGM = "如下项目既关联了该{$lang->productCommon}又关联了其他{$lang->productCommon},请确认是否继续关联该{$lang->productCommon},勾选后将取消与其他{$lang->productCommon}的关联关系,同时转移至新项目集下。"; -$lang->product->changePGMError = "该{$lang->productCommon}的{$lang->SRCommon}已经关联到项目,请取消关联后再操作"; +$lang->product->confirmDelete = " 您确定删除该{$lang->productCommon}吗?"; +$lang->product->errorNoProduct = "还没有创建{$lang->productCommon}!"; +$lang->product->accessDenied = "您无权访问该{$lang->productCommon}"; +$lang->product->programChangeTip = "如下项目只关联了该{$lang->productCommon}, 将直接转移至新项目集下。"; +$lang->product->notChangeProgramTip = "该{$lang->productCommon}的{$lang->SRCommon}已经关联到如下项目,请取消关联后再操作"; +$lang->product->confirmChangeProgram = "如下项目既关联了该{$lang->productCommon}又关联了其他{$lang->productCommon},请确认是否继续关联该{$lang->productCommon},勾选后将取消与其他{$lang->productCommon}的关联关系,同时转移至新项目集下。"; +$lang->product->changeProgramError = "该{$lang->productCommon}的{$lang->SRCommon}已经关联到项目,请取消关联后再操作"; $lang->product->id = '编号'; $lang->product->program = "所属项目集"; diff --git a/module/product/model.php b/module/product/model.php index 2c51361194..1879b36110 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -444,11 +444,11 @@ class productModel extends model /* init currentModule and currentMethod for report and story. */ if($currentModule == 'story') - { + { $storyMethods = ",track,create,batchcreate,batchclose,"; if(strpos($storyMethods, "," . $currentMethod . ",") === false) $currentModule = 'product'; if($currentMethod == 'view' || $currentMethod == 'change' || $currentMethod == 'review') $currentMethod = 'browse'; - } + } if($currentMethod == 'report') $currentMethod = 'browse'; $this->app->loadLang('project'); @@ -576,7 +576,7 @@ class productModel extends model ->fetchPairs('project', 'product'); if(!empty($unmodifiableProjects)) { - dao::$errors[] = $this->lang->product->changePGMError; + dao::$errors[] = $this->lang->product->changeProgramError; return false; } } @@ -698,8 +698,8 @@ class productModel extends model foreach($data->modules as $id => $name) { if(!$name) continue; - $line->name = strip_tags(trim($name)); - $line->root = $data->programs[$id]; + $line->name = strip_tags(trim($name)); + $line->root = $data->programs[$id]; if(is_numeric($id)) { diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index b9169996f8..4780b13a5a 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -21,8 +21,8 @@ $unfoldStories = isset($config->product->browse->unfoldStories) ? json_decode($config->product->browse->unfoldStories, true) : array(); $unfoldStories = zget($unfoldStories, $productID, array()); js::set('unfoldStories', $unfoldStories); -js::set('unfoldAll', $lang->project->treeLevel['all']); -js::set('foldAll', $lang->project->treeLevel['root']); +js::set('unfoldAll', $lang->execution->treeLevel['all']); +js::set('foldAll', $lang->execution->treeLevel['root']); js::set('storyType', $storyType); $lang->story->createCommon = $storyType == 'story' ? $lang->story->createStory : $lang->story->createRequirement; $isProjectStory = $this->app->rawModule == 'projectstory'; diff --git a/module/product/view/create.html.php b/module/product/view/create.html.php index e9469aeed3..4c3980a0cc 100644 --- a/module/product/view/create.html.php +++ b/module/product/view/create.html.php @@ -23,7 +23,7 @@ config->systemMode == 'new'):?> - program->PGMCommon;?> + program->common;?> @@ -57,7 +57,7 @@ - + product->status;?> diff --git a/module/product/view/edit.html.php b/module/product/view/edit.html.php index e82e5fab62..fefef34b09 100644 --- a/module/product/view/edit.html.php +++ b/module/product/view/edit.html.php @@ -14,7 +14,7 @@ program);?> - +