* finish task #1970.

This commit is contained in:
wangyidong
2014-07-28 02:07:41 +00:00
parent 6989db2963
commit 6410641bbb
5 changed files with 27 additions and 0 deletions
+1
View File
@@ -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. */
+1
View File
@@ -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';
+1
View File
@@ -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 = '全部需求';
+1
View File
@@ -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>
+23
View File
@@ -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.
*