From 32c9effd8a8754aa75d86971dcae882ae28cbfb6 Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Wed, 14 Apr 2010 02:19:52 +0000 Subject: [PATCH] * adjust the UI. * fix some errors. --- trunk/module/project/control.php | 6 +- trunk/module/project/lang/zh-cn.php | 33 +++++---- trunk/module/project/model.php | 5 +- trunk/module/project/view/bug.html.php | 46 +++++++----- trunk/module/project/view/build.html.php | 19 +++-- trunk/module/project/view/grouptask.html.php | 26 +++---- trunk/module/project/view/importtask.html.php | 22 +++--- trunk/module/project/view/linkstory.html.php | 19 ++--- trunk/module/project/view/story.html.php | 73 +++++++++---------- trunk/module/project/view/task.html.php | 26 +++---- trunk/module/project/view/taskheader.html.php | 5 +- 11 files changed, 142 insertions(+), 138 deletions(-) diff --git a/trunk/module/project/control.php b/trunk/module/project/control.php index 69c95441cd..69a7b79e64 100644 --- a/trunk/module/project/control.php +++ b/trunk/module/project/control.php @@ -179,6 +179,10 @@ class project extends control $project = $this->commonAction($projectID); + /* 登记session。*/ + $this->app->session->set('taskList', $this->app->getURI(true)); + $this->app->session->set('storyList', $this->app->getURI(true)); + $this->view->header->title = $project->name . $this->lang->colon . $this->lang->project->importTask; $this->view->position[] = html::a(inlink('browse', "projectID=$projectID"), $project->name); $this->view->position[] = $this->lang->project->importTask; @@ -250,7 +254,7 @@ class project extends control $this->assign('position', $position); $this->assign('bugs', $bugs); $this->assign('tabID', 'bug'); - $this->assign('pager', $pager->get()); + $this->assign('pager', $pager); $this->assign('orderBy', $orderBy); $this->assign('users', $users); diff --git a/trunk/module/project/lang/zh-cn.php b/trunk/module/project/lang/zh-cn.php index d5d44ecee6..f3196ba8ce 100644 --- a/trunk/module/project/lang/zh-cn.php +++ b/trunk/module/project/lang/zh-cn.php @@ -85,30 +85,31 @@ $lang->project->delete = "删除项目"; $lang->project->browse = "浏览项目"; $lang->project->edit = "编辑项目"; $lang->project->manageMembers = '团队管理'; -$lang->project->unlinkMember = '移除'; +$lang->project->unlinkMember = '移除成员'; $lang->project->unlinkStory = '移除需求'; $lang->project->importTask = '导入任务'; /* 分组浏览。*/ $lang->project->listTask = '列表方式'; -$lang->project->groupTaskByStory = '按需求分组'; -$lang->project->groupTaskByStatus = '按状态分组'; -$lang->project->groupTaskByPri = '按优先级分组'; -$lang->project->groupTaskByOwner = '按指派给分组'; -$lang->project->groupTaskByEstimate = '按预计工时分组'; -$lang->project->groupTaskByConsumed = '按已消耗分组'; -$lang->project->groupTaskByLeft = '按剩余工时分组'; -$lang->project->groupTaskByType = '按任务类型分组'; -$lang->project->groupTaskByDeadline = '按截止日期分组'; -$lang->project->listTaskNeedConfrim = '需求有变动的任务'; +$lang->project->groupTaskByStory = '需求分组'; +$lang->project->groupTaskByStatus = '状态分组'; +$lang->project->groupTaskByPri = '优先级分组'; +$lang->project->groupTaskByOwner = '指派给分组'; +$lang->project->groupTaskByEstimate = '预计工时分组'; +$lang->project->groupTaskByConsumed = '已消耗分组'; +$lang->project->groupTaskByLeft = '剩余工时分组'; +$lang->project->groupTaskByType = '任务类型分组'; +$lang->project->groupTaskByDeadline = '截止日期分组'; +$lang->project->listTaskNeedConfrim = '需求变动'; /* 页面提示。*/ $lang->project->selectProject = "请选择项目"; -$lang->project->beginAndEnd = '起止时间'; -$lang->project->lblStats = '工时统计'; -$lang->project->stats = '总共预计『%s』工时
已经消耗『%s』工时
预计剩余『%s』工时'; -$lang->project->oneLineStats = "项目『%s』, 代号为『%s』, 相关产品为『%s』,『%s』开始,『%s』结束,总预计『%s』工时,已消耗『%s』工时,预计剩余『%s』工时。"; -$lang->project->storySummary = "共『%s』个需求,预计『%s』个工时。"; +$lang->project->beginAndEnd = '起止时间'; +$lang->project->lblStats = '工时统计'; +$lang->project->stats = '总共预计『%s』工时
已经消耗『%s』工时
预计剩余『%s』工时'; +$lang->project->oneLineStats = "项目『%s』, 代号为『%s』, 相关产品为『%s』,『%s』开始,『%s』结束,总预计『%s』工时,已消耗『%s』工时,预计剩余『%s』工时。"; +$lang->project->storySummary = "共『%s』个需求,预计『%s』个工时。"; +$lang->project->wbs = "分解任务"; /* 交互提示。*/ $lang->project->confirmDelete = '您确定删除项目[%s]吗?'; diff --git a/trunk/module/project/model.php b/trunk/module/project/model.php index a1e735059f..eae991b4ac 100644 --- a/trunk/module/project/model.php +++ b/trunk/module/project/model.php @@ -236,7 +236,7 @@ class projectModel extends model /* 导入任务。*/ public function importTask($projectID) { - $tasks = $this->dao->select('id, project, owner, story')->from(TABLE_TASK)->where('id')->in($this->post->tasks)->fetchAll('id'); + $tasks = $this->dao->select('id, project, owner, story, consumed')->from(TABLE_TASK)->where('id')->in($this->post->tasks)->fetchAll('id'); /* 更新task表。*/ foreach($tasks as $task) @@ -250,6 +250,9 @@ class projectModel extends model $this->loadModel('action')->create('task', $task->id, 'moved', '', $task->project); } + /* 去掉story=0的记录。*/ + unset($stories[0]); + /* 将没有关联进来的用户加入到团队中。*/ $teamMembers = $this->getTeamMemberPairs($projectID); foreach($owners as $account => $preProjectID) diff --git a/trunk/module/project/view/bug.html.php b/trunk/module/project/view/bug.html.php index b6cbea850f..bc1f9f2462 100644 --- a/trunk/module/project/view/bug.html.php +++ b/trunk/module/project/view/bug.html.php @@ -24,39 +24,49 @@ ?> - -
-
-
id", $lang->bug->create);?>
-
-
+ - - - - - - - + id}&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?> + + + + + + + + + - - - + + + + - + +
+
project->bug;?>
+
id", $lang->bug->create);?>
+
bug->id;?>bug->severity;?>bug->title;?>bug->openedBy;?>bug->assignedTo;?>bug->resolvedBy;?>bug->resolution;?> idAB);?>bug->severityAB);?> priAB);?>bug->title);?>openedByAB);?>assignedToAB);?>bug->resolvedBy);?>bug->resolutionAB);?>actions;?>
createLink('bug', 'view', "bugID=$bug->id"), sprintf('%03d', $bug->id));?>severity?>title;?>createLink('bug', 'view', "bugID=$bug->id"), $bug->id, '_blank');?>bug->severityList[$bug->severity]?>bug->priList[$bug->pri]?>createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?> openedBy];?> assignedTo];?> resolvedBy];?>resolution;?>bug->resolutionList[$bug->resolution];?> + id"; + if(!($bug->status == 'active' and common::printLink('bug', 'resolve', $params, $lang->bug->buttonResolve))) echo $lang->bug->buttonResolve . ' '; + if(!($bug->status == 'resolved' and common::printLink('bug', 'close', $params, $lang->bug->buttonClose))) echo $lang->bug->buttonClose . ' '; + common::printLink('bug', 'edit', $params, $lang->bug->buttonEdit); + ?> +
-
+
show();?>
diff --git a/trunk/module/project/view/build.html.php b/trunk/module/project/view/build.html.php index 83da3a923e..5e0508b1ae 100644 --- a/trunk/module/project/view/build.html.php +++ b/trunk/module/project/view/build.html.php @@ -25,21 +25,20 @@
-
-
id", $lang->build->create);?>
-
-
-
- +
+ - + - - - + + + diff --git a/trunk/module/project/view/grouptask.html.php b/trunk/module/project/view/grouptask.html.php index 76890604f8..f598b9a3d5 100644 --- a/trunk/module/project/view/grouptask.html.php +++ b/trunk/module/project/view/grouptask.html.php @@ -27,24 +27,24 @@
+
project->build;?>
+
id", $lang->build->create);?>
+
build->product;?>build->product;?> build->name;?> build->scmPath;?> build->filePath;?>build->date;?>build->builder;?>actions;?>build->date;?>build->builder;?>actions;?>
- - - - - - - - - - - + + + + + + + + + + + $groupTasks):?> - + - + owner == $app->user->account ? 'style=color:red' : '';?> diff --git a/trunk/module/project/view/importtask.html.php b/trunk/module/project/view/importtask.html.php index 8a6cb27280..fe3cbcb61a 100644 --- a/trunk/module/project/view/importtask.html.php +++ b/trunk/module/project/view/importtask.html.php @@ -29,17 +29,16 @@
task->name;?>task->pri;?>task->owner;?>task->estimate;?>task->consumed;?>task->left;?>task->type;?>task->deadline;?>task->status;?>
task->name;?>priAB;?>task->owner;?>task->estimateAB;?>task->consumedAB;?>task->leftAB;?>typeAB;?>task->deadlineAB;?>task->status;?>
- - - - - - - - - - - + + + + + + + + + + @@ -52,7 +51,6 @@ - - - - - - - - - - - - - + + + + + + + + + + + @@ -49,13 +48,12 @@ owner == $app->user->account ? 'style=color:red' : '';?> - + -
task->project;?>task->id;?>task->pri;?>task->name;?>task->owner;?>task->left;?>task->type;?>task->deadline;?>task->status;?>task->story;?>project->import;?>task->project;?>idAB;?>priAB;?>task->name;?>task->owner;?>task->leftAB;?>task->deadlineAB;?>statusAB;?>task->story;?>import;?>
id", $task->name)) echo $task->name;?> >ownerRealName;?> left;?>task->typeList[$task->type];?> delay)) echo 'delayed';?>>deadline, 0, 4) > 0) echo $task->deadline;?> status;?> >task->statusList[$task->status];?> diff --git a/trunk/module/project/view/linkstory.html.php b/trunk/module/project/view/linkstory.html.php index 7cabaa56b4..c9409b468e 100644 --- a/trunk/module/project/view/linkstory.html.php +++ b/trunk/module/project/view/linkstory.html.php @@ -29,24 +29,25 @@ - - - + + + - - - + + + id])) continue;?> + createLink('story', 'view', "storyID=$story->id");?> - - + + - + diff --git a/trunk/module/project/view/story.html.php b/trunk/module/project/view/story.html.php index c1953f09e4..9218177b35 100644 --- a/trunk/module/project/view/story.html.php +++ b/trunk/module/project/view/story.html.php @@ -31,69 +31,62 @@ $(document).ready(function() $("a.iframe").colorbox({width:640, height:480, iframe:true, transition:'none'}); }); -
-
-
-
-
- createLink('project', 'linkstory', "project=$project->id"), $lang->project->linkStory);?> -
-
-
-
story->id;?>story->pri;?>story->product;?>idAB;?>priAB;?>story->product;?> story->title;?> story->plan;?>story->openedBy;?>story->estimate;?>story->linkStory;?>openedByAB;?>story->estimateAB;?>link;?>
id;?>pri;?>id);?>story->priList[$story->pri];?> createLink('product', 'browse', "productID=$story->product"), $products[$story->product], '_blank');?>createLink('story', 'view', "story=$story->id"), $story->title);?>title);?> planTitle;?> openedBy];?> estimate;?>
+ - - - - - - - - - + + + + + + + + + + $story):?> createLink('story', 'view', "storyID=$story->id"); - $canView = common::hasPriv('story', 'view'); + $storyLink = $this->createLink('story', 'view', "storyID=$story->id"); $totalEstimate += $story->estimate; ?> - - - - + + + + + - +
+
project->story;?>
+
+ createLink('project', 'linkstory', "project=$project->id"), $lang->project->linkStory);?> +
+
story->id;?>story->pri;?>story->title;?>story->assignedTo;?>story->openedBy;?>story->estimate;?>story->status;?>story->stage;?>actions;?>idAB;?>priAB;?>story->title;?>openedByAB;?>assignedToAB;?>story->estimateAB;?>statusAB;?>story->stageAB;?>story->taskCount;?>actions;?>
id)); else printf('%03d', $story->id);?>pri;?> - title; - if($storyTasks[$story->id] > 0) - { - echo ' ' . html::a($this->createLink('story', 'tasks', "storyID=$story->id&projectID=$project->id"), '('. $storyTasks[$story->id] . ')', '', 'class=iframe'); - } - else - { - echo ' (0)'; - } - ?> - assignedTo];?>id));?>story->priList[$story->pri];?>title);?> openedBy];?>assignedTo];?> estimate;?> story->statusList[$story->status];?> story->stageList[$story->stage];?> - createLink('task', 'create', "projectID={$project->id}&story={$story->id}"), $lang->task->create);?> - createLink('project', 'unlinkStory', "projectID={$project->id}&story={$story->id}&confirm=no"), $lang->project->unlinkStory, 'hiddenwin');?> + id}&story={$story->id}"; + common::printLink('task', 'create', $param, $lang->project->wbs); + common::printLink('project', 'unlinkStory', $param, $lang->unlink, 'hiddenwin'); + ?>
project->storySummary, count($stories), $totalEstimate);?>
project->storySummary, count($stories), $totalEstimate);?>
diff --git a/trunk/module/project/view/task.html.php b/trunk/module/project/view/task.html.php index 6617e465dc..66d82d9b73 100644 --- a/trunk/module/project/view/task.html.php +++ b/trunk/module/project/view/task.html.php @@ -30,18 +30,17 @@ id&status=all&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage"; ?>
task->id);?>task->pri);?>task->name);?>task->owner);?>task->estimate);?>task->consumed);?>task->left);?>task->type);?>task->deadline);?>task->status);?>task->story);?>actions;?> idAB);?> priAB);?> task->name);?> task->owner);?> task->estimateAB);?> task->consumedAB);?> task->leftAB);?> task->deadlineAB);?>statusAB);?>task->story);?>actions;?>
id", sprintf('%03d', $task->id))) printf('%03d', $task->id);?>pri;?>task->priList[$task->pri];?> id", $task->name)) echo $task->name;?> >ownerRealName;?> estimate;?> consumed;?> left;?>task->typeList[$task->type];?> delay)) echo 'delayed';?>>deadline, 0, 4) > 0) echo $task->deadline;?> status;?> > -
- -
id", $lang->task->create); common::printLink('project', 'importTask', "project=$project->id", $lang->project->importTask); + common::printLink('task', 'create', "project=$project->id", $lang->task->create); ?>