Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/easysoft/zentaopms
Browse files Browse the repository at this point in the history
  • Loading branch information
reneeteng committed May 27, 2019
2 parents f5f8e0d + ad457bd commit 95222fa
Show file tree
Hide file tree
Showing 18 changed files with 108 additions and 94 deletions.
2 changes: 1 addition & 1 deletion module/action/model.php
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ public function buildDateGroup($actions, $direction = 'next')
foreach($actions as $action)
{
$timeStamp = strtotime(isset($action->originalDate) ? $action->originalDate : $action->date);
$date = date(DT_DATE4, $timeStamp);
$date = $this->app->getClientLang() == 'en' ? date('M d', $timeStamp) : date(DT_DATE4, $timeStamp);
$action->time = date(DT_TIME2, $timeStamp);
$dateGroup[$date][] = $action;
}
Expand Down
14 changes: 7 additions & 7 deletions module/bug/lang/zh-cn.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,13 @@
$lang->bug->report->charts['openedBugsPerUser'] = '每人提交的Bug数';
$lang->bug->report->charts['resolvedBugsPerUser'] = '每人解决的Bug数';
$lang->bug->report->charts['closedBugsPerUser'] = '每人关闭的Bug数';
$lang->bug->report->charts['bugsPerSeverity'] = 'Bug严重程度统计';
$lang->bug->report->charts['bugsPerResolution'] = 'Bug解决方案统计';
$lang->bug->report->charts['bugsPerStatus'] = 'Bug状态统计';
$lang->bug->report->charts['bugsPerActivatedCount'] = 'Bug激活次数统计';
$lang->bug->report->charts['bugsPerPri'] = 'Bug优先级统计';
$lang->bug->report->charts['bugsPerType'] = 'Bug类型统计';
$lang->bug->report->charts['bugsPerAssignedTo'] = '指派给统计';
$lang->bug->report->charts['bugsPerSeverity'] = '按Bug严重程度统计';
$lang->bug->report->charts['bugsPerResolution'] = '按Bug解决方案统计';
$lang->bug->report->charts['bugsPerStatus'] = '按Bug状态统计';
$lang->bug->report->charts['bugsPerActivatedCount'] = '按Bug激活次数统计';
$lang->bug->report->charts['bugsPerPri'] = '按Bug优先级统计';
$lang->bug->report->charts['bugsPerType'] = '按Bug类型统计';
$lang->bug->report->charts['bugsPerAssignedTo'] = '按指派给统计';
//$lang->bug->report->charts['bugLiveDays'] = 'Bug处理时间统计';
//$lang->bug->report->charts['bugHistories'] = 'Bug处理步骤统计';

Expand Down
2 changes: 1 addition & 1 deletion module/common/lang/en.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
$lang->my->menu->profile = array('link' => 'Profile|my|profile', 'alias' => 'editprofile');
$lang->my->menu->changePassword = 'Password|my|changepassword';
$lang->my->menu->manageContacts = 'Contact|my|managecontacts';
$lang->my->menu->score = 'Point|my|score';
$lang->my->menu->score = array('link' => 'Point|my|score', 'subModule' => 'score');

$lang->my->dividerMenu = ',task,myProject,profile,';

Expand Down
4 changes: 2 additions & 2 deletions module/common/lang/zh-cn.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
$lang->my->menu->profile = array('link' => '档案|my|profile', 'alias' => 'editprofile');
$lang->my->menu->changePassword = '密码|my|changepassword';
$lang->my->menu->manageContacts = '联系人|my|managecontacts';
$lang->my->menu->score = '积分|my|score';
$lang->my->menu->score = array('link' => '积分|my|score', 'subModule' => 'score');

$lang->my->dividerMenu = ',task,myProject,profile,';

Expand Down Expand Up @@ -349,7 +349,7 @@
$lang->report->menu->staff = array('link' => '组织|report|workload');

$lang->report->notice = new stdclass();
$lang->report->notice->help = '注:统计报表的数据,来源于列表页面的检索结果,生成统计报表前请先在列表页面进行检索。';
$lang->report->notice->help = '注:统计报表的数据来源于列表页面的检索结果,生成统计报表前请先在列表页面进行检索。';

