diff --git a/module/project/control.php b/module/project/control.php index ba0eb10a0e..7c43b7bb10 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -2312,6 +2312,23 @@ class project extends control public function treeProduct($productID) { + $this->loadModel('product'); + $product = $this->product->getStatByID($productID); + $product->desc = $this->loadModel('file')->setImgSize($product->desc); + + $actions = $this->dao->select('*')->from(TABLE_ACTION)->where('product')->like("%,$productID,%")->orderBy('date_desc')->limit(6)->fetchAll(); + if($actions) $this->loadModel('action')->transformActions($actions); + + $releases = $this->dao->select('*')->from(TABLE_RELEASE)->where('deleted')->eq(0)->andWhere('product')->eq($productID)->orderBy('date')->fetchAll(); + + $this->view->product = $product; + $this->view->actions = $this->loadModel('action')->getList('product', $productID); + $this->view->users = $this->loadModel('user')->getPairs('noletter'); + $this->view->groups = $this->loadModel('group')->getPairs(); + $this->view->lines = array('') + $this->loadModel('tree')->getLinePairs(); + $this->view->branches = $this->loadModel('branch')->getPairs($productID); + $this->view->actions = $actions; + $this->view->releases = $releases; $this->display(); } @@ -2347,6 +2364,38 @@ class project extends control public function treeTask($taskID) { + $this->loadModel('task'); + $task = $this->task->getById($taskID, true); + if($task->fromBug != 0) + { + $bug = $this->loadModel('bug')->getById($task->fromBug); + $task->bugSteps = ''; + if($bug) + { + $task->bugSteps = $this->loadModel('file')->setImgSize($bug->steps); + foreach($bug->files as $file) $task->files[] = $file; + } + $this->view->fromBug = $bug; + } + else + { + $story = $this->loadModel('story')->getById($task->story); + $task->storySpec = empty($story) ? '' : $this->loadModel('file')->setImgSize($story->spec); + $task->storyVerify = empty($story) ? '' : $this->loadModel('file')->setImgSize($story->verify); + $task->storyFiles = $this->loadModel('file')->getByObject('story', $task->story); + } + + if($task->team) $this->lang->task->assign = $this->lang->task->transfer; + + /* Update action. */ + if($task->assignedTo == $this->app->user->account) $this->loadModel('action')->read('task', $taskID); + + $project = $this->project->getById($task->project); + + $this->view->task = $task; + $this->view->project = $project; + $this->view->actions = $this->loadModel('action')->getList('task', $taskID); + $this->view->users = $this->loadModel('user')->getPairs('noletter'); $this->display(); } } diff --git a/module/project/view/treetask.html.php b/module/project/view/treetask.html.php index 0527e9efd3..96e243f89f 100644 --- a/module/project/view/treetask.html.php +++ b/module/project/view/treetask.html.php @@ -1,124 +1,82 @@
建议教程中的所有表单,不要做表单验证,方便用户快速完成教程,了解各功能入口。现在教程中的‘提Bug’, 在未输入必填项时,无相关提示,会令访客疑惑)
-
+ desc) ? $task->desc : "建议教程中的所有表单,不要做表单验证,方便用户快速完成教程,了解各功能入口。现在教程中的‘提Bug’, 在未输入必填项时,无相关提示,会令访客疑惑)
+ bugSteps) ? $task->bugSteps : "001--Bug列表进入 bug详情页页面布局。
- 001+ <p>Bug列表进入 bug详情页页面布局。</p>
- 002+ <p><br /></p>
- 003+ <p><img src="{1603.jpg}" alt="" /></p>
001--Bug列表进入 bug详情页页面布局。
- 001+ Bug列表进入 bug详情页页面布局。
- 002+
- 003+