diff --git a/module/release/control.php b/module/release/control.php index 9fe14f25c9..6a09d62869 100644 --- a/module/release/control.php +++ b/module/release/control.php @@ -15,6 +15,7 @@ class release extends control * Common actions. * * @param int $productID + * @param int $branch * @access public * @return void */ @@ -34,17 +35,20 @@ class release extends control * Browse releases. * * @param int $productID + * @param int $branch + * @param string $type * @access public * @return void */ - public function browse($productID, $branch = 0) + public function browse($productID, $branch = 0, $type = 'all') { $this->commonAction($productID, $branch); $this->session->set('releaseList', $this->app->getURI(true)); $this->view->title = $this->view->product->name . $this->lang->colon . $this->lang->release->browse; $this->view->position[] = $this->lang->release->browse; - $this->view->releases = $this->release->getList($productID, $branch); + $this->view->releases = $this->release->getList($productID, $branch, $type); + $this->view->type = $type; $this->display(); } @@ -52,6 +56,7 @@ class release extends control * Create a release. * * @param int $productID + * @param int $branch * @access public * @return void */ @@ -127,6 +132,10 @@ class release extends control * View a release. * * @param int $releaseID + * @param string $type + * @param string $link + * @param string $param + * @param string $orderBy * @access public * @return void */ @@ -228,7 +237,6 @@ class release extends control /** * Export the stories of release to HTML. * - * @param string $type story | bug * @access public * @return void */ @@ -527,6 +535,7 @@ class release extends control * * @param int $releaseID * @param int $bugID + * @param string $type * @access public * @return void */ @@ -555,7 +564,8 @@ class release extends control /** * Batch unlink story. * - * @param int $releaseID + * @param int $releaseID + * @param string $type * @access public * @return void */ diff --git a/module/release/lang/en.php b/module/release/lang/en.php index af5176bf24..a72fab0953 100644 --- a/module/release/lang/en.php +++ b/module/release/lang/en.php @@ -54,6 +54,7 @@ $lang->release->resolvedBugs = 'Resolved %s Bugs'; $lang->release->createdBugs = 'Unresolved %s Bug'; $lang->release->export = 'Export as HTML'; $lang->release->yesterday = 'Released Yesterday'; +$lang->release->all = 'All'; $lang->release->filePath = 'Download : '; $lang->release->scmPath = 'SCM Path : '; diff --git a/module/release/lang/zh-cn.php b/module/release/lang/zh-cn.php index 91903b68a1..38bbd559ab 100644 --- a/module/release/lang/zh-cn.php +++ b/module/release/lang/zh-cn.php @@ -54,6 +54,7 @@ $lang->release->resolvedBugs = '本次共解决 %s 个Bug'; $lang->release->createdBugs = '本次共遗留 %s 个Bug'; $lang->release->export = '导出HTML'; $lang->release->yesterday = '昨日发布'; +$lang->release->all = '所有'; $lang->release->filePath = '下载地址:'; $lang->release->scmPath = '版本库地址:'; diff --git a/module/release/model.php b/module/release/model.php index f829bb869a..f242615d42 100644 --- a/module/release/model.php +++ b/module/release/model.php @@ -44,10 +44,12 @@ class releaseModel extends model * Get list of releases. * * @param int $productID + * @param int $branch + * @param string $type * @access public * @return array */ - public function getList($productID, $branch = 0) + public function getList($productID, $branch = 0, $type = 'all') { return $this->dao->select('t1.*, t2.name as productName, t3.id as buildID, t3.name as buildName') ->from(TABLE_RELEASE)->alias('t1') @@ -55,6 +57,7 @@ class releaseModel extends model ->leftJoin(TABLE_BUILD)->alias('t3')->on('t1.build = t3.id') ->where('t1.product')->eq((int)$productID) ->beginIF($branch)->andWhere('t1.branch')->eq($branch)->fi() + ->beginIF($type != 'all')->andWhere('t1.status')->eq($type)->fi() ->andWhere('t1.deleted')->eq(0) ->orderBy('t1.date DESC') ->fetchAll(); @@ -64,6 +67,7 @@ class releaseModel extends model * Get last release. * * @param int $productID + * @param int $branch * @access public * @return bool | object */ @@ -81,6 +85,7 @@ class releaseModel extends model * Get release builds from product. * * @param int $productID + * @param int $branch * @access public * @return void */ @@ -98,6 +103,7 @@ class releaseModel extends model * Create a release. * * @param int $productID + * @param int $branch * @access public * @return int */ @@ -287,6 +293,7 @@ class releaseModel extends model * Link bugs. * * @param int $releaseID + * @param string $type * @access public * @return void */ @@ -308,6 +315,7 @@ class releaseModel extends model * * @param int $releaseID * @param int $bugID + * @param string $type * @access public * @return void */ @@ -324,6 +332,7 @@ class releaseModel extends model * Batch unlink bug. * * @param int $releaseID + * @param string $type * @access public * @return void */ diff --git a/module/release/view/browse.html.php b/module/release/view/browse.html.php index 45614a54e5..7cad7dfd14 100644 --- a/module/release/view/browse.html.php +++ b/module/release/view/browse.html.php @@ -15,9 +15,11 @@ release->confirmDelete)?>