@@ -164,7 +164,7 @@ $(document).ready(function() }) /** - * 勾选浏览列表标签时,自动勾选下面的所有标签。 + * 勾选浏览列表标签时,自动勾选下面的所有标签。 * Check all tabs when the Browse list tab is selected. */ $('.menus input[value=browse]').change(function() diff --git a/module/projectstory/control.php b/module/projectstory/control.php index 7251244514..f9fde8c05d 100644 --- a/module/projectstory/control.php +++ b/module/projectstory/control.php @@ -52,14 +52,12 @@ class projectStory extends control * @access public * @return void */ - public function track($productID = 0, $branch = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1) + public function track($projectID = 0, $productID = 0, $branch = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1) { - if(empty($productID)) $productID = key($this->products); + $products = $this->loadModel('product')->getProductPairsByProject($projectID); + if(empty($productID)) $productID = key($products); - $this->lang->story->requirement = str_replace($this->lang->URCommon, $this->lang->URCommon, $this->lang->story->requirement); - $this->lang->story->story = str_replace($this->lang->SRCommon, $this->lang->SRCommon, $this->lang->story->story); - - echo $this->fetch('story', 'track', "productID=$productID&branch=$branch&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"); + echo $this->fetch('story', 'track', "productID=$productID&branch=$branch&projectID=$projectID&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"); } /** diff --git a/module/search/control.php b/module/search/control.php index 9f10bff29b..9224a5c7d2 100644 --- a/module/search/control.php +++ b/module/search/control.php @@ -11,6 +11,18 @@ */ class search extends control { + /** + * Determine whether to display the effort object. + * + * @access public + * @return void + */ + public function __construct($module = '', $method = '') + { + parent::__construct($module, $method); + if(!isset($this->config->maxVersion)) unset($this->lang->search->modules['effort']); + } + /** * Build search form. * @@ -186,7 +198,6 @@ class search extends control if(empty($type)) $type = $this->post->type; if(empty($type) and ($recTotal != 0 or $pageID != 1)) $type = $this->session->searchIngType; $type = (empty($type) or $type[0] == 'all') ? 'all' : $type; - //if($objectType != 'all') $type = explode('', $objectType); $this->app->loadClass('pager', $static = true); $pager = new pager($recTotal, $this->config->search->recPerPage, $pageID); diff --git a/module/search/lang/zh-cn.php b/module/search/lang/zh-cn.php index b4a236692f..139d468d5c 100644 --- a/module/search/lang/zh-cn.php +++ b/module/search/lang/zh-cn.php @@ -76,7 +76,7 @@ $lang->search->modules['bug'] = 'Bug'; $lang->search->modules['case'] = '用例'; $lang->search->modules['doc'] = '文档'; $lang->search->modules['todo'] = '待办'; -$lang->search->modules['build'] = 'Build'; +$lang->search->modules['build'] = '版本'; $lang->search->modules['effort'] = '日志'; $lang->search->modules['caselib'] = '测试库'; $lang->search->modules['product'] = $lang->productCommon; diff --git a/module/setting/model.php b/module/setting/model.php index 46d5989b45..8fc6d443f3 100644 --- a/module/setting/model.php +++ b/module/setting/model.php @@ -14,10 +14,10 @@ class settingModel extends model { //-------------------------------- methods for get, set and delete setting items. ----------------------------// - + /** * Get value of an item. - * + * * @param string $paramString see parseItemParam(); * @access public * @return misc @@ -29,7 +29,7 @@ class settingModel extends model /** * Get some items. - * + * * @param string $paramString see parseItemParam(); * @access public * @return array @@ -40,10 +40,10 @@ class settingModel extends model } /** - * Set value of an item. - * - * @param string $path system.common.global.sn or system.common.sn - * @param string $value + * Set value of an item. + * + * @param string $path system.common.global.sn or system.common.sn + * @param string $value * @access public * @return void */ @@ -78,12 +78,12 @@ class settingModel extends model /** * Batch set items, the example: - * + * * $path = 'system.mail'; * $items->turnon = true; * $items->smtp->host = 'localhost'; * - * @param string $path like system.mail + * @param string $path like system.mail * @param array|object $items the items array or object, can be mixed by one level or two levels. * @access public * @return bool @@ -112,7 +112,7 @@ class settingModel extends model /** * Delete items. - * + * * @param string $paramString see parseItemParam(); * @access public * @return void @@ -124,7 +124,7 @@ class settingModel extends model /** * Parse the param string for select or delete items. - * + * * @param string $paramString owner=xxx&key=sn and so on. * @access public * @return array @@ -132,7 +132,7 @@ class settingModel extends model public function parseItemParam($paramString) { /* Parse the param string into array. */ - parse_str($paramString, $params); + parse_str($paramString, $params); /* Init fields not set in the param string. */ $fields = 'owner,module,section,key'; @@ -144,7 +144,7 @@ class settingModel extends model /** * Create a DAO object to select or delete one or more records. - * + * * @param array $params the params parsed by parseItemParam() method. * @param string $method select|delete. * @access public @@ -162,7 +162,7 @@ class settingModel extends model /** * Get config of system and one user. * - * @param string $account + * @param string $account * @access public * @return array */ @@ -189,10 +189,10 @@ class settingModel extends model } //-------------------------------- methods for version and sn. ----------------------------// - + /** * Get the version of current zentaopms. - * + * * Since the version field not saved in db. So if empty, return 0.3 beta. * * @access public @@ -206,9 +206,21 @@ class settingModel extends model } /** - * Update version - * - * @param string $version + * Get URSR. + * + * @access public + * @return int + */ + public function getURSR() + { + if(isset($this->config->URSR)) return $this->config->URSR; + return $this->getItem('owner=system&module=custom&key=URSR'); + } + + /** + * Update version + * + * @param string $version * @access public * @return void */ @@ -219,7 +231,7 @@ class settingModel extends model /** * Set the sn of current zentaopms. - * + * * @access public * @return void */ @@ -231,8 +243,8 @@ class settingModel extends model /** * Compute a SN. Use the server ip, and server software string as seed, and an rand number, two micro time - * - * Note: this sn just to unique this zentaopms. No any private info. + * + * Note: this sn just to unique this zentaopms. No any private info. * * @access public * @return string @@ -246,8 +258,8 @@ class settingModel extends model /** * Judge a sn needed update or not. - * - * @param string $sn + * + * @param string $sn * @access public * @return bool */ diff --git a/module/story/control.php b/module/story/control.php index 169e69a8f8..0dcbb673db 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -1380,10 +1380,10 @@ class story extends control * @access public * @return void */ - public function track($productID, $branch = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1) + public function track($productID, $branch = 0, $projectID = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1) { /* Set menu. The projectstory module does not execute. */ - if($this->app->rawModule == 'story') + if(!$projectID) { $products = $this->product->getPairs(); $productID = $this->product->saveState($productID, $products); @@ -1403,7 +1403,11 @@ class story extends control $pager = new pager($recTotal, $recPerPage, $pageID); $tracks = $this->story->getTracks($productID, $branch, $pager); - if($this->app->rawModule == 'projectstory') $projectProducts = $this->product->getProducts($this->session->project); + if($projectID) + { + $this->loadModel('project')->setMenu($projectID); + $projectProducts = $this->product->getProducts($projectID); + } $this->view->title = $this->lang->story->track; $this->view->position[] = $this->lang->story->track; diff --git a/module/story/model.php b/module/story/model.php index fcaac7084e..b72b4d0c5e 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -3484,7 +3484,7 @@ class storyModel extends model common::printIcon('story', 'review', $vars . "&from=$story->from", $story, 'list', 'search', '', '', false, "data-group=$story->from"); common::printIcon('story', 'close', $vars, $story, 'list', '', '', 'iframe', true); common::printIcon('story', 'edit', $vars . "&from=$story->from", $story, 'list', '', '', '', false, "data-group=$story->from"); - common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$vars", $story, 'list', 'sitemap'); + common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$vars", $story, 'list', 'sitemap', '', '', false, "data-app='qa'"); common::printIcon('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&storyID=$story->id", $story, 'list', 'split', '', '', '', '', $this->lang->story->subdivide); if($this->app->rawModule == 'projectstory') common::printIcon('projectstory', 'unlinkStory', "projectID={$this->session->project}&storyID=$story->id", '', 'list', 'unlink', 'hiddenwin'); } diff --git a/module/story/view/zerocase.html.php b/module/story/view/zerocase.html.php index 7711ca80cd..3e1d3ac7fc 100644 --- a/module/story/view/zerocase.html.php +++ b/module/story/view/zerocase.html.php @@ -60,7 +60,7 @@ id);?> pri;?>' title='story->priList, $story->pri);?>'>story->priList, $story->pri)?> - title, '', "data-app='{$this->app->openApp}'");?> + title, '', "data-app='product'");?> planTitle;?> story->sourceList[$story->source];?> openedBy);?> diff --git a/module/testcase/control.php b/module/testcase/control.php index f3ff078d2c..3f74721bbb 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -273,6 +273,10 @@ class testcase extends control { $this->loadModel('execution')->setMenu($this->session->execution); } + else + { + $this->qa->setMenu($this->products, $productID, $branch); + } $testcaseID = ($from and strpos('testcase|work|contribute', $from)) ? $param : 0; $bugID = $from == 'bug' ? $param : 0; diff --git a/module/todo/control.php b/module/todo/control.php index d751c4c6a4..25c7374816 100644 --- a/module/todo/control.php +++ b/module/todo/control.php @@ -423,7 +423,6 @@ class todo extends control else { $this->todo->delete(TABLE_TODO, $todoID); - $this->loadModel('action')->create('todo', $todoID, 'erased'); /* if ajax request, send result. */ if($this->server->ajax)