Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into zentaopms_289

This commit is contained in:
guofeilong
2023-02-24 13:47:19 +08:00
39 changed files with 615 additions and 169 deletions
+2 -1
View File
@@ -59,7 +59,8 @@
<form class='form-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform'>
<table class='table table-form'>
<tr>
<th class='w-120px'><?php echo $lang->execution->projectName;?></th>
<?php $width = (strpos($app->getClientLang(), 'zh-') === false and !empty($project->model) and $project->model == 'agileplus') ? 'w-150px' : 'w-120px';?>
<th class='<?php echo $width;?>'><?php echo $lang->execution->projectName;?></th>
<td class="col-main"><?php echo html::select("project", $allProjects, $projectID, "class='form-control chosen' required onchange='refreshPage(this.value)'");?></td>
<td colspan='2'></td>
</tr>
+3 -3
View File
@@ -33,14 +33,14 @@
<?php if(isset($project)):?>
<?php if($project->model == 'scrum'):?>
<tr>
<th class='w-120px'><?php echo $lang->execution->projectName;?></th>
<th class='c-projectName'><?php echo $lang->execution->projectName;?></th>
<td><?php echo html::select('project', $allProjects, $execution->project, "class='form-control chosen' onchange='changeProject(this.value)' required");?></td><td></td>
</tr>
<?php elseif($project->model == 'kanban'):?>
<?php echo html::hidden('project', $project->id);?>
<?php elseif($project->model == 'agileplus'):?>
<tr>
<th class='w-120px'><?php echo $lang->execution->method;?></th>
<th class='c-method'><?php echo $lang->execution->method;?></th>
<td><?php echo zget($lang->execution->typeList, $execution->type);?></td><td></td>
</tr>
<?php elseif($app->tab == 'project' and $project->model == 'waterfallplus'):?>
@@ -51,7 +51,7 @@
<?php endif;?>
<?php endif;?>
<tr>
<th class='w-120px'><?php echo $lang->execution->name;?></th>
<th class='c-name'><?php echo $lang->execution->name;?></th>
<td><?php echo html::input('name', $execution->name, "class='form-control' required");?></td><td></td>
</tr>
<?php if(isset($config->setCode) and $config->setCode == 1):?>
+26 -34
View File
@@ -61,40 +61,27 @@ js::set('rdSearchValue', '');
js::set('defaultMinColWidth', $this->config->minColWidth);
js::set('defaultMaxColWidth', $this->config->maxColWidth);
$canSortRegion = (commonModel::hasPriv('kanban', 'sortRegion') and count($regions) > 1);
$canCreateRegion = (common::hasPriv('kanban', 'createRegion') and $groupBy == 'default');
$canSortRegion = commonModel::hasPriv('kanban', 'sortRegion') && count($regions) > 1;
$canCreateRegion = common::hasPriv('kanban', 'createRegion') && $groupBy == 'default';
$canEditRegion = commonModel::hasPriv('kanban', 'editRegion');
$canDeleteRegion = commonModel::hasPriv('kanban', 'deleteRegion');
$canCreateLane = commonModel::hasPriv('kanban', 'createLane');
$canCreateTask = common::hasPriv('task', 'create');
$canBatchCreateTask = common::hasPriv('task', 'batchCreate');
$canImportTask = (common::hasPriv('execution', 'importTask') and $execution->multiple);
$canImportTask = common::hasPriv('execution', 'importTask') && $execution->multiple;
if($execution->lifetime != 'ops' and !in_array($execution->attribute, array('request', 'review')))
{
$canCreateBug = ($productID and common::hasPriv('bug', 'create'));
$canBatchCreateBug = ($productID and common::hasPriv('bug', 'batchCreate') and $execution->multiple);
$canImportBug = ($productID and common::hasPriv('execution', 'importBug'));
$canCreateStory = ($productID and common::hasPriv('story', 'create'));
$canBatchCreateStory = ($productID and common::hasPriv('story', 'batchCreate'));
$canLinkStory = ($productID and common::hasPriv('execution', 'linkStory') and !empty($execution->hasProduct));
$canLinkStoryByPlan = ($productID and common::hasPriv('execution', 'importplanstories') and !empty($project->hasProduct));
$hasStoryButton = ($canCreateStory or $canBatchCreateStory or $canLinkStory or $canLinkStoryByPlan);
$hasBugButton = ($canCreateBug or $canBatchCreateBug);
}
else
{
$canCreateBug = false;
$canBatchCreateBug = false;
$canImportBug = false;
$canCreateStory = false;
$canBatchCreateStory = false;
$canLinkStory = false;
$canLinkStoryByPlan = false;
$hasStoryButton = false;
$hasBugButton = false;
}
$hasTaskButton = ($canCreateTask or $canBatchCreateTask or $canImportBug);
$canCreateBug = $features['qa'] && $productID && common::hasPriv('bug', 'create');
$canBatchCreateBug = $features['qa'] && $productID && common::hasPriv('bug', 'batchCreate') && $execution->multiple;
$canImportBug = $features['qa'] && $productID && common::hasPriv('execution', 'importBug');
$hasBugButton = $features['qa'] && ($canCreateBug || $canBatchCreateBug);
$canCreateStory = $features['story'] && $productID && common::hasPriv('story', 'create');
$canBatchCreateStory = $features['story'] && $productID && common::hasPriv('story', 'batchCreate');
$canLinkStory = $features['story'] && $productID && common::hasPriv('execution', 'linkStory') && !empty($execution->hasProduct);
$canLinkStoryByPlan = $features['story'] && $productID && common::hasPriv('execution', 'importplanstories') && !empty($project->hasProduct);
$hasStoryButton = $features['story'] && ($canCreateStory || $canBatchCreateStory || $canLinkStory || $canLinkStoryByPlan);
$hasTaskButton = $canCreateTask || $canBatchCreateTask || $canImportBug;
js::set('priv',
array(
@@ -134,7 +121,7 @@ js::set('priv',
'canDeleteStory' => common::hasPriv('story', 'delete'),
'canChangeStory' => common::hasPriv('story', 'change'),
'canCloseStory' => common::hasPriv('story', 'close'),
'canUnlinkStory' => (common::hasPriv('execution', 'unlinkStory') and !empty($execution->hasProduct)),
'canUnlinkStory' => (common::hasPriv('execution', 'unlinkStory') && !empty($execution->hasProduct)),
'canViewStory' => common::hasPriv('execution', 'storyView'),
)
);
@@ -142,13 +129,17 @@ js::set('priv',
<?php if($groupBy == 'story' and $browseType == 'task'):?>
<style>.kanban-cols {left: 0px !important;}</style>
<?php endif;?>
<?php if($execution->lifetime == 'ops' or in_array($execution->attribute, array('request', 'review'))):?>
<?php if(!($features['story'] or $features['qa'])):?>
<style>#mainMenu .c-group{margin-left: 0px;}</style>
<?php endif;?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<?php if($execution->lifetime != 'ops' and !in_array($execution->attribute, array('request', 'review'))):?>
<?php if($features['story'] or $features['qa']):?>
<div class="input-control space c-type">
<?php
if(!$features['story']) unset($lang->kanban->type['story']);
if(!$features['qa']) unset($lang->kanban->type['bug']);
?>
<?php echo html::select('type', $lang->kanban->type, $browseType, 'class="form-control chosen" data-max_drop_width="215"');?>
</div>
<?php endif;?>
@@ -226,13 +217,14 @@ js::set('priv',
<?php if($canLinkStoryByPlan) echo '<li>' . html::a('#linkStoryByPlan', $lang->execution->linkStoryByPlan, '', 'data-toggle="modal"') . '</li>';?>
<?php if($hasStoryButton and $hasBugButton) echo '<li class="divider"></li>';?>
<?php if($canCreateBug) echo '<li>' . html::a(helper::createLink('bug', 'create', "productID=$productID&branch=0&extra=executionID=$execution->id", '', true), $lang->bug->create, '', "class='iframe'") . '</li>';?>
<?php if($canBatchCreateBug)
<?php
if($canBatchCreateBug)
{
$batchCreateBugLink = '<li>' . html::a(helper::createLink('bug', 'batchCreate', "productID=$productID&branch=$branchID&executionID=$execution->id", '', true), $lang->bug->batchCreate, '', "class='iframe'") . '</li>';
if($productNum > 1) $batchCreateBugLink = '<li>' . html::a('#batchCreateBug', $lang->bug->batchCreate, '', "data-toggle='modal'") . '</li>';
echo $batchCreateBugLink;
}?>
}
?>
<?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=90%") . '</li>';?>
+5 -5
View File
@@ -17,7 +17,7 @@
<?php endif;?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<?php if(isset($lang->execution->menu->qa)):?>
<?php if($features['qa']):?>
<div class="input-control space c-type">
<?php echo html::select('type', $lang->kanban->type, $browseType, 'class="form-control chosen" data-max_drop_width="215"');?>
</div>
@@ -62,7 +62,7 @@
$link = common::hasPriv('execution', 'importTask') ? $this->createLink('execution', 'importTask', "execution=$execution->id") : '#';
echo "<li $misc>" . html::a($link, $lang->execution->importTask, '', $misc) . "</li>";
if(isset($lang->execution->menu->qa))
if($features['qa'])
{
$misc = common::hasPriv('execution', 'importBug') ? '' : "class=disabled";
$link = common::hasPriv('execution', 'importBug') ? $this->createLink('execution', 'importBug', "execution=$execution->id") : '#';
@@ -103,14 +103,14 @@
<button class='btn btn-primary' type='button' data-toggle='dropdown'><i class='icon icon-plus'></i> <?php echo $this->lang->create;?> <span class='caret'></span></button>
<ul class='dropdown-menu pull-right'>
<?php $showDivider = false;?>
<?php if(isset($lang->execution->menu->story) and $hasStoryButton):?>
<?php if($features['story'] and $hasStoryButton):?>
<?php if($canCreateStory) echo '<li>' . html::a(helper::createLink('story', 'create', "productID=$productID&branch=0&moduleID=0&story=0&execution=$execution->id", '', true), $lang->execution->createStory, '', "class='iframe' data-width='80%'") . '</li>';?>
<?php if($canBatchCreateStory) echo '<li>' . html::a(helper::createLink('story', 'batchCreate', "productID=$productID&branch=0&moduleID=0&story=0&execution=$execution->id", '', true), $lang->execution->batchCreateStory, '', "class='iframe' data-width='90%'") . '</li>';?>
<?php if($canLinkStory) echo '<li>' . html::a(helper::createLink('execution', 'linkStory', "execution=$execution->id", '', true), $lang->execution->linkStory, '', "class='iframe' data-width='90%'") . '</li>';?>
<?php if($canLinkStoryByPlan) echo '<li>' . html::a('#linkStoryByPlan', $lang->execution->linkStoryByPlan, '', 'data-toggle="modal"') . '</li>';?>
<?php $showDivider = true;?>
<?php endif;?>
<?php if(isset($lang->execution->menu->qa)):?>
<?php if($features['qa']):?>
<?php if($showDivider) echo '<li class="divider"></li>';?>
<?php if($canCreateBug) echo '<li>' . html::a(helper::createLink('bug', 'create', "productID=$productID&branch=0&extra=executionID=$execution->id", '', true), $lang->bug->create, '', "class='iframe'") . '</li>';?>
<?php if($canBatchCreateBug)
@@ -238,6 +238,6 @@ js::set('priv',
<?php js::set('defaultMinColWidth', $this->config->minColWidth);?>
<?php js::set('defaultMaxColWidth', $this->config->maxColWidth);?>
<?php js::set('teamWords', $lang->execution->teamWords);?>
<?php js::set('canImportBug', isset($lang->execution->menu->qa));?>
<?php js::set('canImportBug', $features['qa']);?>
<?php include '../../common/view/footer.html.php';?>