Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3
This commit is contained in:
@@ -862,7 +862,7 @@ class execution extends control
|
||||
|
||||
$productPairs = array('0' => $this->lang->product->all);
|
||||
foreach($products as $product) $productPairs[$product->id] = $product->name;
|
||||
$this->lang->modulePageNav = $this->product->select($productPairs, $productID, 'execution', 'bug', '', $branchID);
|
||||
$this->lang->modulePageNav = $this->product->select($productPairs, $productID, 'execution', 'bug', '', $branchID, 0, '', false);
|
||||
|
||||
/* Header and position. */
|
||||
$title = $execution->name . $this->lang->colon . $this->lang->execution->bug;
|
||||
|
||||
@@ -67,11 +67,12 @@ class productModel extends model
|
||||
* @param int $branch
|
||||
* @param int $module
|
||||
* @param string $moduleType
|
||||
* @param bool $withBranch true|false
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function select($products, $productID, $currentModule, $currentMethod, $extra = '', $branch = 0, $module = 0, $moduleType = '')
|
||||
public function select($products, $productID, $currentModule, $currentMethod, $extra = '', $branch = 0, $module = 0, $moduleType = '', $withBranch = true)
|
||||
{
|
||||
$isBrowseBug = (strpos(',project,execution,', ",{$this->app->openApp},") !== false and strpos(',bug,testcase,testtask,', ",{$this->app->rawMethod},") !== false and isset($products[0])) ? true : false;
|
||||
|
||||
@@ -106,8 +107,8 @@ class productModel extends model
|
||||
$output .= "</div></div>";
|
||||
if($isMobile) $output = "<a id='currentItem' href=\"javascript:showSearchMenu('product', '$productID', '$currentModule', '$currentMethod', '$extra')\"><span class='text'>{$currentProduct->name}</span> <span class='icon-caret-down'></span></a><div id='currentItemDropMenu' class='hidden affix enter-from-bottom layer'></div>";
|
||||
|
||||
if($currentProduct->type == 'normal') unset($this->lang->product->menu->settings['subMenu']->branch);
|
||||
if($currentProduct->type != 'normal' && $currentModule != 'programplan')
|
||||
if($currentProduct->type == 'normal' || !$withBranch) unset($this->lang->product->menu->settings['subMenu']->branch);
|
||||
if($currentProduct->type != 'normal' && $currentModule != 'programplan' && $withBranch)
|
||||
{
|
||||
$this->lang->product->branch = sprintf($this->lang->product->branch, $this->lang->product->branchName[$currentProduct->type]);
|
||||
$this->lang->product->menu->settings['subMenu']->branch = str_replace('@branch@', $this->lang->product->branch, $this->lang->product->menu->settings['subMenu']->branch);
|
||||
|
||||
@@ -723,7 +723,7 @@ class project extends control
|
||||
|
||||
$productPairs = array('0' => $this->lang->product->all);
|
||||
foreach($products as $product) $productPairs[$product->id] = $product->name;
|
||||
$this->lang->modulePageNav = $this->product->select($productPairs, $productID, 'project', 'bug', '', $branchID);
|
||||
$this->lang->modulePageNav = $this->product->select($productPairs, $productID, 'project', 'bug', '', $branchID, 0, '', false);
|
||||
|
||||
/* Header and position. */
|
||||
$title = $project->name . $this->lang->colon . $this->lang->bug->common;
|
||||
@@ -786,7 +786,7 @@ class project extends control
|
||||
{
|
||||
$this->loadModel('product');
|
||||
$products = array('0' => $this->lang->product->all) + $this->project->getProducts($projectID, false);
|
||||
$this->lang->modulePageNav = $this->product->select($products, $productID, 'project', 'testcase', '', $branch);
|
||||
$this->lang->modulePageNav = $this->product->select($products, $productID, 'project', 'testcase', '', $branch, 0, '', false);
|
||||
|
||||
echo $this->fetch('testcase', 'browse', "productID=$productID&branch=$branch&browseType=$browseType¶m=$param&orderBy=$orderBy&recTotal=$orderBy&recPerPage=$recPerPage&pageID=$pageID&projectID=$projectID");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user