diff --git a/module/common/lang/en.php b/module/common/lang/en.php index 04ad7ed9f5..030786e20c 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -151,6 +151,7 @@ $lang->project->menu->story = array('link' => 'Story|project|story|projectID $lang->project->menu->bug = 'Bug|project|bug|projectID=%s'; $lang->project->menu->dynamic = 'Dynamic|project|dynamic|projectID=%s'; $lang->project->menu->build = array('link' => 'Build|project|build|projectID=%s', 'subModule' => 'build'); +$lang->project->menu->testtask = 'Testtask|project|testtask|projectID=%s'; $lang->project->menu->burn = 'Burn|project|burn|projectID=%s'; $lang->project->menu->team = array('link' => 'Team|project|team|projectID=%s', 'alias' => 'managemembers'); $lang->project->menu->doc = array('link' => 'Doc|project|doc|porjectID=%s', 'subModule' => 'doc'); diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index e34c876f15..74a19ae8ec 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -151,6 +151,7 @@ $lang->project->menu->story = array('link' => '需求|project|story|projectI $lang->project->menu->bug = 'Bug|project|bug|projectID=%s'; $lang->project->menu->dynamic = '动态|project|dynamic|projectID=%s'; $lang->project->menu->build = array('link' => 'Build|project|build|projectID=%s', 'subModule' => 'build'); +$lang->project->menu->testtask = '测试任务|project|testtask|projectID=%s'; $lang->project->menu->burn = '燃尽图|project|burn|projectID=%s'; $lang->project->menu->team = array('link' => '团队|project|team|projectID=%s', 'alias' => 'managemembers'); $lang->project->menu->doc = array('link' => '文档|project|doc|porjectID=%s', 'subModule' => 'doc'); diff --git a/module/project/control.php b/module/project/control.php index 29c5395346..54fe93f370 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -613,6 +613,42 @@ class project extends control $this->display(); } + /** + * Browse test tasks of project. + * + * @param int $projectID + * @param string $orderBy + * @param int $recTotal + * @param int $recPerPage + * @param int $pageID + * @access public + * @return void + */ + public function testtask($projectID = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) + { + $this->loadModel('testtask'); + /* Save session. */ + $this->session->set('testtaskList', $this->app->getURI(true)); + + $project = $this->commonAction($projectID); + + /* Load pager. */ + $this->app->loadClass('pager', $static = true); + $pager = pager::init($recTotal, $recPerPage, $pageID); + + $this->view->header->title = $this->projects[$projectID] . $this->lang->colon . $this->lang->testtask->common; + $this->view->position[] = html::a($this->createLink('project', 'testtask', "projectID=$projectID"), $this->projects[$projectID]); + $this->view->position[] = $this->lang->testtask->common; + $this->view->projectID = $projectID; + $this->view->projectName = $this->projects[$projectID]; + $this->view->pager = $pager; + $this->view->orderBy = $orderBy; + $this->view->tasks = $this->testtask->getProjectTasks($projectID); + $this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter'); + + $this->display(); + } + /** * Browse burndown chart of a project. * diff --git a/module/project/view/testtask.html.php b/module/project/view/testtask.html.php new file mode 100644 index 0000000000..f66872187e --- /dev/null +++ b/module/project/view/testtask.html.php @@ -0,0 +1,54 @@ + + * @package testtask + * @version $Id: browse.html.php 1914 2011-06-24 10:11:25Z yidong@cnezsoft.com $ + * @link http://www.zentao.net + */ +?> + + +
| idAB;?> | +testtask->name;?> | +testtask->build;?> | +testtask->owner;?> | +testtask->begin;?> | +testtask->end;?> | +statusAB;?> | +actions;?> | +
|---|---|---|---|---|---|---|---|
| id"), sprintf('%03d', $task->id));?> | +id"), $task->name);?> | +build == 'trunk' ? print('Trunk') : print(html::a($this->createLink('build', 'view', "buildID=$task->build"), $task->buildName));?> | +owner];?> | +begin?> | +end?> | +testtask->statusList[$task->status];?> | ++ id", $lang->testtask->cases); + common::printLink('testtask', 'linkcase', "taskID=$task->id", $lang->testtask->linkCaseAB); + common::printLink('testtask', 'edit', "taskID=$task->id", $lang->edit); + common::printLink('testtask', 'delete', "taskID=$task->id", $lang->delete, 'hiddenwin'); + ?> + | +