diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index cfe989510d..36d9fe8767 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -322,7 +322,8 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
createLink('story', 'batchEdit', "productID=$productID&projectID=0&branch=$branch&storyType=$storyType"); + $projectID = $isProjectStory ? $this->session->project : 0; + $actionLink = $this->createLink('story', 'batchEdit', "productID=$productID&projectID=$projectID&branch=$branch&storyType=$storyType"); ?> edit, "data-form-action='$actionLink' $disabled");?> diff --git a/module/story/control.php b/module/story/control.php index 7fe536dca2..04a2fac94a 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -626,6 +626,27 @@ class story extends control $this->lang->product->switcherMenu = $this->product->getSwitcher($productID); $this->story->replaceURLang($storyType); + if($this->app->openApp == 'product') + { + $this->product->setMenu($productID); + } + else if($this->app->openApp == 'project') + { + $this->project->setMenu($executionID); + } + else if($this->app->openApp == 'execution') + { + $this->execution->setMenu($executionID); + } + else if($this->app->openApp == 'qa') + { + $this->loadModel('qa')->setMenu('', $productID); + } + else if($this->app->openApp == 'my') + { + $this->loadModel('my')->setMenu(); + } + /* Load model. */ $this->loadModel('productplan'); @@ -655,7 +676,6 @@ class story extends control /* The stories of a product. */ if($productID) { - $this->product->setMenu($productID, $branch); $product = $this->product->getByID($productID); $branchProduct = $product->type == 'normal' ? false : true; @@ -674,7 +694,6 @@ class story extends control elseif($executionID) { /* The stories of a execution. */ - $this->execution->setMenu($executionID); $execution = $this->execution->getByID($executionID); $branchProduct = false; @@ -694,9 +713,6 @@ class story extends control } else { - /* The stories of my. */ - $this->loadModel('my')->setMenu(); - $branchProduct = false; $productIdList = array(); foreach($stories as $story) $productIdList[$story->product] = $story->product; @@ -748,6 +764,7 @@ class story extends control $this->view->storyType = $storyType; $this->view->stories = $stories; $this->view->productName = isset($product) ? $product->name : ''; + $this->view->executionID = $executionID; $this->display(); } diff --git a/module/story/view/batchedit.html.php b/module/story/view/batchedit.html.php index 1cbef6ed59..10b8579769 100644 --- a/module/story/view/batchedit.html.php +++ b/module/story/view/batchedit.html.php @@ -35,12 +35,12 @@ foreach(explode(',', $showFields) as $field) if($field)$visibleFields[$field] = ''; } ?> -
" id="batchEditForm"> +" id="batchEditForm">
- + @@ -121,7 +121,7 @@ foreach(explode(',', $showFields) as $field) - + diff --git a/module/story/view/zerocase.html.php b/module/story/view/zerocase.html.php index cb0afb7d3b..76db4eb408 100644 --- a/module/story/view/zerocase.html.php +++ b/module/story/view/zerocase.html.php @@ -93,7 +93,7 @@ createLink('story', 'batchEdit', "productID=$productID&executionID=0&branch=$branch"); + $actionLink = $this->createLink('story', 'batchEdit', "productID=$productID&projectID=$projectID&branch=$branch"); ?> edit, "data-form-action='$actionLink' $disabled");?> createLink('story', 'zeroCase', "productID=$productID&branch=$branch&orderBy=id_desc"), "{$lang->story->zeroCase}", '', "class='btn btn-link' id='zerocaseTab' data-app='{$this->app->openApp}'"); + $projectID = $isProjectApp ? $this->session->project : 0; + echo html::a($this->createLink('story', 'zeroCase', "productID=$productID&branch=$branch&orderBy=id_desc&projectID=$projectID"), "{$lang->story->zeroCase}", '', "class='btn btn-link' id='zerocaseTab' data-app='{$this->app->openApp}'"); } elseif($hasUnitPriv and $menuType == 'browseunits') {
idAB;?> idAB;?> '>story->branch;?> >estimate, "class='form-control'"); ?> >pri, 'class=form-control');?> '>assignedTo, "class='form-control chosen'");?>