diff --git a/module/block/control.php b/module/block/control.php index 1f8fc9f8a6..ed792d5217 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -12,8 +12,8 @@ class block extends control { /** - * construct. - * + * construct. + * * @access public * @return void */ @@ -26,10 +26,10 @@ class block extends control } /** - * Block admin. - * - * @param int $id - * @param string $module + * Block admin. + * + * @param int $id + * @param string $module * @access public * @return void */ @@ -78,13 +78,13 @@ class block extends control $this->display(); } - /** - * Set params when type is rss or html. - * - * @param int $id - * @param string $type - * @access public - * @return void + /** + * Set params when type is rss or html. + * + * @param int $id + * @param string $type + * @access public + * @return void */ public function set($id, $type, $source = '') { @@ -92,7 +92,7 @@ class block extends control { $source = isset($this->lang->block->moduleList[$source]) ? $source : ''; $this->block->save($id, $source, $type, $this->session->blockModule); - if(dao::isError()) die(js::error(dao::geterror())); + if(dao::isError()) die(js::error(dao::geterror())); die(js::reload('parent')); } @@ -115,26 +115,26 @@ class block extends control $this->view->type = $type; $this->view->id = $id; $this->view->block = ($block) ? $block : array(); - $this->display(); + $this->display(); } /** - * Delete block - * - * @param int $id - * @param string $sys - * @param string $type + * Delete block + * + * @param int $id + * @param string $sys + * @param string $type * @access public * @return void */ public function delete($id, $module = 'my', $type = 'delete') - { + { if($type == 'hidden') - { + { $this->dao->update(TABLE_BLOCK)->set('hidden')->eq(1)->where('`id`')->eq($id)->andWhere('account')->eq($this->app->user->account)->andWhere('module')->eq($module)->exec(); } else - { + { $this->dao->delete()->from(TABLE_BLOCK)->where('`id`')->eq($id)->andWhere('account')->eq($this->app->user->account)->andWhere('module')->eq($module)->exec(); } if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError())); @@ -144,10 +144,10 @@ class block extends control /** * Sort block. - * - * @param string $oldOrder - * @param string $newOrder - * @param string $module + * + * @param string $oldOrder + * @param string $newOrder + * @param string $module * @access public * @return void */ @@ -155,7 +155,7 @@ class block extends control { $orders = explode(',', $orders); $blockList = $this->block->getBlockList($module); - + foreach ($orders as $order => $blockID) { $block = $blockList[$blockID]; @@ -199,8 +199,8 @@ class block extends control /** * Display dashboard for app. - * - * @param string $module + * + * @param string $module * @access public * @return void */ @@ -272,7 +272,7 @@ class block extends control /** * latest dynamic. - * + * * @access public * @return void */ @@ -285,7 +285,7 @@ class block extends control /** * Welcome block. - * + * * @access public * @return void */ @@ -317,9 +317,9 @@ class block extends control } /** - * Print block. - * - * @param int $id + * Print block. + * + * @param int $id * @access public * @return void */ @@ -361,13 +361,13 @@ class block extends control { $html = $this->fetch('block', 'welcome'); } - + echo $html; } /** * Main function. - * + * * @access public * @return void */ @@ -383,7 +383,7 @@ class block extends control $mode = strtolower($this->get->mode); if($mode == 'getblocklist') - { + { $blocks = $this->block->getAvailableBlocks($module); if(!$this->selfCall) { @@ -401,13 +401,13 @@ class block extends control echo '
'; echo html::select('moduleBlock', $blockPairs, ($block and $block->source != '') ? $block->block : '', "class='form-control chosen'"); echo '
'; - } + } elseif($mode == 'getblockform') - { + { $code = strtolower($this->get->blockid); $func = 'get' . ucfirst($code) . 'Params'; echo $this->block->$func($module); - } + } elseif($mode == 'getblockdata') { $code = strtolower($this->get->blockid); @@ -417,7 +417,7 @@ class block extends control if(!$this->selfCall) { $this->app->user = $this->dao->select('*')->from(TABLE_USER)->where('ranzhi')->eq($params->account)->fetch(); - if(empty($this->app->user)) + if(empty($this->app->user)) { $this->app->user = new stdclass(); $this->app->user->account = 'guest'; @@ -475,7 +475,7 @@ class block extends control /** * Print List block. - * + * * @access public * @return void */ @@ -489,7 +489,7 @@ class block extends control /** * Print todo block. - * + * * @access public * @return void */ @@ -504,7 +504,7 @@ class block extends control /** * Print task block. - * + * * @access public * @return void */ @@ -518,7 +518,7 @@ class block extends control /** * Print bug block. - * + * * @access public * @return void */ @@ -531,7 +531,7 @@ class block extends control /** * Print case block. - * + * * @access public * @return void */ @@ -569,7 +569,7 @@ class block extends control /** * Print testtask block. - * + * * @access public * @return void */ @@ -595,7 +595,7 @@ class block extends control /** * Print story block. - * + * * @access public * @return void */ @@ -613,7 +613,7 @@ class block extends control /** * Print plan block. - * + * * @access public * @return void */ @@ -674,7 +674,7 @@ class block extends control /** * Print product block. - * + * * @access public * @return void */ @@ -701,8 +701,8 @@ class block extends control /** * Print statistic block. - * - * @param string $module + * + * @param string $module * @access public * @return void */ @@ -849,7 +849,7 @@ class block extends control /** * Print project statistic block. - * + * * @access public * @return void */ @@ -1013,7 +1013,7 @@ class block extends control foreach($build->bugs as $bugID) $bugIDList[$bugID] = $bugID; } } - foreach($openedBugs as $buildBugs) + foreach($openedBugs as $buildBugs) { foreach($buildBugs as $bugID => $bug) $bugIDList[$bugID] = $bugID; } @@ -1047,7 +1047,7 @@ class block extends control foreach($build->bugs as $key => $bugID) { if(!isset($bugs[$bugID])) continue; - + $bug = $bugs[$bugID]; if($bug->assignedTo = $this->app->user->account) $build->assignedToMe++; @@ -1056,7 +1056,7 @@ class block extends control { $build->unclosed++; - if($bug->status != 'resoloved') + if($bug->status != 'resoloved') { $build->unresolved++; @@ -1069,7 +1069,7 @@ class block extends control if(isset($confirmedBugs[$bugID])) $yesterdayConfirmed++; $build->total++; - } + } $build->assignedRate = $build->total ? round($build->assignedToMe / $build->total * 100, 2) : 0; $build->unresolvedRate = $build->total ? round($build->unresolved / $build->total * 100, 2) : 0; @@ -1098,7 +1098,7 @@ class block extends control /** * Print product overview block. - * + * * @access public * @return void */ @@ -1123,7 +1123,7 @@ class block extends control /** * Print project overview block. - * + * * @access public * @return void */ @@ -1183,7 +1183,7 @@ class block extends control /** * Print project block. - * + * * @access public * @return void */ @@ -1199,7 +1199,7 @@ class block extends control /** * Print assign to me block. - * + * * @access public * @return void */ @@ -1277,9 +1277,9 @@ class block extends control } /** - * Close block forever. - * - * @param int $blockID + * Close block forever. + * + * @param int $blockID * @access public * @return void */ diff --git a/module/block/view/qastatisticblock.html.php b/module/block/view/qastatisticblock.html.php index eadc7cbf33..6d2ce12a00 100644 --- a/module/block/view/qastatisticblock.html.php +++ b/module/block/view/qastatisticblock.html.php @@ -45,7 +45,7 @@
- 开发已提交测试申请,id}");?>" class="text-primary">现在去测试 + bug->hasSubmittedTest;?>id}");?>" class="text-primary">bug->nowToTest;?>
@@ -55,25 +55,25 @@
- 全部Bug + bug->allBugs . ' Bug';?> total;?>
-   指派给我   assignedToMe;?> +   bug->assignToMe;?>   assignedToMe;?>
yesterdayResolved):?> -
昨日解决 yesterdayResolved;?>
+
bug->yesterdayResolved;?> yesterdayResolved;?>
- 未解决 + bug->unResolved;?>
unresolved;?> @@ -82,14 +82,14 @@
yesterdayConfirmed):?> -
昨日确认 yesterdayConfirmed;?>
+
bug->yesterdayConfirmed;?> yesterdayConfirmed;?>
- 未确认 + bug->unconfirmed;?>
unconfirmed;?> @@ -98,14 +98,14 @@
yesterdayClosed):?> -
昨日关闭 yesterdayClosed;?>
+
bug->yesterdayClosed;?> yesterdayClosed;?>
- 未关闭 + bug->unclosed;?>
unclosed;?> @@ -123,7 +123,7 @@ diff --git a/module/bug/lang/en.php b/module/bug/lang/en.php index 1ce6b51d32..ad2df0a06b 100644 --- a/module/bug/lang/en.php +++ b/module/bug/lang/en.php @@ -103,24 +103,26 @@ $lang->bug->copy = 'Copy'; $lang->bug->search = 'Search'; /* 查询条件列表。*/ -$lang->bug->assignToMe = 'AssignedToMe'; -$lang->bug->openedByMe = 'CreatedByMe'; -$lang->bug->resolvedByMe = 'ResolvedByMe'; -$lang->bug->closedByMe = 'ClosedByMe'; -$lang->bug->assignToNull = 'Unassigned'; -$lang->bug->unResolved = 'Unresolved'; -$lang->bug->toClosed = 'ToBeClosed'; -$lang->bug->unclosed = 'Active'; -$lang->bug->unconfirmed = 'UnConfirmed'; -$lang->bug->longLifeBugs = 'Pending'; -$lang->bug->postponedBugs = 'Postponed'; -$lang->bug->overdueBugs = 'Overdue'; -$lang->bug->allBugs = 'All'; -$lang->bug->byQuery = 'Search'; -$lang->bug->needConfirm = 'StoryChanged'; -$lang->bug->allProduct = 'All' . $lang->productCommon; -$lang->bug->my = 'My'; -$lang->bug->yesterdayResolved = 'Resolved Yesterday '; +$lang->bug->assignToMe = 'AssignedToMe'; +$lang->bug->openedByMe = 'CreatedByMe'; +$lang->bug->resolvedByMe = 'ResolvedByMe'; +$lang->bug->closedByMe = 'ClosedByMe'; +$lang->bug->assignToNull = 'Unassigned'; +$lang->bug->unResolved = 'Unresolved'; +$lang->bug->toClosed = 'ToBeClosed'; +$lang->bug->unclosed = 'Active'; +$lang->bug->unconfirmed = 'UnConfirmed'; +$lang->bug->longLifeBugs = 'Pending'; +$lang->bug->postponedBugs = 'Postponed'; +$lang->bug->overdueBugs = 'Overdue'; +$lang->bug->allBugs = 'All'; +$lang->bug->byQuery = 'Search'; +$lang->bug->needConfirm = 'StoryChanged'; +$lang->bug->allProduct = 'All' . $lang->productCommon; +$lang->bug->my = 'My'; +$lang->bug->yesterdayResolved = 'Resolved Yesterday '; +$lang->bug->yesterdayConfirmed = 'Confirmed Yesterday '; +$lang->bug->yesterdayClosed = 'Closed Yesterday '; $lang->bug->assignToMeAB = 'Assigned To Me'; $lang->bug->openedByMeAB = 'Created By Me'; @@ -165,6 +167,8 @@ $lang->bug->remindTask = 'This Bug has been converted to Task. Do you $lang->bug->skipClose = 'Bug %s is not resolved. You cannot close it.'; $lang->bug->applyTemplate = 'Template'; $lang->bug->confirmDeleteTemplate = 'Do you want to delete this template?'; +$lang->bug->hasSubmittedTest = 'Development has submitted test application,'; +$lang->bug->nowToTest = 'Now to test'; /* 模板。*/ $lang->bug->tplStep = "

