diff --git a/module/branch/lang/zh-cn.php b/module/branch/lang/zh-cn.php index 0d571b9252..3310b5bb14 100644 --- a/module/branch/lang/zh-cn.php +++ b/module/branch/lang/zh-cn.php @@ -3,6 +3,7 @@ $lang->branch->common = '分支'; $lang->branch->manage = '分支管理'; $lang->branch->delete = '分支删除'; -$lang->branch->all = '所有'; +$lang->branch->manageTitle = '%s管理'; +$lang->branch->all = '所有'; $lang->branch->confirmDelete = '分支删除,会影响关联该分支的需求、模块、计划、发布、Bug、用例等等,请慎重考虑。是否删除改分支?'; diff --git a/module/branch/model.php b/module/branch/model.php index 834b79e34f..7ef8595578 100644 --- a/module/branch/model.php +++ b/module/branch/model.php @@ -18,9 +18,14 @@ class branchModel extends model * @access public * @return string */ - public function getById($branchID) + public function getById($branchID, $productID = 0) { - if(empty($branchID)) return $this->lang->branch->all; + if(empty($branchID)) + { + if(empty($productID)) $productID = $this->session->product; + $product = $this->loadModel('product')->getById($productID); + return $this->lang->branch->all . $this->lang->product->branchName[$product->type]; + } return $this->dao->select('*')->from(TABLE_BRANCH)->where('id')->eq($branchID)->fetch('name'); } @@ -35,7 +40,11 @@ class branchModel extends model public function getPairs($productID, $params = '') { $branches = $this->dao->select('*')->from(TABLE_BRANCH)->where('product')->eq($productID)->andWhere('deleted')->eq(0)->orderBy('id_asc')->fetchPairs('id', 'name'); - if(strpos($params, 'noempty') === false) $branches = array('0' => $this->lang->branch->all) + $branches; + if(strpos($params, 'noempty') === false) + { + $product = $this->loadModel('product')->getById($productID); + $branches = array('0' => $this->lang->branch->all . $this->lang->product->branchName[$product->type]) + $branches; + } return $branches; } @@ -77,11 +86,12 @@ class branchModel extends model public function getByProducts($products, $params = '') { $branches = $this->dao->select('*')->from(TABLE_BRANCH)->where('product')->in($products)->andWhere('deleted')->eq(0)->fetchAll(); + $products = $this->loadModel('product')->getByIdList($products); $branchGroups = array(); foreach($branches as $branch) { - if(!isset($branchGroups[$branch->product]) and strpos($params, 'noempty') === false) $branchGroups[$branch->product][0] = $this->lang->branch->all; + if(!isset($branchGroups[$branch->product]) and strpos($params, 'noempty') === false) $branchGroups[$branch->product][0] = $this->lang->branch->all . $this->lang->product->branchName[$products[$branch->product]->type]; $branchGroups[$branch->product][$branch->id] = $branch->name; } diff --git a/module/branch/view/manage.html.php b/module/branch/view/manage.html.php index 08950c3312..db9aa993db 100644 --- a/module/branch/view/manage.html.php +++ b/module/branch/view/manage.html.php @@ -13,7 +13,7 @@
-
branch->manage?>
+
branch->manageTitle, $this->lang->product->branchName[$this->session->currentProductType])?>
diff --git a/module/build/control.php b/module/build/control.php index f078ef9ee3..de5af350d2 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -51,8 +51,8 @@ class build extends control $this->view->position[] = $this->lang->build->create; $this->view->productGroups = $productGroups; $this->view->products = $products; - $this->view->product = $productGroups[$productID]; - $this->view->branches = $productGroups[$productID]->type == 'normal' ? array() : $this->loadModel('branch')->getPairs($productID); + $this->view->product = isset($productGroups[$productID]) ? $productGroups[$productID] : ''; + $this->view->branches = (isset($productGroups[$productID]) and $productGroups[$productID]->type == 'normal') ? array() : $this->loadModel('branch')->getPairs($productID); $this->view->projectID = $projectID; $this->view->lastBuild = $this->build->getLast($projectID); $this->view->users = $this->user->getPairs('nodeleted'); diff --git a/module/build/view/create.html.php b/module/build/view/create.html.php index 85023bc59b..79ea9eea1b 100644 --- a/module/build/view/create.html.php +++ b/module/build/view/create.html.php @@ -37,8 +37,10 @@ ?> + + + - diff --git a/module/common/lang/en.php b/module/common/lang/en.php index 9ffb204d19..e9ea047d29 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -177,7 +177,7 @@ $lang->product->menu->plan = array('link' => 'Plan|productplan|browse|product $lang->product->menu->release = array('link' => 'Release|release|browse|productID=%s', 'subModule' => 'release'); $lang->product->menu->roadmap = 'Roadmap|product|roadmap|productID=%s'; $lang->product->menu->doc = array('link' => 'Doc|product|doc|productID=%s', 'subModule' => 'doc'); -$lang->product->menu->branch = 'Branch|branch|manage|productID=%s'; +$lang->product->menu->branch = '%branch%|branch|manage|productID=%s'; $lang->product->menu->module = 'Modules|tree|browse|productID=%s&view=story'; $lang->product->menu->view = array('link' => 'Info|product|view|productID=%s', 'alias' => 'edit'); $lang->product->menu->project = "{$lang->projectCommon}s|product|project|status=all&productID=%s"; diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 6596ec986d..deef9dd1a9 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -177,7 +177,7 @@ $lang->product->menu->plan = array('link' => '计划|productplan|browse|produ $lang->product->menu->release = array('link' => '发布|release|browse|productID=%s', 'subModule' => 'release'); $lang->product->menu->roadmap = '路线图|product|roadmap|productID=%s'; $lang->product->menu->doc = array('link' => '文档|product|doc|productID=%s', 'subModule' => 'doc'); -$lang->product->menu->branch = '分支|branch|manage|productID=%s'; +$lang->product->menu->branch = '%branch%|branch|manage|productID=%s'; $lang->product->menu->module = '模块|tree|browse|productID=%s&view=story'; $lang->product->menu->view = array('link' => '概况|product|view|productID=%s', 'alias' => 'edit'); $lang->product->menu->project = "{$lang->projectCommon}|product|project|status=all&productID=%s"; diff --git a/module/group/lang/en.php b/module/group/lang/en.php index 32f5718747..459bc8a5db 100644 --- a/module/group/lang/en.php +++ b/module/group/lang/en.php @@ -48,6 +48,7 @@ $lang->group->copyOptions['copyPriv'] = 'Copy priviledge'; $lang->group->copyOptions['copyUser'] = 'Copy user'; $lang->group->versions[''] = 'History'; +$lang->group->versions['7_4'] = 'Zentao 7.4'; $lang->group->versions['7_3'] = 'Zentao 7.3'; $lang->group->versions['7_2'] = 'Zentao 7.2'; $lang->group->versions['7_1'] = 'Zentao 7.1'; diff --git a/module/group/lang/zh-cn.php b/module/group/lang/zh-cn.php index 78a41d1606..7d771e5146 100644 --- a/module/group/lang/zh-cn.php +++ b/module/group/lang/zh-cn.php @@ -48,6 +48,7 @@ $lang->group->copyOptions['copyPriv'] = '复制权限'; $lang->group->copyOptions['copyUser'] = '复制用户'; $lang->group->versions[''] = '修改历史'; +$lang->group->versions['7_4'] = '禅道7.4'; $lang->group->versions['7_3'] = '禅道7.3'; $lang->group->versions['7_2'] = '禅道7.2'; $lang->group->versions['7_1'] = '禅道7.1'; diff --git a/module/product/lang/en.php b/module/product/lang/en.php index c4d62c27a8..152c984617 100644 --- a/module/product/lang/en.php +++ b/module/product/lang/en.php @@ -90,6 +90,7 @@ $lang->product->typeList['normal'] = 'Normal'; $lang->product->typeList['branch'] = 'Multi branch'; $lang->product->typeList['platform'] = 'Multi platform'; +$lang->product->branchName['normal'] = ''; $lang->product->branchName['branch'] = 'Branch'; $lang->product->branchName['platform'] = 'Platform'; diff --git a/module/product/lang/zh-cn.php b/module/product/lang/zh-cn.php index 162234cc06..a27147def1 100644 --- a/module/product/lang/zh-cn.php +++ b/module/product/lang/zh-cn.php @@ -90,6 +90,7 @@ $lang->product->typeList['normal'] = '正常'; $lang->product->typeList['branch'] = '多分支'; $lang->product->typeList['platform'] = '多平台'; +$lang->product->branchName['normal'] = ''; $lang->product->branchName['branch'] = '分支'; $lang->product->branchName['platform'] = '平台'; diff --git a/module/product/model.php b/module/product/model.php index 47b2819bc8..87a858c9fe 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -70,6 +70,7 @@ class productModel extends model if($currentProduct->type != 'normal') { $this->lang->product->branch = sprintf($this->lang->product->branch, $this->lang->product->branchName[$currentProduct->type]); + $this->lang->product->menu->branch = str_replace('%branch%', $this->lang->product->branchName[$currentProduct->type], $this->lang->product->menu->branch); $branches = $this->loadModel('branch')->getPairs($productID); $branchName = isset($branches[$branch]) ? $branches[$branch] : $branches[0]; $output .= '
  • '; diff --git a/module/project/control.php b/module/project/control.php index 1e08c588b4..2f462e2593 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -626,7 +626,7 @@ class project extends control $project = $this->commonAction($projectID); $products = $this->project->getProducts($project->id); $productID = key($products); // Get the first product for creating bug. - $branchID = $products[$productID]->branch; + $branchID = isset($products[$productID]) ? $products[$productID]->branch : 0; /* Header and position. */ $title = $project->name . $this->lang->colon . $this->lang->project->bug; @@ -1535,9 +1535,10 @@ class project extends control $this->config->product->search['params']['product']['values'] = $products + array('all' => $this->lang->product->allProductsOfProject); $this->config->product->search['params']['plan']['values'] = $this->loadModel('productplan')->getForProducts($products); unset($this->lang->story->statusList['draft']); - $this->config->product->search['params']['status'] = array('operator' => '=', 'control' => 'select', 'values' => $this->lang->story->statusList); unset($this->config->product->search['fields']['branch']); unset($this->config->product->search['params']['branch']); + $this->config->product->search['params']['status'] = array('operator' => '=', 'control' => 'select', 'values' => $this->lang->story->statusList); + $this->loadModel('search')->setSearchParams($this->config->product->search); $title = $project->name . $this->lang->colon . $this->lang->project->linkStory;
  • build->noProduct, $this->createLink('project', 'manageproducts', "projectID=$projectID"));?> build->noProduct, $this->createLink('project', 'manageproducts', "projectID=$projectID"));?>
    build->name;?>