diff --git a/module/block/control.php b/module/block/control.php index 511c627e09..2cb10beae2 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -911,6 +911,7 @@ class block extends control ->beginIF($storyType)->andWhere('type')->eq($storyType)->fi() ->groupBy('product, stage') ->fetchGroup('product', 'stage'); + /* Padding the stories to sure all status have records. */ foreach($stories as $product => $story) { diff --git a/module/block/view/productstatisticblock.html.php b/module/block/view/productstatisticblock.html.php index 5c0943338d..4182ea177f 100644 --- a/module/block/view/productstatisticblock.html.php +++ b/module/block/view/productstatisticblock.html.php @@ -124,7 +124,7 @@ $(function()
-
story->total;?>
+
conceptName;?>
stories):?>
stories);?>
id}&branch=&type=allstory", $lang->story->viewAll . '', '', 'class="btn btn-primary btn-circle btn-icon-right btn-sm"');?> diff --git a/module/product/control.php b/module/product/control.php index f39c73fd2f..4b4af90c6a 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -60,8 +60,8 @@ class product extends control if(common::hasPriv('product', 'create')) $this->lang->TRActions = html::a($this->createLink('product', 'create'), " " . $this->lang->product->create, '', "class='btn btn-primary'"); - $this->view->title = $this->lang->product->index; - $this->view->position[] = $this->lang->product->index; + $this->view->title = $this->lang->product->index; + $this->view->position[] = $this->lang->product->index; $this->display(); } diff --git a/module/product/model.php b/module/product/model.php index 82d716fefb..c60d33ce3f 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -425,6 +425,8 @@ class productModel extends model { $closedProducts[$product->id] = $product; } + $concept = $this->getStoryConceptByProduct($product->id); + $product->conceptName = $concept->SR; } $products = $mineProducts + $otherProducts + $closedProducts; @@ -432,6 +434,25 @@ class productModel extends model return array_slice($products, 0, $num, true); } + /* + * Get the concept of requirements for product use. + * + * @param int $productID + * @access public + * @return void + */ + public function getStoryConceptByProduct($productID = 0) + { + $product = $this->getById($productID); + $URList = $this->dao->select('`key`,`value`')->from(TABLE_LANG)->where('module')->eq('custom')->andWhere('section')->eq('URList')->andWhere('lang')->eq($this->app->clientLang)->fetchPairs(); + $SRList = $this->dao->select('`key`,`value`')->from(TABLE_LANG)->where('module')->eq('custom')->andWhere('section')->eq('SRList')->andWhere('lang')->eq($this->app->clientLang)->fetchPairs(); + + $concept = new stdClass(); + $concept->UR = zget($URList, $product->storyConcept, $this->config->URCommonList[$this->app->clientLang]); + $concept->SR = zget($SRList, $product->storyConcept, $this->config->SRCommonList[$this->app->clientLang]); + return $concept; + } + /* * Get product switcher. *