* Finish task #4598
This commit is contained in:
@@ -1090,6 +1090,12 @@ class project extends control
|
||||
if(!isset($allProducts[$product->id])) $allProducts[$product->id] = $product->name;
|
||||
if($product->branch) $linkedBranches[$product->branch] = $product->branch;
|
||||
}
|
||||
$this->loadModel('productplan');
|
||||
$productPlans = array(0 => '');
|
||||
foreach($linkedProducts as $product)
|
||||
{
|
||||
$productPlans[$product->id] = $this->productplan->getPairs($product->id);
|
||||
}
|
||||
|
||||
$this->view->title = $title;
|
||||
$this->view->position = $position;
|
||||
@@ -1102,6 +1108,7 @@ class project extends control
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->allProducts = $allProducts;
|
||||
$this->view->linkedProducts = $linkedProducts;
|
||||
$this->view->productPlans = $productPlans;
|
||||
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($linkedProducts), '', $linkedBranches);
|
||||
|
||||
$this->display();
|
||||
|
||||
@@ -177,7 +177,7 @@ function loadPlans(product, branchID)
|
||||
{
|
||||
if(typeof(planID) == 'undefined') planID = 0;
|
||||
planID = $("select#plans" + productID).val() != '' ? $("select#plans" + productID).val() : planID;
|
||||
$.get(createLink('product', 'ajaxGetPlans', "productID=" + productID + '&branch=' + branchID + '&planID=' + planID + '&fieldID&needCreate=&expired=' + (config.currentMethod == 'create' ? 'unexpired' : '')), function(data)
|
||||
$.get(createLink('product', 'ajaxGetPlans', "productID=" + productID + '&branch=' + branchID + '&planID=' + planID + '&fieldID&needCreate=&expired=' + ((config.currentMethod == 'create' || config.currentMethod == 'edit') ? 'unexpired' : '')), function(data)
|
||||
{
|
||||
if(data)
|
||||
{
|
||||
|
||||
@@ -133,6 +133,17 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr <?php if($config->global->flow == 'onlyTask') echo "class='hidden'";?>>
|
||||
<th><?php echo $lang->project->linkPlan;?></th>
|
||||
<td id="plansBox" colspan="2">
|
||||
<div class='row'>
|
||||
<?php foreach($linkedProducts as $product):?>
|
||||
<?php $plans = zget($productPlans, $product->id, array(0 => ''));?>
|
||||
<div class="col-sm-4" id="plan<?php echo $product->id;?>"><?php echo html::select("plans[" . $product->id . "]", $plans, $product->plan, "class='form-control chosen'");?></div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->desc;?></th>
|
||||
<td colspan='2'><?php echo html::textarea('desc', htmlspecialchars($project->desc), "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
|
||||
|
||||
Reference in New Issue
Block a user