* when create bug, pass the product param.

This commit is contained in:
wangchunsheng
2010-04-24 15:12:29 +00:00
parent 3188bc514a
commit 176b8a57ef
2 changed files with 5 additions and 2 deletions

View File

@@ -236,7 +236,9 @@ class project extends control
$this->session->set('bugList', $this->app->getURI(true));
/* 公共的操作。*/
$project = $this->commonAction($projectID);
$project = $this->commonAction($projectID);
$products = $this->project->getProducts($project->id);
$productID = key($products); // 取第一个产品用来提交Bug。
/* 设定header和position信息。*/
$header['title'] = $project->name . $this->lang->colon . $this->lang->project->bug;
@@ -257,6 +259,7 @@ class project extends control
$this->assign('pager', $pager);
$this->assign('orderBy', $orderBy);
$this->assign('users', $users);
$this->assign('productID',$productID);
$this->display();
}

View File

@@ -28,7 +28,7 @@
<table class='table-1 fixed colored tablesorter'>
<caption class='caption-tl'>
<div class='f-left'><?php echo $lang->project->bug;?></div>
<div class='f-right'><?php common::printLink('bug', 'create', "productID=0&extra=projectID=$project->id", $lang->bug->create);?></div>
<div class='f-right'><?php common::printLink('bug', 'create', "productID=$productID&extra=projectID=$project->id", $lang->bug->create);?></div>
</caption>
<thead>
<tr class='colhead'>