diff --git a/module/project/control.php b/module/project/control.php index 0e41730571..3e93fd746c 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1589,7 +1589,7 @@ class project extends control $currentMembers = $this->project->getTeamMembers($projectID); $members2Import = $this->project->getMembers2Import($team2Import, array_keys($currentMembers)); $teams2Import = $this->project->getTeams2Import($this->app->user->account, $projectID); - $teams2Import = array($this->lang->project->copyTeam) + $teams2Import; + $teams2Import = array('' => '') + $teams2Import; /* Set menu. */ $this->project->setMenu($this->projects, $project->id); diff --git a/module/project/css/managemembers.css b/module/project/css/managemembers.css index 5b7d30125c..e759220590 100644 --- a/module/project/css/managemembers.css +++ b/module/project/css/managemembers.css @@ -19,6 +19,7 @@ #titlebar > .heading {float: left; padding-right: 10px!important} #titlebar > .heading > .icon {display: inline;} #deptSelector {float: left; min-width: 220px; position: relative; top: -7px} +#copyTeam {float: left; min-width: 220px; position: relative; top: -7px; padding-left:5px} .outer .main .table tr > td:first-child {padding-left: 10px;} .outer .main .table tr > td:last-child {padding-right: 10px;} diff --git a/module/project/js/managemembers.js b/module/project/js/managemembers.js index b92b2e2144..7dcb723071 100644 --- a/module/project/js/managemembers.js +++ b/module/project/js/managemembers.js @@ -1,15 +1,3 @@ -/** - * Import a team. - * - * @access public - * @return void - */ -function importTeam(val) -{ - if(val == undefined) val = $('#teams2Import').val(); - location.href = createLink('project', 'manageMembers', 'project=' + projectID + '&teamImport=' + val); -} - /** * Set role when select an account. * @@ -25,12 +13,6 @@ function setRole(account, roleID) roleOBJ.val(role) // set the role. } -$(function() -{ - $('#itBtn').click(function(){$('#importTeamModal').modal('show')}); - $('#importTeams a').click(function(){importTeam($(this).data('id')); $('#importTeamModal').modal('hide')}); -}); - function addItem() { var item = $('#addItem').html().replace(/%i%/g, i); @@ -52,3 +34,10 @@ function setDeptUsers(obj) link = createLink('project', 'manageMembers', 'projectID=' + projectID + '&team2Import=' + team2Import + '&dept=' + dept);//Create manageMembers link. location.href=link; } + +function choseTeam2Copy(obj) +{ + team = $(obj).val(); + link = createLink('project', 'manageMembers', 'projectID=' + projectID + '&team2Import=' + team); + location.href=link; +} diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php index 4ddf359018..3971e75082 100644 --- a/module/project/lang/zh-cn.php +++ b/module/project/lang/zh-cn.php @@ -181,12 +181,12 @@ $lang->project->batchWBS = "批量分解"; $lang->project->howToUpdateBurn = "帮助"; $lang->project->whyNoStories = "看起来没有需求可以关联。请检查下{$lang->projectCommon}关联的{$lang->productCommon}中有没有需求,而且要确保它们已经审核通过。"; $lang->project->doneProjects = '已结束'; -$lang->project->selectDept = '请选择部门'; +$lang->project->selectDept = '选择一个部门的成员'; $lang->project->copyTeam = '复制团队'; $lang->project->copyFromTeam = "复制自{$lang->projectCommon}团队: %s"; $lang->project->noMatched = "找不到包含'%s'的$lang->projectCommon"; $lang->project->copyTitle = "请选择一个{$lang->projectCommon}来复制"; -$lang->project->copyTeamTitle = "请选择一个{$lang->projectCommon}团队来复制"; +$lang->project->copyTeamTitle = "选择一个{$lang->projectCommon}团队来复制"; $lang->project->copyNoProject = "没有可用的{$lang->projectCommon}来复制"; $lang->project->copyFromProject = "复制自{$lang->projectCommon} %s"; $lang->project->cancelCopy = '取消复制'; diff --git a/module/project/view/managemembers.html.php b/module/project/view/managemembers.html.php index 7771b74e00..f625d89098 100644 --- a/module/project/view/managemembers.html.php +++ b/module/project/view/managemembers.html.php @@ -20,9 +20,9 @@
project->selectDept}'");?>
-
- -
+ +
project->copyTeamTitle}'");?>
+
@@ -128,34 +128,4 @@
- diff --git a/module/story/control.php b/module/story/control.php index dbf385b629..777ba9a0ce 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -914,7 +914,8 @@ class story extends control public function tasks($storyID, $projectID = 0) { $this->loadModel('task'); - $this->view->tasks = $this->task->getStoryTaskPairs($storyID, $projectID); + $this->view->tasks = $this->task->getStoryTasks($storyID, $projectID); + $this->view->users = $this->user->getPairs('noletter'); $this->display(); } diff --git a/module/story/view/tasks.html.php b/module/story/view/tasks.html.php index 7eadf3a81b..d87760acc4 100644 --- a/module/story/view/tasks.html.php +++ b/module/story/view/tasks.html.php @@ -1,11 +1,38 @@ - - - "; - } - ?> -
story->tasks;?>
$task
+
+
+ icons['report']);?> + story->tasks;?> +
+
+
+ + + + + + + + + + + + + + + $task):?> + + + + + + + + + + + +
task->name;?> priAB;?>statusAB;?> task->assignedToAB;?> task->estimate;?> task->consumed;?> task->left;?>
name;?>task->priList, $task->pri, $task->pri)?>'>task->priList, $task->pri, $task->pri);?>task->statusList[$task->status];?>assignedTo, $task->assignedTo);?>estimate;?>consumed;?>left;?>
+ +
diff --git a/module/task/model.php b/module/task/model.php index 9145483aaf..4b130c9eba 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -977,14 +977,14 @@ class taskModel extends model * @access public * @return array */ - public function getStoryTaskPairs($storyID, $projectID = 0) + public function getStoryTasks($storyID, $projectID = 0) { - return $this->dao->select('id, name') + return $this->dao->select('id, name, assignedTo, status, estimate, consumed, `left`') ->from(TABLE_TASK) ->where('story')->eq((int)$storyID) ->andWhere('deleted')->eq(0) ->beginIF($projectID)->andWhere('project')->eq($projectID)->fi() - ->fetchPairs(); + ->fetchAll('id'); } /**