[Steps]

\n"; @@ -334,18 +338,18 @@ $lang->bug->report->bugsPerProject->graph->xAxisName = $lang->projectCommon; $lang->bug->report->bugsPerBuild->graph->xAxisName = 'Build'; $lang->bug->report->bugsPerModule->graph->xAxisName = 'Module'; -$lang->bug->report->openedBugsPerDay->type = 'bar'; +$lang->bug->report->openedBugsPerDay->type = 'bar'; $lang->bug->report->openedBugsPerDay->graph->xAxisName = 'Date'; -$lang->bug->report->resolvedBugsPerDay->type = 'bar'; +$lang->bug->report->resolvedBugsPerDay->type = 'bar'; $lang->bug->report->resolvedBugsPerDay->graph->xAxisName = 'Date'; -$lang->bug->report->closedBugsPerDay->type = 'bar'; +$lang->bug->report->closedBugsPerDay->type = 'bar'; $lang->bug->report->closedBugsPerDay->graph->xAxisName = 'Date'; -$lang->bug->report->openedBugsPerUser->graph->xAxisName = 'User'; -$lang->bug->report->resolvedBugsPerUser->graph->xAxisName= 'User'; -$lang->bug->report->closedBugsPerUser->graph->xAxisName = 'User'; +$lang->bug->report->openedBugsPerUser->graph->xAxisName = 'User'; +$lang->bug->report->resolvedBugsPerUser->graph->xAxisName = 'User'; +$lang->bug->report->closedBugsPerUser->graph->xAxisName = 'User'; $lang->bug->report->bugsPerSeverity->graph->xAxisName = 'Priority'; $lang->bug->report->bugsPerResolution->graph->xAxisName = 'Solution'; diff --git a/module/bug/lang/zh-cn.php b/module/bug/lang/zh-cn.php index 84c920310f..f1c39f24a2 100644 --- a/module/bug/lang/zh-cn.php +++ b/module/bug/lang/zh-cn.php @@ -103,24 +103,26 @@ $lang->bug->copy = '复制Bug'; $lang->bug->search = '搜索'; /* 查询条件列表。*/ -$lang->bug->assignToMe = '指派给我'; -$lang->bug->openedByMe = '由我创建'; -$lang->bug->resolvedByMe = '由我解决'; -$lang->bug->closedByMe = '由我关闭'; -$lang->bug->assignToNull = '未指派'; -$lang->bug->unResolved = '未解决'; -$lang->bug->toClosed = '待关闭'; -$lang->bug->unclosed = '未关闭'; -$lang->bug->unconfirmed = '未确认'; -$lang->bug->longLifeBugs = '久未处理'; -$lang->bug->postponedBugs = '被延期'; -$lang->bug->overdueBugs = '过期Bug'; -$lang->bug->allBugs = '所有'; -$lang->bug->byQuery = '搜索'; -$lang->bug->needConfirm = '需求变动'; -$lang->bug->allProduct = '所有' . $lang->productCommon; -$lang->bug->my = '我的'; -$lang->bug->yesterdayResolved = '昨天解决'; +$lang->bug->assignToMe = '指派给我'; +$lang->bug->openedByMe = '由我创建'; +$lang->bug->resolvedByMe = '由我解决'; +$lang->bug->closedByMe = '由我关闭'; +$lang->bug->assignToNull = '未指派'; +$lang->bug->unResolved = '未解决'; +$lang->bug->toClosed = '待关闭'; +$lang->bug->unclosed = '未关闭'; +$lang->bug->unconfirmed = '未确认'; +$lang->bug->longLifeBugs = '久未处理'; +$lang->bug->postponedBugs = '被延期'; +$lang->bug->overdueBugs = '过期Bug'; +$lang->bug->allBugs = '所有'; +$lang->bug->byQuery = '搜索'; +$lang->bug->needConfirm = '需求变动'; +$lang->bug->allProduct = '所有' . $lang->productCommon; +$lang->bug->my = '我的'; +$lang->bug->yesterdayResolved = '昨天解决'; +$lang->bug->yesterdayConfirmed = '昨天确认'; +$lang->bug->yesterdayClosed = '昨天关闭'; $lang->bug->assignToMeAB = '指派给我'; $lang->bug->openedByMeAB = '由我创建'; @@ -165,6 +167,8 @@ $lang->bug->remindTask = '该Bug已经转化为任务,是否更新 $lang->bug->skipClose = 'Bug %s 不是已解决状态,不能关闭。'; $lang->bug->applyTemplate = '应用模板'; $lang->bug->confirmDeleteTemplate = '您确认要删除该模板吗?'; +$lang->bug->hasSubmittedTest = '开发已提交测试申请,'; +$lang->bug->nowToTest = '现在去测试'; /* 模板。*/ $lang->bug->tplStep = "

