diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 36cea26072..a0d8e68db2 100755 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -146,7 +146,7 @@ $lang->program->viewMenu->project = array('link' => "$lang->projectCommon|progra $lang->product = new stdclass(); $lang->product->menu = new stdclass(); $lang->product->menu->home = '主页|product|index|'; -$lang->product->menu->list = $lang->productCommon . '|product|all|'; +$lang->product->menu->list = array('link' => $lang->productCommon . '|product|all|', 'alias' => 'create'); $lang->product->viewMenu = new stdclass(); $lang->product->viewMenu->requirement = array('link' => "用户需求|product|browse|productID=%s&branch=&browseType=unclosed¶m=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story'); @@ -158,6 +158,14 @@ $lang->product->viewMenu->branch = '@branch@|branch|manage|productID=%s'; $lang->product->viewMenu->module = '模块|tree|browse|productID=%s&view=story'; $lang->product->viewMenu->view = array('link' => '概况|product|view|productID=%s', 'alias' => 'edit'); +$lang->release = new stdclass(); +$lang->branch = new stdclass(); +$lang->productplan = new stdclass(); + +$lang->release->menu = $lang->product->viewMenu; +$lang->branch->menu = $lang->product->menu; +$lang->productplan->menu = $lang->product->menu; + /* System menu. */ $lang->system = new stdclass(); $lang->system->menu = new stdclass(); @@ -271,7 +279,7 @@ $lang->scrumproduct->menu = new stdclass(); $lang->scrumproduct->menu->story = array('link' => "{$lang->storyCommon}|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story'); $lang->scrumproduct->menu->plan = array('link' => "{$lang->planCommon}|productplan|browse|productID=%s", 'subModule' => 'productplan'); -$lang->scrumproduct->menu->release = array('link' => '发布|release|browse|productID=%s', 'subModule' => 'release'); +//$lang->scrumproduct->menu->release = array('link' => '发布|release|browse|productID=%s', 'subModule' => 'release'); $lang->scrumproduct->menu->roadmap = '路线图|product|roadmap|productID=%s'; $lang->scrumproduct->menu->project = "{$lang->projectCommon}|product|project|status=all&productID=%s"; $lang->scrumproduct->menu->dynamic = '动态|product|dynamic|productID=%s'; @@ -288,15 +296,9 @@ if($config->URAndSR) $lang->product->dividerMenu = ',project,doc,'; -$lang->productplan = new stdclass(); -$lang->release = new stdclass(); -$lang->branch = new stdclass(); -$lang->story = new stdclass(); +$lang->story = new stdclass(); -$lang->branch->menu = $lang->product->menu; -$lang->story->menu = $lang->product->menu; -$lang->productplan->menu = $lang->product->menu; -$lang->release->menu = $lang->product->menu; +$lang->story->menu = $lang->product->menu; /* 项目视图菜单设置。*/ $lang->project = new stdclass(); @@ -567,10 +569,10 @@ $lang->navGroup->todo = 'my'; $lang->navGroup->effort = 'my'; $lang->navGroup->productplan = 'product'; +$lang->navGroup->release = 'product'; +$lang->navGroup->branch = 'product'; $lang->navGroup->story = 'project'; -$lang->navGroup->branch = 'project'; -$lang->navGroup->release = 'project'; $lang->navGroup->tree = 'project'; $lang->navGroup->task = 'project'; $lang->navGroup->qa = 'project'; @@ -850,7 +852,7 @@ $lang->menu->waterfall->product = array('link' => '需求|product|browse|pr $lang->menu->waterfall->design = '设计|design|browse|product={PRODUCT}'; $lang->menu->waterfall->ci = '代码|repo|browse|'; $lang->menu->waterfall->qa = array('link' => '测试|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,'); -$lang->menu->waterfall->release = array('link' => '发布|release|browse|product={PRODUCT}', 'subModule' => 'release'); +//$lang->menu->waterfall->release = array('link' => '发布|release|browse|product={PRODUCT}', 'subModule' => 'release'); $lang->menu->waterfall->issue = '问题|issue|browse|'; $lang->menu->waterfall->risk = '风险|risk|browse|'; $lang->menu->waterfall->list = array('link' => '更多|workestimation|index|program={PROGRAM}', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'stakeholder,workestimation,durationestimation,budget,pssp,stakeholder'); @@ -915,6 +917,6 @@ if($config->URAndSR) } $lang->nc->menu = $lang->auditplan->menu; -$lang->noMenuModule = array('my', 'todo', 'effort', 'program', 'product', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'holiday', 'custom', 'auditcl', 'subject', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'issue', 'risk', 'pssp', 'sms', 'message', 'webhook', 'search'); +$lang->noMenuModule = array('my', 'todo', 'effort', 'program', 'product', 'productplan', 'release', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'holiday', 'custom', 'auditcl', 'subject', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'issue', 'risk', 'pssp', 'sms', 'message', 'webhook', 'search'); include (dirname(__FILE__) . '/menuOrder.php'); diff --git a/module/product/control.php b/module/product/control.php index 50cbf60214..2476b1e6a2 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -294,6 +294,8 @@ class product extends control */ public function edit($productID, $action = 'edit', $extra = '') { + $this->lang->product->menu = $this->lang->product->viewMenu; + if(!empty($_POST)) { $changes = $this->product->update($productID); @@ -456,6 +458,8 @@ class product extends control */ public function view($productID) { + $this->lang->product->menu = $this->lang->product->viewMenu; + $product = $this->product->getStatByID($productID); if(!$product) die(js::error($this->lang->notFound) . js::locate('back')); @@ -516,6 +520,7 @@ class product extends control */ public function roadmap($productID, $branch = 0) { + $this->lang->product->menu = $this->lang->product->viewMenu; $this->product->setMenu($this->products, $productID, $branch); $this->session->set('releaseList', $this->app->getURI(true)); diff --git a/module/productplan/control.php b/module/productplan/control.php index 9c4724c7c3..2eddaa5e49 100644 --- a/module/productplan/control.php +++ b/module/productplan/control.php @@ -22,6 +22,8 @@ class productplan extends control */ public function commonAction($productID, $branch = 0) { + $this->lang->product->menu = $this->lang->product->viewMenu; + $this->loadModel('product'); $this->app->loadConfig('project'); $product = $this->product->getById($productID); @@ -30,7 +32,7 @@ class productplan extends control $this->view->branch = $branch; $this->view->branches = $product->type == 'normal' ? array() : $this->loadModel('branch')->getPairs($productID); $this->view->position[] = html::a($this->createLink('product', 'browse', "productID={$productID}&branch=$branch"), $product->name); - $this->product->setMenu($this->product->getPairs('', $this->session->PRJ), $productID, $branch); + $this->product->setMenu($this->product->getPairs(), $productID, $branch); } /** @@ -214,7 +216,7 @@ class productplan extends control $this->session->set('productPlanList', $this->app->getURI(true)); $this->commonAction($productID, $branch); - $products = $this->product->getPairs('', $this->session->PRJ); + $products = $this->product->getPairs(); $this->view->title = $products[$productID] . $this->lang->colon . $this->lang->productplan->browse; $this->view->position[] = $this->lang->productplan->browse; $this->view->productID = $productID; diff --git a/module/release/control.php b/module/release/control.php index 289a75631b..1cdeee4f88 100644 --- a/module/release/control.php +++ b/module/release/control.php @@ -21,6 +21,8 @@ class release extends control */ public function commonAction($productID, $branch = 0) { + $this->lang->product->menu = $this->lang->product->viewMenu; + $this->loadModel('product'); $product = $this->product->getById($productID); if(empty($product)) $this->locate($this->createLink('product', 'create')); @@ -28,7 +30,7 @@ class release extends control $this->view->branch = $branch; $this->view->branches = $product->type == 'normal' ? array() : $this->loadModel('branch')->getPairs($product->id); $this->view->position[] = html::a($this->createLink('product', 'browse', "productID={$this->view->product->id}&branch=$branch"), $this->view->product->name); - $this->product->setMenu($this->product->getPairs('', $this->session->PRJ), $productID, $branch); + $this->product->setMenu($this->product->getPairs(), $productID, $branch); } /** diff --git a/module/tree/control.php b/module/tree/control.php index 4b166c74bd..9367b040b7 100644 --- a/module/tree/control.php +++ b/module/tree/control.php @@ -61,9 +61,13 @@ class tree extends control if($viewType == 'story') { - $products = $this->product->getPairs('', $this->session->PRJ); + /* Set menu.*/ + $this->lang->navGroup->tree = 'product'; + $this->lang->product->menu = $this->lang->product->viewMenu; + $this->lang->noMenuModule[] = 'tree'; + + $products = $this->product->getPairs(); - $this->lang->set('menugroup.tree', 'product'); $this->product->setMenu($products, $rootID, $branch, 'story', '', 'story'); $this->lang->tree->menu = $this->lang->product->menu; $this->lang->tree->menuOrder = $this->lang->product->menuOrder;