* Fix bug#17503.
This commit is contained in:
@@ -223,15 +223,10 @@ class productplan extends control
|
||||
$sort = $this->loadModel('common')->appendOrder($orderBy);
|
||||
$this->session->set('productPlanList', $this->app->getURI(true), 'product');
|
||||
|
||||
if(isset($products[$productID])) $productName = $products[$productID];
|
||||
if(!isset($products[$productID]))
|
||||
{
|
||||
$product = $this->loadModel('product')->getById($productID);
|
||||
$productName = empty($product) ? '' : $product->name;
|
||||
}
|
||||
|
||||
$this->commonAction($productID, $branch);
|
||||
$products = $this->product->getPairs();
|
||||
$product = $this->loadModel('product')->getById($productID);
|
||||
$productName = empty($product) ? '' : $product->name;
|
||||
|
||||
$this->view->title = $productName . $this->lang->colon . $this->lang->productplan->browse;
|
||||
$this->view->position[] = $this->lang->productplan->browse;
|
||||
$this->view->productID = $productID;
|
||||
|
||||
@@ -133,9 +133,15 @@
|
||||
$attr = $plan->expired ? "disabled='disabled'" : '';
|
||||
if(common::hasPriv('execution', 'create', $plan) and $plan->parent >= 0)
|
||||
{
|
||||
$branchStatus = $this->branch->getByID($plan->branch, 0, 'status');
|
||||
$disabled = $branchStatus == 'closed' ? 'disabled' : '';
|
||||
$disabled = '';
|
||||
$executionLink = $config->systemMode == 'new' ? '#projects' : $this->createLink('execution', 'create', "projectID=0&executionID=0©ExecutionID=0&plan=$plan->id&confirm=no&productID=$productID");
|
||||
|
||||
if($product->type != 'normal')
|
||||
{
|
||||
$branchStatus = $this->branch->getByID($plan->branch, 0, 'status');
|
||||
$disabled = $branchStatus == 'closed' ? 'disabled' : '';
|
||||
}
|
||||
|
||||
if($config->systemMode == 'new')
|
||||
{
|
||||
echo html::a($executionLink, '<i class="icon-plus"></i>', '', "data-toggle='modal' data-id='$plan->id' onclick='getPlanID(this, $plan->branch)' class='btn {$disabled}' title='{$lang->productplan->createExecution}' $attr");
|
||||
|
||||
Reference in New Issue
Block a user