Merge branch 'sprint/zentaopms256_lanzongjun' into 'zentaopms_256'
Sprint/zentaopms256 lanzongjun See merge request easycorp/zentaopms!6423
This commit is contained in:
@@ -1646,17 +1646,17 @@ class execution extends control
|
||||
else
|
||||
{
|
||||
$executionProductList = $this->loadModel('product')->getProducts($executionID);
|
||||
$hasMultiBranchProduct = false;
|
||||
$multiBranchProduct = false;
|
||||
foreach($executionProductList as $executionProduct)
|
||||
{
|
||||
if($executionProduct->type != 'normal')
|
||||
{
|
||||
$hasMultiBranchProduct = true;
|
||||
$multiBranchProduct = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$importPlanStoryTips = $hasMultiBranchProduct ? $this->lang->execution->importBranchPlanStory : $this->lang->execution->importPlanStory;
|
||||
$importPlanStoryTips = $multiBranchProduct ? $this->lang->execution->importBranchPlanStory : $this->lang->execution->importPlanStory;
|
||||
|
||||
return print(js::confirm($importPlanStoryTips, inlink('create', "projectID=$projectID&executionID=$executionID©ExecutionID=&planID=$planID&confirm=yes"), inlink('create', "projectID=$projectID&executionID=$executionID")));
|
||||
}
|
||||
@@ -1918,17 +1918,17 @@ class execution extends control
|
||||
elseif(!empty($newPlans))
|
||||
{
|
||||
$executionProductList = $this->loadModel('product')->getProducts($executionID);
|
||||
$hasMultiBranchProduct = false;
|
||||
$multiBranchProduct = false;
|
||||
foreach($executionProductList as $executionProduct)
|
||||
{
|
||||
if($executionProduct->type != 'normal')
|
||||
{
|
||||
$hasMultiBranchProduct = true;
|
||||
$multiBranchProduct = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$importEditPlanStoryTips = $hasMultiBranchProduct ? $this->lang->execution->importBranchEditPlanStory : $this->lang->execution->importEditPlanStory;
|
||||
$importEditPlanStoryTips = $multiBranchProduct ? $this->lang->execution->importBranchEditPlanStory : $this->lang->execution->importEditPlanStory;
|
||||
|
||||
return print(js::confirm($importEditPlanStoryTips, inlink('edit', "executionID=$executionID&action=edit&extra=&newPlans=$newPlans&confirm=yes"), inlink('view', "executionID=$executionID")));
|
||||
}
|
||||
@@ -4151,8 +4151,8 @@ class execution extends control
|
||||
|
||||
foreach($planStory as $id => $story)
|
||||
{
|
||||
$projectProducts = zget($projectProducts, $story->product, array());
|
||||
if($story->status == 'draft' or $story->status == 'reviewing' or (!empty($projectProducts) and !isset($projectProducts[$story->branch])))
|
||||
$projectBranches = zget($projectProducts, $story->product, array());
|
||||
if($story->status == 'draft' or $story->status == 'reviewing' or (!empty($projectBranches) and !isset($projectBranches[$story->branch])))
|
||||
{
|
||||
$count++;
|
||||
unset($planStory[$id]);
|
||||
|
||||
@@ -2896,7 +2896,7 @@ class executionModel extends model
|
||||
{
|
||||
if(empty($planIdList)) continue;
|
||||
$planIdList = explode(',', $planIdList);
|
||||
$executionProducts = zget($executionProducts, $productID, array());
|
||||
$executionBranches = zget($executionProducts, $productID, array());
|
||||
foreach($planIdList as $planID)
|
||||
{
|
||||
$planStory = $this->story->getPlanStories($planID);
|
||||
@@ -2904,7 +2904,7 @@ class executionModel extends model
|
||||
{
|
||||
foreach($planStory as $id => $story)
|
||||
{
|
||||
if($story->status == 'draft' or $story->status == 'reviewing' or (!empty($executionProducts) and !isset($executionProducts[$story->branch])))
|
||||
if($story->status == 'draft' or $story->status == 'reviewing' or (!empty($executionBranches) and !isset($executionBranches[$story->branch])))
|
||||
{
|
||||
unset($planStory[$id]);
|
||||
continue;
|
||||
|
||||
@@ -1053,8 +1053,8 @@ class productplanModel extends model
|
||||
|
||||
foreach($planStory as $id => $story)
|
||||
{
|
||||
$projectProducts = zget($projectProducts, $story->product, array());
|
||||
if($story->status == 'draft' or $story->status == 'reviewing' or (!empty($projectProducts) and !isset($projectProducts[$story->branch])))
|
||||
$projectBranches = zget($projectProducts, $story->product, array());
|
||||
if($story->status == 'draft' or $story->status == 'reviewing' or (!empty($projectBranches) and !isset($projectBranches[$story->branch])))
|
||||
{
|
||||
unset($planStory[$id]);
|
||||
continue;
|
||||
|
||||
@@ -192,8 +192,8 @@
|
||||
<th><?php echo $lang->story->plan;?></th>
|
||||
<td>
|
||||
<div class='input-group' id='planIdBox'>
|
||||
<?php $multiple = ($this->session->currentProductType != 'normal' and empty($story->branch) and count($story->planTitle) > 1) ? true : false;?>
|
||||
<?php echo html::select($multiple ? 'plan[]' : 'plan', $plans, $story->plan, "class='form-control chosen'" . ($multiple ? ' multiple' : ''));
|
||||
<?php $multiple = ($this->session->currentProductType != 'normal' and empty($story->branch) and count($story->planTitle) > 1) ? 'multiple' : '';?>
|
||||
<?php echo html::select(!empty($multiple) ? 'plan[]' : 'plan', $plans, $story->plan, "class='form-control chosen' " . $multiple);
|
||||
if(count($plans) == 1)
|
||||
{
|
||||
echo "<span class='input-group-addon'>";
|
||||
|
||||
Reference in New Issue
Block a user