From 1a95b47c7ac718da3442328cf6c138431ed2931a Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 11 Dec 2012 02:17:46 +0000 Subject: [PATCH] * finish task #960. --- module/bug/control.php | 6 +++--- module/project/control.php | 2 +- module/project/js/story.js | 1 + module/project/lang/en.php | 1 + module/project/lang/zh-cn.php | 1 + module/project/view/story.html.php | 4 ++-- module/story/control.php | 8 ++++---- module/task/control.php | 9 +++++---- module/testcase/control.php | 4 ++-- module/testtask/control.php | 10 +++++----- 10 files changed, 25 insertions(+), 21 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 6d87854153..91f21d308d 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -490,7 +490,7 @@ class bug extends control $this->app->session->set('showSuhosinInfo', $showSuhosinInfo); /* Assign. */ - $this->view->header['title'] = $product->name . $this->lang->colon . $this->lang->bug->batchEdit; + $this->view->header->title = $product->name . $this->lang->colon . $this->lang->bug->batchEdit; $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); $this->view->position[] = $this->lang->bug->common; $this->view->position[] = $this->lang->bug->batchEdit; @@ -588,7 +588,7 @@ class bug extends control $productID = $bug->product; $this->bug->setMenu($this->products, $productID); - $this->view->header['title'] = $this->products[$productID] . $this->lang->colon . $this->lang->bug->confirmBug; + $this->view->header->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->confirmBug; $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); $this->view->position[] = $this->lang->bug->confirmBug; @@ -629,7 +629,7 @@ class bug extends control $productID = $bug->product; $this->bug->setMenu($this->products, $productID); - $this->view->header['title'] = $this->products[$productID] . $this->lang->colon . $this->lang->bug->resolve; + $this->view->header->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->resolve; $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); $this->view->position[] = $this->lang->bug->resolve; diff --git a/module/project/control.php b/module/project/control.php index 6c17854327..47fa3c269f 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -218,7 +218,7 @@ class project extends control $this->app->session->set('storyList', $this->app->getURI(true)); /* Header and session. */ - $this->view->header['title'] = $project->name . $this->lang->colon . $this->lang->project->task; + $this->view->header->title = $project->name . $this->lang->colon . $this->lang->project->task; $this->view->position[] = html::a($this->createLink('project', 'browse', "projectID=$projectID"), $project->name); $this->view->position[] = $this->lang->project->task; diff --git a/module/project/js/story.js b/module/project/js/story.js index 3eee9acf9b..03543ab01a 100644 --- a/module/project/js/story.js +++ b/module/project/js/story.js @@ -1,6 +1,7 @@ $(document).ready(function() { $("a.iframe").colorbox({width:640, height:480, iframe:true, transition:'none'}); + $("a.batchWBS").colorbox({width:1024, height:580, iframe:true, transition:'none'}); }); /** diff --git a/module/project/lang/en.php b/module/project/lang/en.php index 70215756fb..9dc4facbd7 100644 --- a/module/project/lang/en.php +++ b/module/project/lang/en.php @@ -154,6 +154,7 @@ $lang->project->taskSummary = "Total tasks shown: %s. Pendi $lang->project->memberHours = "%s has %s workhours, "; $lang->project->groupSummary = "%s tasks in this group, wait:%s, doing:%s, estimate %s, consumed %s, left %s hours."; $lang->project->wbs = "WBS"; +$lang->project->batchWBS = "Batch WBS"; $lang->project->largeBurnChart = 'View large'; $lang->project->howToUpdateBurn = "How?"; $lang->project->whyNoStories = "There no active stories to added to this project. Please check the linked product."; diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php index 846ad379df..0196d3740d 100644 --- a/module/project/lang/zh-cn.php +++ b/module/project/lang/zh-cn.php @@ -154,6 +154,7 @@ $lang->project->taskSummary = "本页共 %s 个任务,未 $lang->project->memberHours = "%s共有 %s 个可用工时,"; $lang->project->groupSummary = "本组共 %s 个任务,未开始%s,进行中%s,总预计%s工时,已消耗%s工时,剩余%s工时。"; $lang->project->wbs = "分解任务"; +$lang->project->batchWBS = "批量分解"; $lang->project->largeBurnChart = '点击查看大图'; $lang->project->howToUpdateBurn = "如何更新?"; $lang->project->whyNoStories = "看起来没有需求可以关联。请检查下项目关联的产品中有没有需求,而且要确保它们已经审核通过。"; diff --git a/module/project/view/story.html.php b/module/project/view/story.html.php index 19df19c4aa..ccdd58d609 100644 --- a/module/project/view/story.html.php +++ b/module/project/view/story.html.php @@ -35,7 +35,7 @@ statusAB);?> story->stageAB);?> story->taskCount;?> - actions;?> + actions;?> @@ -67,7 +67,7 @@ id}&story={$story->id}"; common::printLink('task', 'create', $param, $lang->project->wbs); - common::printLink('task', 'batchCreate', $param, $lang->task->batchCreate); + common::printLink('task', 'batchCreate', $param . "&iframe=1", $lang->project->batchWBS, '', "class='batchWBS'", true, true); common::printLink('project', 'unlinkStory', $param, $lang->unlink, 'hiddenwin'); ?> diff --git a/module/story/control.php b/module/story/control.php index c99338a3fa..9a601c8f19 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -325,12 +325,12 @@ class story extends control if(!$projectID) { $product = $this->product->getByID($productID); - $this->view->header['title'] = $product->name . $this->lang->colon . $this->lang->story->batchEdit; + $this->view->header->title = $product->name . $this->lang->colon . $this->lang->story->batchEdit; } else { $project = $this->project->getByID($projectID); - $this->view->header['title'] = $project->name . $this->lang->colon . $this->lang->story->batchEdit; + $this->view->header->title = $project->name . $this->lang->colon . $this->lang->story->batchEdit; } if($showSuhosinInfo) $this->view->suhosinInfo = $this->lang->suhosinInfo; $this->view->position[] = $this->lang->story->common; @@ -646,12 +646,12 @@ class story extends control if(!$projectID) { $product = $this->product->getByID($productID); - $this->view->header['title'] = $product->name . $this->lang->colon . $this->lang->story->batchClose; + $this->view->header->title = $product->name . $this->lang->colon . $this->lang->story->batchClose; } else { $project = $this->project->getByID($projectID); - $this->view->header['title'] = $project->name . $this->lang->colon . $this->lang->story->batchClose; + $this->view->header->title = $project->name . $this->lang->colon . $this->lang->story->batchClose; } if($showSuhosinInfo) $this->view->suhosinInfo = $this->lang->suhosinInfo; $this->view->position[] = $this->lang->story->common; diff --git a/module/task/control.php b/module/task/control.php index b5b8e6be23..e09aaf8d45 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -97,7 +97,7 @@ class task extends control * @access public * @return void */ - public function batchCreate($projectID = 0, $storyID = 0) + public function batchCreate($projectID = 0, $storyID = 0, $iframe = 0) { $project = $this->project->getById($projectID); $taskLink = $this->createLink('project', 'browse', "projectID=$projectID&tab=task"); @@ -118,6 +118,7 @@ class task extends control } /* Locate the browser. */ + if($iframe) die(js::reload('parent.parent')); die(js::locate($taskLink, 'parent')); } @@ -254,9 +255,9 @@ class task extends control $this->app->session->set('showSuhosinInfo', $showSuhosinInfo); /* Assign. */ - $this->view->header['title'] = $project->name . $this->lang->colon . $this->lang->task->batchEdit; - $this->view->position[] = $this->lang->task->common; - $this->view->position[] = $this->lang->task->batchEdit; + $this->view->header->title = $project->name . $this->lang->colon . $this->lang->task->batchEdit; + $this->view->position[] = $this->lang->task->common; + $this->view->position[] = $this->lang->task->batchEdit; $members = $this->project->getTeamMemberPairs($projectID, 'nodeleted'); $members = $members + array('closed' => 'Closed'); diff --git a/module/testcase/control.php b/module/testcase/control.php index 69e35f335b..4167c48926 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -317,7 +317,7 @@ class testcase extends control $productID = $case->product; $this->testcase->setMenu($this->products, $productID); - $this->view->header['title'] = "CASE #$case->id $case->title - " . $this->products[$productID]; + $this->view->header->title = "CASE #$case->id $case->title - " . $this->products[$productID]; $this->view->position[] = html::a($this->createLink('testcase', 'browse', "productID=$productID"), $this->products[$productID]); $this->view->position[] = $this->lang->testcase->view; @@ -435,7 +435,7 @@ class testcase extends control $this->app->session->set('showSuhosinInfo', $showSuhosinInfo); /* Assign. */ - $this->view->header['title'] = $product->name . $this->lang->colon . $this->lang->testcase->batchEdit; + $this->view->header->title = $product->name . $this->lang->colon . $this->lang->testcase->batchEdit; $this->view->position[] = html::a($this->createLink('testcase', 'browse', "productID=$productID"), $this->products[$productID]); $this->view->position[] = $this->lang->testcase->common; $this->view->position[] = $this->lang->testcase->batchEdit; diff --git a/module/testtask/control.php b/module/testtask/control.php index bc8e674a52..fd200a81f2 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -146,7 +146,7 @@ class testtask extends control $productID = $this->product->saveState($productID, $this->products); $this->testtask->setMenu($this->products, $productID); - $this->view->header['title'] = $this->products[$productID] . $this->lang->colon . $this->lang->testtask->create; + $this->view->header->title = $this->products[$productID] . $this->lang->colon . $this->lang->testtask->create; $this->view->position[] = html::a($this->createLink('testtask', 'browse', "productID=$productID"), $this->products[$productID]); $this->view->position[] = $this->lang->testtask->create; @@ -178,7 +178,7 @@ class testtask extends control $productID = $task->product; $this->testtask->setMenu($this->products, $productID); - $this->view->header['title'] = "TASK #$task->id $task->name/" . $this->products[$productID]; + $this->view->header->title = "TASK #$task->id $task->name/" . $this->products[$productID]; $this->view->position[] = html::a($this->createLink('testtask', 'browse', "productID=$productID"), $this->products[$productID]); $this->view->position[] = $this->lang->testtask->view; @@ -236,7 +236,7 @@ class testtask extends control foreach($this->view->runs as $run) $testcaseIDs .= ',' . $run->case; $this->session->set('testcaseIDs', $testcaseIDs . ','); - $this->view->header['title'] = $this->products[$productID] . $this->lang->colon . $this->lang->testtask->cases; + $this->view->header->title = $this->products[$productID] . $this->lang->colon . $this->lang->testtask->cases; $this->view->position[] = html::a($this->createLink('testtask', 'browse', "productID=$productID"), $this->products[$productID]); $this->view->position[] = $this->lang->testtask->cases; $this->view->productID = $productID; @@ -286,7 +286,7 @@ class testtask extends control /* Set menu. */ $this->testtask->setMenu($this->products, $productID); - $this->view->header['title'] = $this->products[$productID] . $this->lang->colon . $this->lang->testtask->edit; + $this->view->header->title = $this->products[$productID] . $this->lang->colon . $this->lang->testtask->edit; $this->view->position[] = html::a($this->createLink('testtask', 'browse', "productID=$productID"), $this->products[$productID]); $this->view->position[] = $this->lang->testtask->edit; @@ -355,7 +355,7 @@ class testtask extends control /* Save session. */ $this->testtask->setMenu($this->products, $productID); - $this->view->header['title'] = $this->products[$productID] . $this->lang->colon . $this->lang->testtask->linkCase; + $this->view->header->title = $this->products[$productID] . $this->lang->colon . $this->lang->testtask->linkCase; $this->view->position[] = html::a($this->createLink('testtask', 'browse', "productID=$productID"), $this->products[$productID]); $this->view->position[] = $this->lang->testtask->linkCase;