* Code for task#77802. Modify batch edit plan.
This commit is contained in:
@@ -194,15 +194,21 @@ class productplan extends control
|
||||
|
||||
$this->commonAction($productID, $branch);
|
||||
|
||||
$plans = $this->productplan->getByIDList($this->post->planIDList);
|
||||
$oldBranch = array();
|
||||
$plans = $this->productplan->getByIDList($this->post->planIDList);
|
||||
$oldBranch = array();
|
||||
$parentIdList = array();
|
||||
|
||||
foreach($plans as $plan) $oldBranch[$plan->id] = $plan->branch;
|
||||
foreach($plans as $plan)
|
||||
{
|
||||
$oldBranch[$plan->id] = $plan->branch;
|
||||
$parentIdList[$plan->parent] = $plan->parent;
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->productplan->batchEdit;
|
||||
$this->view->plans = $plans;
|
||||
$this->view->oldBranch = $oldBranch;
|
||||
$this->view->product = $this->loadModel('product')->getById($productID);;
|
||||
$this->view->title = $this->lang->productplan->batchEdit;
|
||||
$this->view->plans = $plans;
|
||||
$this->view->oldBranch = $oldBranch;
|
||||
$this->view->product = $this->loadModel('product')->getById($productID);;
|
||||
$this->view->parentList = $this->productplan->getByIDList($parentIdList);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -43,8 +43,18 @@
|
||||
<td class='text-center'><?php echo $plan->id . html::hidden("id[$plan->id]", $plan->id);?></td>
|
||||
<?php if($product->type != 'normal'):?>
|
||||
<td class='text-left'>
|
||||
<?php $disabled = $plan->parent == -1 ? "disabled='disabled'" : '';?>
|
||||
<?php echo html::select("branch[$plan->id][]", $branchTagOption, $plan->branch, "onchange='getConflictStories($plan->id); 'class='form-control chosen' multiple $disabled");?>
|
||||
<?php
|
||||
$disabled = $plan->parent == -1 ? "disabled='disabled'" : '';
|
||||
$parentBranches = array();
|
||||
if($plan->parent > 0 and isset($parentList[$plan->parent]))
|
||||
{
|
||||
foreach($branchTagOption as $branchID => $branchName)
|
||||
{
|
||||
if(strpos(",{$parentList[$plan->parent]->branch},", ",$branchID,") !== false) $parentBranches[$branchID] = $branchName;
|
||||
}
|
||||
}
|
||||
echo html::select("branch[$plan->id][]", ($plan->parent > 0 and !empty($parentBranches)) ? $parentBranches : $branchTagOption, $plan->branch, "onchange='getConflictStories($plan->id); 'class='form-control chosen' multiple $disabled");
|
||||
?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<td title='<?php echo $plan->title?>'><?php echo html::input("title[$plan->id]", $plan->title, "class='form-control'")?></td>
|
||||
|
||||
Reference in New Issue
Block a user