Merge branch 'sprint/master_zhouxudong_23026' into 'sprint_200'

Sprint/master zhouxudong 23026

See merge request easycorp/zentaopms!3777
This commit is contained in:
孙广明
2022-06-08 06:37:32 +00:00
6 changed files with 32 additions and 7 deletions
+14 -2
View File
@@ -692,6 +692,17 @@ function renderCount($count, count, column)
}
}
/**
* Alert to link product.
*
* @access public
* @return void
*/
function tips()
{
bootbox.alert(needLinkProducts);
}
/**
* Render header of a column.
*/
@@ -726,10 +737,11 @@ function renderHeaderCol($column, column, $header, kanbanData)
var printMoreBtn = (columnPrivs.includes('setColumn') || columnPrivs.includes('setWIP'));
/* Render more menu. */
if(((column.type == 'backlog' && hasStoryButton) || (column.type == 'wait' && hasTaskButton) || (column.type == 'unconfirmed' && hasBugButton)) && $actions.children('.text-primary').length == 0)
if(column.type == 'backlog' || column.type == 'wait' || column.type == 'unconfirmed' && $actions.children('.text-primary').length == 0)
{
var tips = productID ? '' : 'onclick="tips()"';
$actions.append([
'<a data-contextmenu="columnCreate" data-type="' + column.type + '" data-kanban="' + kanban.id + '" data-parent="' + (column.parentType || '') + '" class="text-primary">',
'<a data-contextmenu="columnCreate" data-type="' + column.type + '" data-kanban="' + kanban.id + '" data-parent="' + (column.parentType || '') + '" class="text-primary"' + ((column.type !== 'wait') ? tips : '') + '>',
'<i class="icon icon-expand-alt"></i>',
'</a>'
].join(''));
+14 -2
View File
@@ -300,6 +300,17 @@ function renderColumnCount($count, count, col)
}
}
/**
* Alert to link product.
*
* @access public
* @return void
*/
function tips()
{
bootbox.alert(needLinkProducts);
}
/**
* Render header column
* @param {JQuery} $col Header column element
@@ -318,10 +329,11 @@ function renderHeaderCol($col, col, $header, kanban)
if(priv.canCreateTask || priv.canBatchCreateTask) printTaskButton = true;
if(priv.canCreateBug || priv.canBatchCreateBug) printBugButton = true;
if((col.type === 'backlog' && printStoryButton) || (col.type === 'wait' && printTaskButton) || (col.type == 'unconfirmed' && printBugButton))
if(col.type === 'backlog' || col.type === 'wait' || col.type == 'unconfirmed')
{
var tips = productID ? '' : 'onclick="tips()"';
$actions.append([
'<a data-contextmenu="columnCreate" data-type="' + col.type + '" data-kanban="' + kanban.id + '" data-parent="' + (col.parentType || '') + '" class="text-primary">',
'<a data-contextmenu="columnCreate" data-type="' + col.type + '" data-kanban="' + kanban.id + '" data-parent="' + (col.parentType || '') + '" class="text-primary"' + ((col.laneType !== 'task') ? tips : '') + '>',
'<i class="icon icon-expand-alt"></i>',
'</a>'
].join(''));
+1
View File
@@ -271,6 +271,7 @@ $lang->execution->treeOnlyStory = 'Show Story Only';
$lang->execution->storyKanban = 'Story Kanban';
$lang->execution->storySort = 'Rank Story';
$lang->execution->importPlanStory = $lang->executionCommon . ' is created!\nDo you want to import stories that have been linked to the plan?';
$lang->execution->needLinkProducts = 'The execution has not been linked with any product, and the related functions cannot be used. Please link the product first and try again.';
$lang->execution->iteration = 'Iterations';
$lang->execution->iterationInfo = '%s Iterations';
$lang->execution->viewAll = 'View All';
+1
View File
@@ -271,6 +271,7 @@ $lang->execution->treeOnlyStory = "树状图只看{$lang->SRCommon}";
$lang->execution->storyKanban = "{$lang->SRCommon}看板";
$lang->execution->storySort = "{$lang->SRCommon}排序";
$lang->execution->importPlanStory = '创建' . $lang->executionCommon . '成功!\n是否导入计划关联的相关' . $lang->SRCommon . '?';
$lang->execution->needLinkProducts = '该执行还未关联任何产品,相关功能无法使用,请先关联产品后再试。';
$lang->execution->iteration = '版本迭代';
$lang->execution->iterationInfo = '迭代%s次';
$lang->execution->viewAll = '查看所有';
+1 -3
View File
@@ -52,6 +52,7 @@ js::set('vision', $this->config->vision);
js::set('productCount', count($productNames));
js::set('executionID', $execution->id);
js::set('reviewStoryParis', $reviewStoryParis);
js::set('needLinkProducts', $lang->execution->needLinkProducts);
$canSortRegion = commonModel::hasPriv('kanban', 'sortRegion') && count($regions) > 1;
$canEditRegion = commonModel::hasPriv('kanban', 'editRegion');
@@ -109,9 +110,6 @@ js::set('priv',
'canUnlinkStory' => common::hasPriv('execution', 'unlinkStory'),
)
);
js::set('hasStoryButton', $hasStoryButton);
js::set('hasBugButton', $hasBugButton);
js::set('hasTaskButton', $hasTaskButton);
?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
@@ -213,4 +213,5 @@ js::set('priv',
<?php js::set('fluidBoard', $execution->fluidBoard);?>
<?php js::set('displayCards', $execution->displayCards);?>
<?php js::set('reviewStoryParis', $reviewStoryParis);?>
<?php js::set('needLinkProducts', $lang->execution->needLinkProducts);?>
<?php include '../../common/view/footer.html.php';?>