Merge branch 'master_xieqiyu_19711' into 'master'

Master xieqiyu 19711

See merge request easycorp/zentaopms!2742
This commit is contained in:
孙广明
2022-04-02 08:10:22 +00:00
2 changed files with 12 additions and 8 deletions
+4 -4
View File
@@ -2403,13 +2403,13 @@ EOD;
/* Limited execution. */
$limitedExecution = false;
if(!empty($module) && $module == 'task' && !empty($object->execution) or
!empty($module) && $module == 'execution' && !empty($object->id)
if(!empty($module) && in_array($module, array('task', 'story')) && !empty($object->execution) or
!empty($module) && $module == 'execution' && !empty($object->id)
)
{
$objectID = '';
if($module == 'execution' and !empty($object->id)) $objectID = $object->id;
if($module == 'task' and !empty($object->execution))$objectID = $object->execution;
if($module == 'execution' and !empty($object->id)) $objectID = $object->id;
if(in_array($module, array('task', 'story')) and !empty($object->execution)) $objectID = $object->execution;
$limitedExecutions = !empty($_SESSION['limitedExecutions']) ? $_SESSION['limitedExecutions'] : '';
if($objectID and strpos(",{$limitedExecutions},", ",$objectID,") !== false) $limitedExecution = true;
+8 -4
View File
@@ -179,12 +179,15 @@
<thead>
<tr>
<?php
$checkObject = new stdclass();
$checkObject->execution = $execution->id;
$totalEstimate = 0;
$canBatchEdit = common::hasPriv('story', 'batchEdit');
$canBatchClose = common::hasPriv('story', 'batchClose');
$canBatchChangeStage = common::hasPriv('story', 'batchChangeStage');
$canBatchUnlink = common::hasPriv('execution', 'batchUnlinkStory');
$canBatchToTask = common::hasPriv('story', 'batchToTask');
$canBatchToTask = common::hasPriv('story', 'batchToTask', $checkObject);
$canBatchAction = ($canBeChanged and ($canBatchEdit or $canBatchClose or $canBatchChangeStage or $canBatchUnlink or $canBatchToTask));
?>
<?php $vars = "executionID={$execution->id}&orderBy=%s&type=$type&param=$param&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
@@ -335,13 +338,14 @@
$actionLink = $this->createLink('story', 'batchEdit', "productID=0&executionID=$execution->id");
echo html::commonButton($lang->edit, "data-form-action='$actionLink' $disabled");
?>
<button type='button' <?php echo $canBatchToTask ? '' : "disabled='disabled'";?> class='btn dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
<?php if($canBatchToTask):?>
<button type='button' class='btn dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
<ul class='dropdown-menu'>
<?php
$class = $canBatchToTask ? '' : "class='hidden'";
echo "<li $class>" . html::a('#batchToTask', $lang->story->batchToTask, '', "data-toggle='modal' id='batchToTaskButton'") . "</li>";
echo "<li>" . html::a('#batchToTask', $lang->story->batchToTask, '', "data-toggle='modal' id='batchToTaskButton'") . "</li>";
?>
</ul>
<?php endif;?>
</div>
<?php
if($canBatchClose)