* Fix bug#17472.
This commit is contained in:
@@ -111,6 +111,7 @@ class product extends control
|
||||
$this->view->status = $status;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->branchID = $branch;
|
||||
$this->view->branchStatus = $this->loadModel('branch')->getByID($branch, 0, 'status');
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<?php echo html::checkbox('involved', array('1' => $lang->project->mine), '', $this->cookie->involved ? 'checked=checked' : '');?>
|
||||
<div class="tip"><icon class='icon icon-help' data-toggle='popover' data-trigger='focus hover' data-placement='right' data-tip-class='text-muted popover-sm' data-content=<?php echo $lang->product->projectInfo;?>></icon></div>
|
||||
</div>
|
||||
<?php if($config->systemMode == 'new'):?>
|
||||
<?php if($config->systemMode == 'new' and $branchStatus != 'closed'):?>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if(common::hasPriv('project', 'manageProducts')) echo html::a('#link2Project', '<i class="icon-link"></i> ' . $lang->product->link2Project, '', "data-toggle='modal' class='btn btn-secondary'");?>
|
||||
<?php if(common::hasPriv('project', 'create')) common::printLink('project', 'createGuide', "programID=$product->program&from=project&productID=$productID&branchID=$branchID", '<i class="icon icon-plus"></i> ' . $lang->project->create, '', 'class="btn btn-primary" data-toggle="modal" data-target="#guideDialog"');?>
|
||||
|
||||
@@ -84,7 +84,7 @@ function getPlanID(obj, branch)
|
||||
$("#project").trigger('chosen:updated');
|
||||
$(".tips").removeClass('hidden');
|
||||
|
||||
var locateLink = createLink('product', 'project', 'status=all&productID=' + productID);
|
||||
var locateLink = createLink('product', 'project', 'status=all&productID=' + productID + '&branch=' + branch);
|
||||
var locateButton = "<a href=" + locateLink + " class='btn btn-primary' data-app='product'>" + enterProjectList + "</a>";
|
||||
$("#projects .btn-primary").replaceWith(locateButton);
|
||||
}
|
||||
|
||||
@@ -133,14 +133,16 @@
|
||||
$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' : '';
|
||||
$executionLink = $config->systemMode == 'new' ? '#projects' : $this->createLink('execution', 'create', "projectID=0&executionID=0©ExecutionID=0&plan=$plan->id&confirm=no&productID=$productID");
|
||||
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' title='{$lang->productplan->createExecution}' $attr");
|
||||
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");
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::a($executionLink, '<i class="icon-plus"></i>', '', "class='btn' title='{$lang->productplan->createExecution}' $attr");
|
||||
echo html::a($executionLink, '<i class="icon-plus"></i>', '', "class='btn {$disabled}' title='{$lang->productplan->createExecution}' $attr");
|
||||
}
|
||||
}
|
||||
if(common::hasPriv('productplan', 'linkStory', $plan) and $plan->parent >= 0) echo html::a(inlink('view', "planID=$plan->id&type=story&orderBy=id_desc&link=true"), '<i class="icon-link"></i>', '', "class='btn' title='{$lang->productplan->linkStory}'");
|
||||
|
||||
Reference in New Issue
Block a user