/* 组织结构视图菜单设置。*/
$lang->company = new stdclass();
Expand Down
11 changes: 10 additions & 1 deletion module/company/view/dynamic.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,16 @@
<div id='dynamics'>
<?php $firstAction = '';?>
<?php foreach($dateGroups as $date => $actions):?>
<?php $isToday = date(DT_DATE4) == $date;?>
<?php
if($this->app->getClientLang() == 'en')
{
$isToday = date('M d') == $date;
}
else
{
$isToday = date(DT_DATE4) == $date;
}
?>
<div class="dynamic <?php if($isToday) echo 'active';?>">
<div class="dynamic-date">
<?php if($isToday):?>
Expand Down
4 changes: 2 additions & 2 deletions module/my/lang/zh-cn.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
$lang->my->home->action = "%s, %s <em>%s</em> %s <a href='%s'>%s</a>。";
$lang->my->home->projects = $lang->projectCommon;
$lang->my->home->products = $lang->productCommon;
$lang->my->home->createProject = "创建一个{$lang->projectCommon}";
$lang->my->home->createProduct = "创建一个{$lang->productCommon}";
$lang->my->home->createProject = "添加{$lang->projectCommon}";
$lang->my->home->createProduct = "添加{$lang->productCommon}";
$lang->my->home->help = "<a href='https://www.zentao.net/help-read-79236.html' target='_blank'>帮助文档</a>";
$lang->my->home->noProductsTip = "这里还没有{$lang->productCommon}";

Expand Down
16 changes: 8 additions & 8 deletions module/my/view/task.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='c-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='c-project'> <?php common::printOrderLink('project', $orderBy, $vars, $lang->task->project);?></th>
<th class='c-name'> <?php common::printOrderLink('name', $orderBy, $vars, $lang->task->name);?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='w-100px c-assignedTo'><?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->task->assignedTo);?></th>
<th class='c-user'> <?php common::printOrderLink('finishedBy', $orderBy, $vars, $lang->task->finishedBy);?></th>
<th class='c-hours'> <?php common::printOrderLink('estimate', $orderBy, $vars, $lang->task->estimateAB);?></th>
<th class='c-pri w-40px'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='c-project'> <?php common::printOrderLink('project', $orderBy, $vars, $lang->task->project);?></th>
<th class='c-name'> <?php common::printOrderLink('name', $orderBy, $vars, $lang->task->name);?></th>
<th class='c-user w-90px'><?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='w-120px c-assignedTo'><?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->task->assignedTo);?></th>
<th class='c-user w-100px'><?php common::printOrderLink('finishedBy', $orderBy, $vars, $lang->task->finishedBy);?></th>
<th class='c-hours w-70px'><?php common::printOrderLink('estimate', $orderBy, $vars, $lang->task->estimateAB);?></th>
<th class='c-hours'> <?php common::printOrderLink('consumed', $orderBy, $vars, $lang->task->consumedAB);?></th>
<th class='c-hours'> <?php common::printOrderLink('left', $orderBy, $vars, $lang->task->leftAB);?></th>
<th class='c-date'> <?php common::printOrderLink('deadline', $orderBy, $vars, $lang->task->deadlineAB);?></th>
Expand Down Expand Up @@ -101,7 +101,7 @@

