From 84f1aaa36ef5ff7c51967b806e43f1cba320d99c Mon Sep 17 00:00:00 2001 From: "chencongzhi520@gmail.com" Date: Mon, 9 Jul 2012 01:35:36 +0000 Subject: [PATCH] * Add module field of task-edit and task-view page. --- module/task/control.php | 16 +++++++++------- module/task/view/create.html.php | 2 +- module/task/view/edit.html.php | 4 ++++ module/task/view/view.html.php | 12 ++++++++++++ 4 files changed, 26 insertions(+), 8 deletions(-) diff --git a/module/task/control.php b/module/task/control.php index 396f878da5..0fe10c509b 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -211,6 +211,7 @@ class task extends control $this->view->position[] = $this->lang->task->edit; $this->view->stories = $this->story->getProjectStoryPairs($this->view->project->id); $this->view->members = $this->loadModel('user')->appendDeleted($this->view->members, $this->view->task->assignedTo); + $this->view->modules = $this->tree->getOptionMenu($this->view->task->project, $viewType = 'task'); $this->display(); } @@ -350,13 +351,14 @@ class task extends control $position[] = html::a($this->createLink('project', 'browse', "projectID=$task->project"), $project->name); $position[] = $task->name; - $this->view->header = $header; - $this->view->position = $position; - $this->view->project = $project; - $this->view->task = $task; - $this->view->actions = $this->loadModel('action')->getList('task', $taskID); - $this->view->users = $this->loadModel('user')->getPairs('noletter'); - $this->view->preAndNext = $this->loadModel('common')->getPreAndNextObject('task', $taskID); + $this->view->header = $header; + $this->view->position = $position; + $this->view->project = $project; + $this->view->task = $task; + $this->view->actions = $this->loadModel('action')->getList('task', $taskID); + $this->view->users = $this->loadModel('user')->getPairs('noletter'); + $this->view->preAndNext = $this->loadModel('common')->getPreAndNextObject('task', $taskID); + $this->view->modulePath = $this->tree->getParents($task->module); $this->display(); } diff --git a/module/task/view/create.html.php b/module/task/view/create.html.php index 080f9d2e92..52973f37f3 100644 --- a/module/task/view/create.html.php +++ b/module/task/view/create.html.php @@ -40,7 +40,7 @@ $(function() task->module;?> - + task->assignedTo;?> diff --git a/module/task/view/edit.html.php b/module/task/view/edit.html.php index ce077a9f9a..fdbe8370e3 100644 --- a/module/task/view/edit.html.php +++ b/module/task/view/edit.html.php @@ -53,6 +53,10 @@ task->project;?> name;?> + + task->module;?> + module, 'class="select-1"');?> + task->story;?> story, 'class=select-1');?> diff --git a/module/task/view/view.html.php b/module/task/view/view.html.php index a2b57089c3..c8f0062685 100644 --- a/module/task/view/view.html.php +++ b/module/task/view/view.html.php @@ -78,6 +78,18 @@ task->project;?> project", $project->name)) echo $project->name;?> + + task->module;?> + + $module) + { + if(!common::printLink('project', 'task', "projectID=$task->project&browseType=byModule¶m=$module->id", $module->name)) echo $module->name; + if(isset($modulePath[$key + 1])) echo $lang->arrow; + } + ?> + + task->story;?>