* Fix bug#11741,#11740.
This commit is contained in:
@@ -322,7 +322,8 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
|
||||
<div class='btn-group dropup'>
|
||||
<?php
|
||||
$disabled = $canBatchEdit ? '' : "disabled='disabled'";
|
||||
$actionLink = $this->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");
|
||||
?>
|
||||
<?php echo html::commonButton($lang->edit, "data-form-action='$actionLink' $disabled");?>
|
||||
<button type='button' class='btn dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -35,12 +35,12 @@ foreach(explode(',', $showFields) as $field)
|
||||
if($field)$visibleFields[$field] = '';
|
||||
}
|
||||
?>
|
||||
<form method='post' target='hiddenwin' action="<?php echo inLink('batchEdit', "from=storyBatchEdit")?>" id="batchEditForm">
|
||||
<form method='post' target='hiddenwin' action="<?php echo inLink('batchEdit', "productID=$productID&executionID=$executionID")?>" id="batchEditForm">
|
||||
<div class="table-responsive">
|
||||
<table class='table table-form'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-40px'> <?php echo $lang->idAB;?></th>
|
||||
<th class='w-40px'> <?php echo $lang->idAB;?></th>
|
||||
<?php if($branchProduct):?>
|
||||
<th class='w-120px<?php echo zget($visibleFields, 'branch', ' hidden')?>'><?php echo $lang->story->branch;?></th>
|
||||
<?php endif;?>
|
||||
@@ -121,7 +121,7 @@ foreach(explode(',', $showFields) as $field)
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
|
||||
<td <?php echo zget($visibleFields, 'estimate', "class='hidden'")?>><?php echo html::input("estimates[$storyID]", $story->estimate, "class='form-control'"); ?></td>
|
||||
<td <?php echo zget($visibleFields, 'pri', "class='hidden'")?>><?php echo html::select("pris[$storyID]", $priList, $story->pri, 'class=form-control');?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'assignedTo', ' hidden')?>'><?php echo html::select("assignedTo[$storyID]", $users, $story->assignedTo, "class='form-control chosen'");?></td>
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
<?php
|
||||
$canBatchEdit = common::hasPriv('story', 'batchEdit');
|
||||
$disabled = $canBatchEdit ? '' : "disabled='disabled'";
|
||||
$actionLink = $this->createLink('story', 'batchEdit', "productID=$productID&executionID=0&branch=$branch");
|
||||
$actionLink = $this->createLink('story', 'batchEdit', "productID=$productID&projectID=$projectID&branch=$branch");
|
||||
?>
|
||||
<?php echo html::commonButton($lang->edit, "data-form-action='$actionLink' $disabled");?>
|
||||
<?php
|
||||
|
||||
@@ -93,7 +93,8 @@
|
||||
}
|
||||
elseif($hasZeroPriv and $menuType == 'zerocase')
|
||||
{
|
||||
echo html::a($this->createLink('story', 'zeroCase', "productID=$productID&branch=$branch&orderBy=id_desc"), "<span class='text'>{$lang->story->zeroCase}</span>", '', "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"), "<span class='text'>{$lang->story->zeroCase}</span>", '', "class='btn btn-link' id='zerocaseTab' data-app='{$this->app->openApp}'");
|
||||
}
|
||||
elseif($hasUnitPriv and $menuType == 'browseunits')
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user