common::printIcon('task', 'recordEstimate', "taskID=$task->id", $task, 'list', 'time', '', 'iframe', true);
common::printIcon('task', 'edit', "taskID=$task->id", $task, 'list');
common::printIcon('task', 'batchCreate', "project=$task->project&storyID=$task->story&moduleID=$task->module&taskID=$task->id&ifame=0", $task, 'list', 'plus', '', '', '', '', $this->lang->task->children);
common::printIcon('task', 'batchCreate', "project=$task->project&storyID=$task->story&moduleID=$task->module&taskID=$task->id&ifame=0", $task, 'list', 'treemap-alt', '', '', '', '', $this->lang->task->children);
}
?>
</td>
Expand Down
11 changes: 10 additions & 1 deletion module/product/view/dynamic.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,16 @@
<?php else:?>
<?php $firstAction = '';?>
<?php foreach($dateGroups as $date => $actions):?>
<?php $isToday = date(DT_DATE4) == $date;?>
<?php
if($this->app->getClientLang() == 'en')
{
$isToday = date('M d') == $date;
}
else
{
$isToday = date(DT_DATE4) == $date;
}
?>
<div class="dynamic <?php if($isToday) echo 'active';?>">
<div class="dynamic-date">
<?php if($isToday):?>
Expand Down
2 changes: 1 addition & 1 deletion module/product/view/roadmap.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<?php $groupRoadmaps = zget($yearRoadmaps, $branchKey, array());?>
<div class="release-path">
<div class="release-head">
<div class="title text-primary"><?php echo $year . (is_numeric($year) ? $lang->year : '');?></div>
<div class="title text-primary"><?php echo $year . (is_numeric($year) ? ($this->app->getClientLang() == 'en' ? '' : $lang->year) : '');?></div>
<div class="subtitle"><?php echo sprintf($lang->product->iterationInfo, count($groupRoadmaps, 1) - count($groupRoadmaps));?></div>
</div>
<?php $i = 0;?>
Expand Down
11 changes: 10 additions & 1 deletion module/project/view/dynamic.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,16 @@
<div id="dynamics">
<?php $firstAction = '';?>
<?php foreach($dateGroups as $date => $actions):?>
<?php $isToday = date(DT_DATE4) == $date;?>
<?php
if($this->app->getClientLang() == 'en')
{
$isToday = date('M d') == $date;
}
else
{
$isToday = date(DT_DATE4) == $date;
}
?>
<div class="dynamic <?php if($isToday) echo 'active';?>">
<div class="dynamic-date">
<?php if($isToday):?>
Expand Down
2 changes: 1 addition & 1 deletion module/project/view/importtask.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<th class='w-user'><?php echo $lang->task->assignedTo;?></th>
<th class='w-hour'><?php echo $lang->task->leftAB;?></th>
<th class='w-date'><?php echo $lang->task->deadlineAB;?></th>
<th class='w-status'><?php echo $lang->statusAB;?></th>
<th class='w-70px'><?php echo $lang->statusAB;?></th>
<th><?php echo $lang->task->story;?></th>
</tr>
</thead>
Expand Down
4 changes: 2 additions & 2 deletions module/story/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@

$config->story->datatable->fieldList['openedBy']['title'] = 'openedByAB';
$config->story->datatable->fieldList['openedBy']['fixed'] = 'no';
$config->story->datatable->fieldList['openedBy']['width'] = '80';
$config->story->datatable->fieldList['openedBy']['width'] = '90';
$config->story->datatable->fieldList['openedBy']['required'] = 'no';

$config->story->datatable->fieldList['openedDate']['title'] = 'openedDate';
Expand All @@ -117,7 +117,7 @@

$config->story->datatable->fieldList['assignedTo']['title'] = 'assignedToAB';
$config->story->datatable->fieldList['assignedTo']['fixed'] = 'no';
$config->story->datatable->fieldList['assignedTo']['width'] = '80';
$config->story->datatable->fieldList['assignedTo']['width'] = '120';
$config->story->datatable->fieldList['assignedTo']['required'] = 'no';

$config->story->datatable->fieldList['assignedDate']['title'] = 'assignedDate';
Expand Down
20 changes: 10 additions & 10 deletions module/story/lang/zh-cn.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,16 +232,16 @@

