Merge branch 'sprint/199_cyy_56548' into 'zentaopms_199'

Sprint/199 cyy 56548

See merge request easycorp/zentaopms!3811
This commit is contained in:
李玉春
2022-06-09 07:13:01 +00:00
4 changed files with 37 additions and 1 deletions
+8
View File
@@ -458,6 +458,14 @@ class execution extends control
if(!empty($_POST))
{
$this->execution->importTask($toExecution);
/* If link from no head then reload. */
if(isonlybody())
{
$kanbanData = $this->loadModel('kanban')->getRDKanban($toExecution, $this->session->execLaneType ? $this->session->execLaneType : 'all');
return print(js::reload('parent'));
}
return print(js::locate(inlink('importTask', "toExecution=$toExecution&fromExecution=$fromExecution"), 'parent'));
}
+18
View File
@@ -3,3 +3,21 @@ function reload(toProject, fromProject)
link = createLink('execution','importtask','toProject='+toProject + '&fromProject='+fromProject);
location.href = link;
}
$(function()
{
$(".preview").modalTrigger({width:1000, type:'iframe'});
if(isonlybody == true) parent.$('#triggerModal .modal-content .modal-header .close').hide();
});
/**
* Go back.
*
* @access public
* @return void
*/
function goback()
{
parent.location.reload();
}
@@ -11,6 +11,7 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('isonlybody', isonlybody());?>
<div id='mainMenu' class='clearfix'>
<div class='pull-left btn-toolbar'>
<?php echo html::a($this->createLink('execution', 'importTask', "execution=$executionID"), "<span class='text'>{$lang->execution->importTask}</span>", '', "class='btn btn-link btn-active-text'");?>
@@ -83,6 +84,13 @@
<div class='table-footer'>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class="table-actions btn-toolbar show-always"><?php echo html::submitButton('<i class="icon icon-import icon-sm"></i> ' . $lang->execution->importTask, '', 'btn btn-secondary btn-wide');?></div>
<div class='btn-toolbar'>
<?php if(isonlybody()):?>
<?php echo html::commonButton('<i class="icon icon-sm"></i> ' . $lang->goback, 'onclick="goback()"', 'btn');?>
<?php else:?>
<?php echo html::backButton('','','btn');?>
<?php endif;?>
</div>
</div>
<?php endif;?>
</form>
+3 -1
View File
@@ -62,6 +62,7 @@ $canBatchCreateTask = common::hasPriv('task', 'batchCreate');
$canCreateBug = ($productID and common::hasPriv('bug', 'create'));
$canBatchCreateBug = ($productID and common::hasPriv('bug', 'batchCreate'));
$canImportBug = ($productID and common::hasPriv('execution', 'importBug'));
$canImportTask = ($productID and common::hasPriv('execution', 'importTask'));
$canCreateStory = ($productID and common::hasPriv('story', 'create'));
$canBatchCreateStory = ($productID and common::hasPriv('story', 'batchCreate'));
$canLinkStory = ($productID and common::hasPriv('execution', 'linkStory'));
@@ -198,7 +199,8 @@ js::set('hasTaskButton', $hasTaskButton);
}?>
<?php if(($hasStoryButton or $hasBugButton) and $hasTaskButton) echo '<li class="divider"></li>';?>
<?php if($canCreateTask) echo '<li>' . html::a(helper::createLink('task', 'create', "execution=$execution->id", '', true), $lang->task->create, '', "class='iframe'") . '</li>';?>
<?php if($canImportBug) echo '<li>' . html::a(helper::createLink('execution', 'importBug', "executionID=$execution->id", '', true), $lang->execution->importBug, '', "class='iframe' data-width=80%") . '</li>';?>
<?php if($canImportBug) echo '<li>' . html::a(helper::createLink('execution', 'importBug', "executionID=$execution->id", '', true), $lang->execution->importBug, '', "class='iframe' data-width=90%") . '</li>';?>
<?php if($canImportTask) echo '<li>' . html::a(helper::createLink('execution', 'importTask', "toExecution=$execution->id", '', true), $lang->execution->importTask, '', "class='iframe' data-width=90%") . '</li>';?>
<?php if($canBatchCreateTask) echo '<li>' . html::a(helper::createLink('task', 'batchCreate', "execution=$execution->id", '', true), $lang->execution->batchCreateTask, '', "class='iframe'") . '</li>';?>
</ul>
</div>