* finish task #6285.
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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 : ';
|
||||
|
||||
@@ -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 = '版本库地址:';
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -15,9 +15,11 @@
|
||||
<?php js::set('confirmDelete', $lang->release->confirmDelete)?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<span class='btn btn-link btn-active-text'>
|
||||
<span class='text'><?php echo $lang->release->browse;?></span>
|
||||
</span>
|
||||
<?php
|
||||
echo html::a($this->inlink('browse', "productID={$product->id}&branch=$branch&type=all"), "<span class='text'>{$lang->release->all}</span>" . ($type == 'all' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'");
|
||||
echo html::a($this->inlink('browse', "productID={$product->id}&branch=$branch&type=normal"), "<span class='text'>{$lang->release->statusList['normal']}</span>" . ($type == 'normal' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='normalTab' class='btn btn-link" . ('normal' == $type ? ' btn-active-text' : '') . "'");
|
||||
echo html::a($this->inlink('browse', "productID={$product->id}&branch=$branch&type=terminate"), "<span class='text'>{$lang->release->statusList['terminate']}</span>" . ($type == 'terminate' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='terminateTab' class='btn btn-link" . ('terminate' == $type ? ' btn-active-text' : '') . "'");
|
||||
?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php common::printLink('release', 'create', "productID=$product->id&branch=$branch", "<i class='icon icon-plus'></i> {$lang->release->create}", '', "class='btn btn-primary'");?>
|
||||
|
||||
Reference in New Issue
Block a user