Merge branch 'sprint/198_mayue_bug#23086' into 'zentaopms_198'
Sprint/198 mayue bug#23086 See merge request easycorp/zentaopms!3682
This commit is contained in:
@@ -24,12 +24,13 @@
|
||||
<div class='detail-title'><?php echo $lang->execution->linkedProducts;?></div>
|
||||
<div class='detail-content row'>
|
||||
<?php $i = 0;?>
|
||||
<?php $attr = $execution->grade == 2 ? "disabled='disabled'" : '';?>
|
||||
<?php $attr = '';?>
|
||||
<?php foreach($allProducts as $productID => $productName):?>
|
||||
<?php if(isset($linkedProducts[$productID])):?>
|
||||
<?php foreach($linkedBranches[$productID] as $branchID):?>
|
||||
<?php if(($execution->grade < 2 and in_array($productID, $unmodifiableProducts) and in_array($branchID, $unmodifiableBranches)) and !empty($linkedStoryIDList[$productID][$branchID])) $attr = "disabled='disabled'";?>
|
||||
<?php if($execution->grade < 2 and (!(in_array($productID, $unmodifiableProducts) and in_array($branchID, $unmodifiableBranches)) or empty($linkedStoryIDList[$productID][$branchID]))) $attr = '';?>
|
||||
<?php if((in_array($productID, $unmodifiableProducts) and in_array($branchID, $unmodifiableBranches)) and !empty($linkedStoryIDList[$productID][$branchID])) $attr = "disabled='disabled'";?>
|
||||
<?php if((!(in_array($productID, $unmodifiableProducts) and in_array($branchID, $unmodifiableBranches)) or empty($linkedStoryIDList[$productID][$branchID]))) $attr = '';?>
|
||||
<?php if($execution->grade == '2' and ($linkedProducts[$productID]->type == 'normal' or $branchID == 0)) $attr = "disabled='disabled'";?>
|
||||
<?php $title = (in_array($productID, $unmodifiableProducts) and in_array($branchID, $unmodifiableBranches) and !empty($linkedStoryIDList[$productID][$branchID])) ? sprintf($lang->execution->notAllowRemoveProducts, $linkedStoryIDList[$productID][$branchID]) : $productName;?>
|
||||
<?php $checked = 'checked';?>
|
||||
<div class='col-sm-4'>
|
||||
@@ -75,6 +76,31 @@
|
||||
<?php if(common::canModify('execution', $execution)) echo html::submitButton();?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php if($execution->grade == 2):?>
|
||||
<div class='detail'>
|
||||
<div class='detail-title'><?php echo $lang->execution->unlinkedProducts;?></div>
|
||||
<div class='detail-content row'>
|
||||
<?php foreach($allProducts as $productID => $productName):?>
|
||||
<?php if(isset($linkedProducts[$productID]) and $linkedProducts[$productID]->type != 'normal'):?>
|
||||
<div class='col-sm-4'>
|
||||
<div class='product<?php echo isset($branchGroups[$productID]) ? ' has-branch' : ''?>'>
|
||||
<div class="checkbox-primary" title='<?php echo $productName;?>'>
|
||||
<?php echo "<input type='checkbox' name='products[$i]' value='$productID' id='products{$productID}'>";?>
|
||||
<label class='text-ellipsis checkbox-inline' for='<?php echo 'products' . $productID;?>'><?php echo $productName;?></label>
|
||||
</div>
|
||||
<?php if(isset($branchGroups[$productID])) echo html::select("branch[$i]", $branchGroups[$productID], '', "class='form-control chosen'");?>
|
||||
</div>
|
||||
</div>
|
||||
<?php $i++;?>
|
||||
<?php endif;?>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail text-center form-actions">
|
||||
<?php echo html::hidden("post", 'post');?>
|
||||
<?php if(common::canModify('execution', $execution)) echo html::submitButton();?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user