* finish task #1970.
This commit is contained in:
@@ -136,6 +136,7 @@ class product extends control
|
||||
if($browseType == 'draftstory') $stories = $this->story->getByStatus($productID, 'draft', $orderBy, $pager);
|
||||
if($browseType == 'activestory') $stories = $this->story->getByStatus($productID, 'active', $orderBy, $pager);
|
||||
if($browseType == 'changedstory')$stories = $this->story->getByStatus($productID, 'changed', $orderBy, $pager);
|
||||
if($browseType == 'willclose') $stories = $this->story->getWillClose($productID, $orderBy, $pager);
|
||||
if($browseType == 'closedstory') $stories = $this->story->getByStatus($productID, 'closed', $orderBy, $pager);
|
||||
|
||||
/* Process the sql, get the conditon partion, save it to session. */
|
||||
|
||||
@@ -74,6 +74,7 @@ $lang->product->closedByMe = 'My closed';
|
||||
$lang->product->draftStory = 'Draft';
|
||||
$lang->product->activeStory = 'Active';
|
||||
$lang->product->changedStory = 'Changed';
|
||||
$lang->product->willClose = 'Will close';
|
||||
$lang->product->closedStory = 'Closed';
|
||||
|
||||
$lang->product->allStory = 'All';
|
||||
|
||||
@@ -74,6 +74,7 @@ $lang->product->closedByMe = '由我关闭';
|
||||
$lang->product->draftStory = '草稿';
|
||||
$lang->product->activeStory = '激活';
|
||||
$lang->product->changedStory = '已变更';
|
||||
$lang->product->willClose = '待关闭';
|
||||
$lang->product->closedStory = '已关闭';
|
||||
|
||||
$lang->product->allStory = '全部需求';
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
<li id='draftstoryTab'> <?php echo html::a($this->inlink('browse', "productID=$productID&browseType=draftStory"), $lang->product->draftStory);?></li>
|
||||
<li id='activestoryTab'> <?php echo html::a($this->inlink('browse', "productID=$productID&browseType=activeStory"), $lang->product->activeStory);?></li>
|
||||
<li id='changedstoryTab'> <?php echo html::a($this->inlink('browse', "productID=$productID&browseType=changedStory"), $lang->product->changedStory);?></li>
|
||||
<li id='willcloseTab'> <?php echo html::a($this->inlink('browse', "productID=$productID&browseType=willClose"), $lang->product->willClose);?></li>
|
||||
<li id='closedstoryTab'> <?php echo html::a($this->inlink('browse', "productID=$productID&browseType=closedStory"), $lang->product->closedStory);?></li>
|
||||
<li id='bysearchTab'><a href='javascript:;'><i class='icon-search icon'></i> <?php echo $lang->product->searchStory;?></a></li>
|
||||
</ul>
|
||||
|
||||
@@ -987,6 +987,29 @@ class storyModel extends model
|
||||
->fetchAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get will close stories.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param string $orderBy
|
||||
* @param string $pager
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getWillClose($productID, $orderBy, $pager)
|
||||
{
|
||||
return $this->dao->select('t1.*, t2.title as planTitle')
|
||||
->from(TABLE_STORY)->alias('t1')
|
||||
->leftJoin(TABLE_PRODUCTPLAN)->alias('t2')->on('t1.plan = t2.id')
|
||||
->where('t1.product')->in($productID)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->andWhere('stage')->in('developed,released')
|
||||
->andWhere('status')->ne('closed')
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
->fetchAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get stories through search.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user