diff --git a/module/block/view/programblock.html.php b/module/block/view/programblock.html.php index 0308d121d2..613b95c471 100644 --- a/module/block/view/programblock.html.php +++ b/module/block/view/programblock.html.php @@ -35,8 +35,8 @@ teamCount;?> - consumed;?> - budget . ' ' . zget($lang->program->unitList, $project->budgetUnit);?> + consumed . ' ' . $lang->project->workHourUnit;?> + budget != 0 ? zget($lang->program->currencySymbol, $project->budgetUnit) . number_format($project->budget, 2) : $lang->program->future;?> leftStories;?> leftTasks;?> leftBugs;?> diff --git a/module/block/view/programteamblock.html.php b/module/block/view/programteamblock.html.php index ce451d09da..bb89a6860b 100644 --- a/module/block/view/programteamblock.html.php +++ b/module/block/view/programteamblock.html.php @@ -37,7 +37,7 @@ $maxConsumed = 0;
-
consumed;?>
+
consumed . $lang->project->workHourUnit;?>
diff --git a/module/block/view/projectblock.html.php b/module/block/view/projectblock.html.php index df642f9424..711b5fa8e5 100644 --- a/module/block/view/projectblock.html.php +++ b/module/block/view/projectblock.html.php @@ -51,9 +51,9 @@ - hours->totalEstimate;?> - hours->totalConsumed;?> - hours->totalLeft;?> + hours->totalEstimate . ' ' . $lang->project->workHourUnit;?> + hours->totalConsumed . ' ' . $lang->project->workHourUnit;?> + hours->totalLeft . ' ' . $lang->project->workHourUnit;?>
diff --git a/module/block/view/scrumlistblock.html.php b/module/block/view/scrumlistblock.html.php index 1ef46160d8..28721607fc 100644 --- a/module/block/view/scrumlistblock.html.php +++ b/module/block/view/scrumlistblock.html.php @@ -51,9 +51,9 @@ - hours->totalEstimate;?> - hours->totalConsumed;?> - hours->totalLeft;?> + hours->totalEstimate . ' ' . $lang->project->workHourUnit;?> + hours->totalConsumed . ' ' . $lang->project->workHourUnit;?> + hours->totalLeft . ' ' . $lang->project->workHourUnit;?>
diff --git a/module/block/view/scrumoverviewblock.html.php b/module/block/view/scrumoverviewblock.html.php index d5ac5ada73..341de826fa 100644 --- a/module/block/view/scrumoverviewblock.html.php +++ b/module/block/view/scrumoverviewblock.html.php @@ -37,18 +37,19 @@
block->consumedHours;?>
-
- consumed ? html::a($this->createLink('project', 'index', 'locate=no'), $totalData[$projectID]->consumed) : 0;?> +
+ consumed ? html::a($this->createLink('project', 'index', 'locate=no'), $totalData[$projectID]->consumed . $lang->project->workHourUnit) : 0;?>
- block->estimatedHours;?> estimate;?> + block->estimatedHours . ' ' . $totalData[$projectID]->estimate . $lang->project->workHour;?>
block->spent;?>
-
¥0
+ budget != 0 ? zget($lang->program->currencySymbol, $totalData[$projectID]->budgetUnit) . number_format($totalData[$projectID]->budget, 2) : $lang->program->future;?> +
- block->budget;?> ¥budget . ' ' . zget($lang->program->unitList, $totalData[$projectID]->budgetUnit);?> + block->budget . ' ' . $budget;?>
diff --git a/module/block/view/taskblock.html.php b/module/block/view/taskblock.html.php index 814fa2bca1..f6c8778f45 100644 --- a/module/block/view/taskblock.html.php +++ b/module/block/view/taskblock.html.php @@ -46,7 +46,7 @@ task->priList, $task->pri, $task->pri)?> createLink('task', 'view', "taskID=$task->id", '', '', $task->PRJ), $task->name)?> - estimate;?> + estimate . ' ' . $lang->project->workHourUnit;?> deadline, 0, 4) > 0) echo $task->deadline;?> processStatus('task', $task);?> diff --git a/module/index/view/index.html.php b/module/index/view/index.html.php index 0640ebfd33..c4a919f30c 100644 --- a/module/index/view/index.html.php +++ b/module/index/view/index.html.php @@ -19,7 +19,7 @@ js::set('tabsLang', $lang->index->tab); js::set('menuItems', commonModel::getMainNavList($app->rawModule)); js::set('defaultOpen', $open); ?> -config->bizVersion):?> +config->bizVersion)):?> @@ -202,9 +202,9 @@ processStatus('task', $task);?> " . $task->assignedToRealName . "";?> finishedBy);?> - estimate;?> - consumed;?> - left;?> + estimate . ' ' . $lang->project->workHourUnit;?> + consumed . ' ' . $lang->project->workHourUnit;?> + left . ' ' . $lang->project->workHourUnit;?> progress . '%';?> task->typeList, $task->type);?> '>deadline, 0, 4) > 0) echo $task->deadline;?> diff --git a/module/project/view/preview.html.php b/module/project/view/preview.html.php index 8ca08d6f3a..d88faf9c60 100644 --- a/module/project/view/preview.html.php +++ b/module/project/view/preview.html.php @@ -128,7 +128,7 @@ $dataType = ''; task->leftThisTime?> - left) echo $content->left?> + left) echo $content->left . $lang->project->workHourUnit;?> diff --git a/module/search/lang/de.php b/module/search/lang/de.php index cb03a8f9d3..d8baa10211 100644 --- a/module/search/lang/de.php +++ b/module/search/lang/de.php @@ -96,3 +96,4 @@ $lang->search->objecttypelist['story'] = $lang->srcommon; $lang->search->objecttypelist['requirement'] = $lang->urcommon; $lang->search->objecttypelist['stage'] = $lang->execution->stage; $lang->search->objecttypelist['sprint'] = $lang->execution->sprint; +$lang->search->objectTypeList['sprint'] = $lang->executionCommon; diff --git a/module/search/lang/en.php b/module/search/lang/en.php index 0685527486..10c5b1c6ee 100644 --- a/module/search/lang/en.php +++ b/module/search/lang/en.php @@ -95,4 +95,4 @@ $lang->search->modules['risk'] = 'Risk'; $lang->search->objecttypelist['story'] = $lang->srcommon; $lang->search->objecttypelist['requirement'] = $lang->urcommon; $lang->search->objecttypelist['stage'] = $lang->execution->stage; -$lang->search->objecttypelist['sprint'] = $lang->execution->sprint; +$lang->search->objectTypeList['sprint'] = $lang->executionCommon; diff --git a/module/search/lang/fr.php b/module/search/lang/fr.php index f4da522ee3..d969be9f71 100644 --- a/module/search/lang/fr.php +++ b/module/search/lang/fr.php @@ -95,4 +95,4 @@ $lang->search->modules['risk'] = 'Risk'; $lang->search->objecttypelist['story'] = $lang->srcommon; $lang->search->objecttypelist['requirement'] = $lang->urcommon; $lang->search->objecttypelist['stage'] = $lang->execution->stage; -$lang->search->objecttypelist['sprint'] = $lang->execution->sprint; +$lang->search->objectTypeList['sprint'] = $lang->executionCommon; diff --git a/module/search/lang/vi.php b/module/search/lang/vi.php index a09e5e4591..b99c65aabb 100644 --- a/module/search/lang/vi.php +++ b/module/search/lang/vi.php @@ -95,4 +95,4 @@ $lang->search->modules['risk'] = 'Risk'; $lang->search->objectTypeList['story'] = $lang->SRCommon; $lang->search->objectTypeList['requirement'] = $lang->URCommon; $lang->search->objectTypeList['stage'] = $lang->execution->stage; -$lang->search->objectTypeList['sprint'] = $lang->execution->sprint; +$lang->search->objectTypeList['sprint'] = $lang->executionCommon; diff --git a/module/search/lang/zh-cn.php b/module/search/lang/zh-cn.php index 4310d05d97..dedc55d5e8 100644 --- a/module/search/lang/zh-cn.php +++ b/module/search/lang/zh-cn.php @@ -95,4 +95,4 @@ $lang->search->modules['risk'] = '风险'; $lang->search->objectTypeList['story'] = $lang->SRCommon; $lang->search->objectTypeList['requirement'] = $lang->URCommon; $lang->search->objectTypeList['stage'] = $lang->execution->stage; -$lang->search->objectTypeList['sprint'] = $lang->execution->sprint; +$lang->search->objectTypeList['sprint'] = $lang->executionCommon; diff --git a/module/search/lang/zh-tw.php b/module/search/lang/zh-tw.php index 3962fb9504..7c5ef08582 100644 --- a/module/search/lang/zh-tw.php +++ b/module/search/lang/zh-tw.php @@ -95,4 +95,4 @@ $lang->search->modules['risk'] = '風險'; $lang->search->objecttypelist['story'] = $lang->srcommon; $lang->search->objecttypelist['requirement'] = $lang->urcommon; $lang->search->objecttypelist['stage'] = $lang->execution->stage; -$lang->search->objecttypelist['sprint'] = $lang->execution->sprint; +$lang->search->objectTypeList['sprint'] = $lang->executionCommon; diff --git a/module/search/model.php b/module/search/model.php index d4c366f677..562dbc1fd7 100644 --- a/module/search/model.php +++ b/module/search/model.php @@ -541,9 +541,11 @@ class searchModel extends model $module = $objectType; if($module == 'case') $module = 'testcase'; if(common::hasPriv($module, 'view')) $allowedObject[] = $objectType; - if($module == 'caselib' and common::hasPriv('caselib', 'view')) $allowedObject[] = $objectType; - if($module == 'execution' and common::haspriv('project', 'view')) $allowedobject[] = $objectType; - if($module == 'project' and common::haspriv('program', 'index')) $allowedobject[] = $objectType; + + if($module == 'caselib' and common::hasPriv('caselib', 'view')) $allowedObject[] = $objectType; + if($module == 'execution' and common::haspriv('project', 'view')) $allowedobject[] = $objectType; + if($module == 'project' and common::haspriv('program', 'index')) $allowedobject[] = $objectType; + if($module == 'deploystep' and common::haspriv('deploy', 'viewstep')) $allowedobject[] = $objectType; } } @@ -972,6 +974,9 @@ class searchModel extends model $query = $this->dao->select('t1.*')->from($table)->alias('t1') ->where('1') + ->beginIF($type == 'program')->andWhere('type')->eq('program')->fi() + ->beginIF($type == 'project')->andWhere('type')->eq('project')->fi() + ->beginIF($type == 'execution')->andWhere('type')->in('stage,sprint')->fi() ->beginIF(isset($data->deleted))->andWhere('t1.deleted')->eq(0)->fi(); } return $query; diff --git a/module/task/view/recordestimate.html.php b/module/task/view/recordestimate.html.php index 398a6bacc4..a6e624436a 100644 --- a/module/task/view/recordestimate.html.php +++ b/module/task/view/recordestimate.html.php @@ -53,8 +53,8 @@ id;?> date;?> - consumed;?> - left;?> + consumed . ' ' . $lang->project->workHourUnit;?> + left . ' ' . $lang->project->workHourUnit;?> work;?> team) or $task->assignedTo == $this->app->user->account):?> diff --git a/module/user/control.php b/module/user/control.php index aa6cdb1f6a..8601353aea 100644 --- a/module/user/control.php +++ b/module/user/control.php @@ -25,6 +25,7 @@ class user extends control $this->loadModel('company')->setMenu(); $this->loadModel('dept'); $this->loadModel('todo'); + $this->app->loadLang('project'); $this->app->loadModuleConfig($this->moduleName);//Finish task #5118.(Fix bug #2271) } diff --git a/module/user/css/task.css b/module/user/css/task.css index 8b66169867..48577511db 100644 --- a/module/user/css/task.css +++ b/module/user/css/task.css @@ -1 +1,2 @@ td.delayed{color:#fff; background: #e84e0f!important;} +.hours {white-space:nowrap; overflow:hidden; text-overflow:ellipsis;} diff --git a/module/user/view/task.html.php b/module/user/view/task.html.php index 8b82f83ca4..8b3042a14f 100644 --- a/module/user/view/task.html.php +++ b/module/user/view/task.html.php @@ -62,9 +62,9 @@ parent > 0) echo '' . $this->lang->task->childrenAB . ' ';?> createLink('task', 'view', "taskID=$task->id", '', false, $task->PRJ), $task->name, null, "style='color: $task->color'");?> - estimate;?> - consumed;?> - left;?> + estimate . ' ' . $lang->project->workHourUnit;?> + consumed . ' ' . $lang->project->workHourUnit;?> + left . ' ' . $lang->project->workHourUnit;?> delay)) echo 'delayed';?>>deadline, 0, 4) > 0) echo $task->deadline;?> processStatus('task', $task);?>