$lang->story->report->charts['storysPerProduct'] = $lang->productCommon . '需求数量';
$lang->story->report->charts['storysPerModule'] = '模块需求数量';
$lang->story->report->charts['storysPerSource'] = '需求来源统计';
$lang->story->report->charts['storysPerPlan'] = '计划进行统计';
$lang->story->report->charts['storysPerStatus'] = '状态进行统计';
$lang->story->report->charts['storysPerStage'] = '所处阶段进行统计';
$lang->story->report->charts['storysPerPri'] = '优先级进行统计';
$lang->story->report->charts['storysPerEstimate'] = '预计工时进行统计';
$lang->story->report->charts['storysPerOpenedBy'] = '由谁创建来进行统计';
$lang->story->report->charts['storysPerAssignedTo'] = '当前指派来进行统计';
$lang->story->report->charts['storysPerClosedReason'] = '关闭原因来进行统计';
$lang->story->report->charts['storysPerChange'] = '变更次数来进行统计';
$lang->story->report->charts['storysPerSource'] = '按需求来源统计';
$lang->story->report->charts['storysPerPlan'] = '按计划进行统计';
$lang->story->report->charts['storysPerStatus'] = '按状态进行统计';
$lang->story->report->charts['storysPerStage'] = '按所处阶段进行统计';
$lang->story->report->charts['storysPerPri'] = '按优先级进行统计';
$lang->story->report->charts['storysPerEstimate'] = '按预计工时进行统计';
$lang->story->report->charts['storysPerOpenedBy'] = '按由谁创建来进行统计';
$lang->story->report->charts['storysPerAssignedTo'] = '按当前指派来进行统计';
$lang->story->report->charts['storysPerClosedReason'] = '按关闭原因来进行统计';
$lang->story->report->charts['storysPerChange'] = '按变更次数来进行统计';