[步骤]

"; @@ -334,18 +338,18 @@ $lang->bug->report->bugsPerProject->graph->xAxisName = $lang->projectCommon; $lang->bug->report->bugsPerBuild->graph->xAxisName = '版本'; $lang->bug->report->bugsPerModule->graph->xAxisName = '模块'; -$lang->bug->report->openedBugsPerDay->type = 'bar'; +$lang->bug->report->openedBugsPerDay->type = 'bar'; $lang->bug->report->openedBugsPerDay->graph->xAxisName = '日期'; -$lang->bug->report->resolvedBugsPerDay->type = 'bar'; +$lang->bug->report->resolvedBugsPerDay->type = 'bar'; $lang->bug->report->resolvedBugsPerDay->graph->xAxisName = '日期'; -$lang->bug->report->closedBugsPerDay->type = 'bar'; +$lang->bug->report->closedBugsPerDay->type = 'bar'; $lang->bug->report->closedBugsPerDay->graph->xAxisName = '日期'; -$lang->bug->report->openedBugsPerUser->graph->xAxisName = '用户'; -$lang->bug->report->resolvedBugsPerUser->graph->xAxisName= '用户'; -$lang->bug->report->closedBugsPerUser->graph->xAxisName = '用户'; +$lang->bug->report->openedBugsPerUser->graph->xAxisName = '用户'; +$lang->bug->report->resolvedBugsPerUser->graph->xAxisName = '用户'; +$lang->bug->report->closedBugsPerUser->graph->xAxisName = '用户'; $lang->bug->report->bugsPerSeverity->graph->xAxisName = '严重程度'; $lang->bug->report->bugsPerResolution->graph->xAxisName = '解决方案';