$lang->story->report->options = new stdclass();
$lang->story->report->options->graph = new stdclass();
Expand Down
43 changes: 9 additions & 34 deletions module/task/control.php
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,6 @@ public function export($projectID, $orderBy, $type)
if($this->session->taskOnlyCondition)
{
$tasks = $this->dao->select('*')->from(TABLE_TASK)->alias('t1')->where($this->session->taskQueryCondition)
->andWhere('parent')->le(0)
->beginIF($this->post->exportType == 'selected')->andWhere('t1.id')->in($this->cookie->checkedItem)->fi()
->orderBy($sort)->fetchAll('id');

Expand Down Expand Up @@ -1332,38 +1331,19 @@ public function export($projectID, $orderBy, $type)
$relatedFiles = $this->dao->select('id, objectID, pathname, title')->from(TABLE_FILE)->where('objectType')->eq('task')->andWhere('objectID')->in(@array_keys($tasks))->andWhere('extra')->ne('editor')->fetchGroup('objectID');
$relatedModules = $this->loadModel('tree')->getTaskOptionMenu($projectID);

if(!$this->session->taskWithChildren and $tasks)
if($tasks)
{
$children = $this->dao->select('*')->from(TABLE_TASK)->where('deleted')->eq(0)
->andWhere('parent')->gt(0)
->andWhere('parent', true)->in(array_keys($tasks))
->beginIF($this->post->exportType == 'selected')->orWhere('id')->in($this->cookie->checkedItem)->fi()
->markRight(1)
->orderBy($sort)
->fetchGroup('parent', 'id');
if(!empty($children))
$children = array();
foreach($tasks as $task)
{
foreach($children as $parent => $childTasks)
if(!empty($task->parent) and isset($tasks[$task->parent]))
{
foreach($childTasks as $task)
{
/* Compute task progress. */
if($task->consumed == 0 and $task->left == 0)
{
$task->progress = 0;
}
elseif($task->consumed != 0 and $task->left == 0)
{
$task->progress = 100;
}
else
{
$task->progress = round($task->consumed / ($task->consumed + $task->left), 2) * 100;
}
$task->progress .= '%';
}
$children[$task->parent][$task->id] = $task;
unset($tasks[$task->id]);
}

}
if(!empty($children))
{
$position = 0;
foreach($tasks as $task)
{
Expand All @@ -1372,13 +1352,8 @@ public function export($projectID, $orderBy, $type)
{
array_splice($tasks, $position, 0, $children[$task->id]);
$position += count($children[$task->id]);
unset($children[$task->id]);
}
}
if($children)
{
foreach($children as $childTasks) $tasks += $childTasks;
}
}
}

Expand Down
26 changes: 13 additions & 13 deletions module/task/lang/zh-cn.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,19 +197,19 @@
$lang->task->report->create = '生成报表';
$lang->task->report->value = '任务数';

$lang->task->report->charts['tasksPerProject'] = $lang->projectCommon . '任务数统计';
$lang->task->report->charts['tasksPerModule'] = '模块任务数统计';
$lang->task->report->charts['tasksPerAssignedTo'] = '指派给统计';
$lang->task->report->charts['tasksPerType'] = '任务类型统计';
$lang->task->report->charts['tasksPerPri'] = '优先级统计';
$lang->task->report->charts['tasksPerStatus'] = '任务状态统计';
$lang->task->report->charts['tasksPerDeadline'] = '截止日期统计';
$lang->task->report->charts['tasksPerEstimate'] = '预计时间统计';
$lang->task->report->charts['tasksPerLeft'] = '剩余时间统计';
$lang->task->report->charts['tasksPerConsumed'] = '消耗时间统计';
$lang->task->report->charts['tasksPerFinishedBy'] = '由谁完成统计';
$lang->task->report->charts['tasksPerClosedReason'] = '关闭原因统计';
$lang->task->report->charts['finishedTasksPerDay'] = '每天完成统计';
$lang->task->report->charts['tasksPerProject'] = '' . $lang->projectCommon . '任务数统计';
$lang->task->report->charts['tasksPerModule'] = '按模块任务数统计';
$lang->task->report->charts['tasksPerAssignedTo'] = '按指派给统计';
$lang->task->report->charts['tasksPerType'] = '按任务类型统计';
$lang->task->report->charts['tasksPerPri'] = '按优先级统计';
$lang->task->report->charts['tasksPerStatus'] = '按任务状态统计';
$lang->task->report->charts['tasksPerDeadline'] = '按截止日期统计';
$lang->task->report->charts['tasksPerEstimate'] = '按预计时间统计';
$lang->task->report->charts['tasksPerLeft'] = '按剩余时间统计';
$lang->task->report->charts['tasksPerConsumed'] = '按消耗时间统计';
$lang->task->report->charts['tasksPerFinishedBy'] = '按由谁完成统计';
$lang->task->report->charts['tasksPerClosedReason'] = '按关闭原因统计';
$lang->task->report->charts['finishedTasksPerDay'] = '按每天完成统计';

$lang->task->report->options = new stdclass();
$lang->task->report->options->graph = new stdclass();
Expand Down
8 changes: 4 additions & 4 deletions module/testtask/lang/zh-cn.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@
$lang->testtask->report->select = '请选择报表类型';
$lang->testtask->report->create = '生成报表';

$lang->testtask->report->charts['testTaskPerRunResult'] = '用例结果统计';
$lang->testtask->report->charts['testTaskPerType'] = '用例类型统计';
$lang->testtask->report->charts['testTaskPerModule'] = '用例模块统计';
$lang->testtask->report->charts['testTaskPerRunner'] = '用例执行人统计';
$lang->testtask->report->charts['testTaskPerRunResult'] = '按用例结果统计';
$lang->testtask->report->charts['testTaskPerType'] = '按用例类型统计';
$lang->testtask->report->charts['testTaskPerModule'] = '按用例模块统计';
$lang->testtask->report->charts['testTaskPerRunner'] = '按用例执行人统计';
$lang->testtask->report->charts['bugSeverityGroups'] = 'Bug严重级别分布';
$lang->testtask->report->charts['bugStatusGroups'] = 'Bug状态分布';
$lang->testtask->report->charts['bugOpenedByGroups'] = 'Bug创建者分布';
Expand Down
8 changes: 8 additions & 0 deletions module/tree/control.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,14 @@ public function browse($rootID, $viewType, $currentModuleID = 0, $branch = 0)
$title = $this->lang->tree->manageTrainskill;
$position[] = $this->lang->tree->manageTrainskill;
}
elseif($viewType == 'trainpost')
{
$this->lang->set('menugroup.tree', 'train');
$this->lang->tree->menu = $this->lang->train->menu;

$title = $this->lang->tree->manageTrainpost;
$position[] = $this->lang->tree->manageTrainpost;
}

$parentModules = $this->tree->getParents($currentModuleID);
$this->view->title = $title;
Expand Down
Loading

0 comments on commit 95222fa

Please sign in to comment.