From b0515caf4a8fa3c596f1694c75873cc9aafd63b6 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Thu, 9 Nov 2023 00:31:03 -0500 Subject: [PATCH] * Merge #5935f603f4,Change judgment condition. --- module/action/model.php | 8 ++++---- module/admin/lang/menu.php | 4 ++-- module/my/lang/de.php | 2 +- module/my/lang/en.php | 2 +- module/my/lang/fr.php | 2 +- module/my/lang/zh-cn.php | 2 +- module/my/view/dynamic.html.php | 2 +- module/pivot/ui/preview.html.php | 2 +- module/pivot/view/preview.html.php | 4 ++-- module/product/ui/track.html.php | 8 ++++---- module/product/view/track.html.php | 8 ++++---- module/programplan/ui/create.html.php | 2 +- module/programplan/view/create.html.php | 10 +++++----- module/stakeholder/view/browse.html.php | 2 +- 14 files changed, 29 insertions(+), 29 deletions(-) diff --git a/module/action/model.php b/module/action/model.php index 697f345810..7013ecdd1f 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -191,7 +191,7 @@ class actionModel extends model if(in_array($actionName, array('totask', 'linkchildtask', 'unlinkchildrentask', 'linkparenttask', 'unlinkparenttask', 'deletechildrentask')) && $action->objectType != 'feedback') $this->actionTao->processActionExtra(TABLE_TASK, $action, 'name', 'task', 'view');; if(in_array($actionName, array('linkchildstory', 'unlinkchildrenstory', 'linkparentstory', 'unlinkparentstory', 'deletechildrenstory'))) $this->actionTao->processActionExtra(TABLE_STORY, $action, 'title', 'story', 'view'); if(in_array($actionName, array('testtaskopened', 'testtaskstarted', 'testtaskclosed'))) $this->actionTao->processActionExtra(TABLE_TESTTASK, $action, 'name', 'testtask', 'view'); - if(in_array($actionName, array('importfromstorylib', 'importfromrisklib', 'importfromissuelib', 'importfromopportunitylib')) && $this->config->edition == 'max') $this->actionTao->processActionExtra(TABLE_ASSETLIB, $action, 'name', 'assetlib', $action->objectType); + if(in_array($actionName, array('importfromstorylib', 'importfromrisklib', 'importfromissuelib', 'importfromopportunitylib')) && in_array($this->config->edition, array('max', 'ipd'))) $this->actionTao->processActionExtra(TABLE_ASSETLIB, $action, 'name', 'assetlib', $action->objectType); if(in_array($actionName, array('opened', 'managed', 'edited')) && in_array($objectType, array('execution', 'project'))) $this->processExecutionAndProjectActionExtra($action); if(in_array($actionName, array('linkstory', 'unlinkstory', 'createchildrenstory'))) $this->actionTao->processLinkStoryAndBugActionExtra($action, 'story', 'view'); if(in_array($actionName, array('linkbug', 'unlinkbug'))) $this->actionTao->processLinkStoryAndBugActionExtra($action, 'bug', 'view'); @@ -489,7 +489,7 @@ class actionModel extends model $this->app->loadLang('mr'); $desc = sprintf($this->lang->mr->{$mrAction}, $mrDate, $mrActor, $mrLink); } - elseif($this->config->edition == 'max' && strpos($this->config->action->assetType, ",{$action->objectType},") !== false && $action->action == 'approved') + elseif(in_array($this->config->edition, array('max', 'ipd')) && strpos($this->config->action->assetType, ",{$action->objectType},") !== false && $action->action == 'approved') { $desc = empty($this->lang->action->approve->{$action->extra}) ? '' : $this->lang->action->approve->{$action->extra}; } @@ -957,7 +957,7 @@ class actionModel extends model } } - if($this->config->edition == 'max' && $objectType == 'assetlib') + if(in_array($this->config->edition, array('max', 'ipd')) && $objectType == 'assetlib') { $libType = $this->dao->select('type')->from(TABLE_ASSETLIB)->where('id')->eq($objectID)->fetch('type'); if(strpos('story,issue,risk,opportunity,practice,component', $libType) !== false) $actionObjectLabel = $this->lang->action->label->{$libType . 'assetlib'}; @@ -995,7 +995,7 @@ class actionModel extends model if($objectDeleted) return $action; } - if($this->config->edition == 'max' && strpos($this->config->action->assetType, ",{$action->objectType},") !== false && empty($action->project) && empty($action->product) && empty($action->execution)) + if(in_array($this->config->edition, array('max', 'ipd')) && strpos($this->config->action->assetType, ",{$action->objectType},") !== false && empty($action->project) && empty($action->product) && empty($action->execution)) { $this->actionTao->processMaxDocObjectLink($action, $moduleName, $methodName, $vars); } diff --git a/module/admin/lang/menu.php b/module/admin/lang/menu.php index fffc4591bc..8771c3a148 100644 --- a/module/admin/lang/menu.php +++ b/module/admin/lang/menu.php @@ -208,7 +208,7 @@ $lang->admin->menuList->platform['menuOrder']['25'] = 'setrules'; $lang->admin->menuList->platform['dividerMenu'] = ',plat,setrules,'; -if($config->edition != 'max') +if($config->edition != 'max' and $config->edition != 'ipd') { unset($lang->admin->menuList->model['subMenu']['scrum']); unset($lang->admin->menuList->model['subMenu']['agileplus']); @@ -226,7 +226,7 @@ if(!helper::hasFeature('waterfallplus')) unset($lang->admin->menuList->model['subMenu']['waterfallplus']); unset($lang->admin->menuList->model['menuOrder']['25']); } -if($config->edition == 'max') +if($config->edition == 'max' or $config->edition == 'ipd') { if(!helper::hasFeature('scrum_auditplan') and !helper::hasFeature('scrum_process')) unset($lang->admin->menuList->model['subMenu']['scrum'], $lang->admin->menuList->model['menuOrder']['10']); if(!helper::hasFeature('agileplus_auditplan') and !helper::hasFeature('agileplus_process')) unset($lang->admin->menuList->model['subMenu']['agileplus'], $lang->admin->menuList->model['menuOrder']['20']); diff --git a/module/my/lang/de.php b/module/my/lang/de.php index 01e45e934f..dd3a66560d 100644 --- a/module/my/lang/de.php +++ b/module/my/lang/de.php @@ -154,7 +154,7 @@ $lang->my->featureBar['audit']['all'] = 'All'; $lang->my->featureBar['audit']['demand'] = 'Demand'; $lang->my->featureBar['audit']['story'] = 'Story'; $lang->my->featureBar['audit']['testcase'] = 'Test case'; -if($config->edition == 'max' and (helper::hasFeature('waterfall') or helper::hasFeature('waterfallplus'))) $lang->my->featureBar['audit']['project'] = $lang->projectCommon; +if(in_array($config->edition, array('max', 'ipd')) and (helper::hasFeature('waterfall') or helper::hasFeature('waterfallplus'))) $lang->my->featureBar['audit']['project'] = $lang->projectCommon; if($config->edition != 'open') $lang->my->featureBar['audit']['feedback'] = 'Feedback'; if($config->edition != 'open' and helper::hasFeature('OA')) $lang->my->featureBar['audit']['oa'] = 'OA'; diff --git a/module/my/lang/en.php b/module/my/lang/en.php index 01e45e934f..dd3a66560d 100644 --- a/module/my/lang/en.php +++ b/module/my/lang/en.php @@ -154,7 +154,7 @@ $lang->my->featureBar['audit']['all'] = 'All'; $lang->my->featureBar['audit']['demand'] = 'Demand'; $lang->my->featureBar['audit']['story'] = 'Story'; $lang->my->featureBar['audit']['testcase'] = 'Test case'; -if($config->edition == 'max' and (helper::hasFeature('waterfall') or helper::hasFeature('waterfallplus'))) $lang->my->featureBar['audit']['project'] = $lang->projectCommon; +if(in_array($config->edition, array('max', 'ipd')) and (helper::hasFeature('waterfall') or helper::hasFeature('waterfallplus'))) $lang->my->featureBar['audit']['project'] = $lang->projectCommon; if($config->edition != 'open') $lang->my->featureBar['audit']['feedback'] = 'Feedback'; if($config->edition != 'open' and helper::hasFeature('OA')) $lang->my->featureBar['audit']['oa'] = 'OA'; diff --git a/module/my/lang/fr.php b/module/my/lang/fr.php index 01e45e934f..dd3a66560d 100644 --- a/module/my/lang/fr.php +++ b/module/my/lang/fr.php @@ -154,7 +154,7 @@ $lang->my->featureBar['audit']['all'] = 'All'; $lang->my->featureBar['audit']['demand'] = 'Demand'; $lang->my->featureBar['audit']['story'] = 'Story'; $lang->my->featureBar['audit']['testcase'] = 'Test case'; -if($config->edition == 'max' and (helper::hasFeature('waterfall') or helper::hasFeature('waterfallplus'))) $lang->my->featureBar['audit']['project'] = $lang->projectCommon; +if(in_array($config->edition, array('max', 'ipd')) and (helper::hasFeature('waterfall') or helper::hasFeature('waterfallplus'))) $lang->my->featureBar['audit']['project'] = $lang->projectCommon; if($config->edition != 'open') $lang->my->featureBar['audit']['feedback'] = 'Feedback'; if($config->edition != 'open' and helper::hasFeature('OA')) $lang->my->featureBar['audit']['oa'] = 'OA'; diff --git a/module/my/lang/zh-cn.php b/module/my/lang/zh-cn.php index b82a368f69..e87d378dae 100644 --- a/module/my/lang/zh-cn.php +++ b/module/my/lang/zh-cn.php @@ -154,7 +154,7 @@ $lang->my->featureBar['audit']['all'] = '全部'; $lang->my->featureBar['audit']['demand'] = '需求池需求'; $lang->my->featureBar['audit']['story'] = '需求'; $lang->my->featureBar['audit']['testcase'] = '用例'; -if($config->edition == 'max' and (helper::hasFeature('waterfall') or helper::hasFeature('waterfallplus'))) $lang->my->featureBar['audit']['project'] = $lang->projectCommon; +if(in_array($config->edition, array('max', 'ipd')) and (helper::hasFeature('waterfall') or helper::hasFeature('waterfallplus'))) $lang->my->featureBar['audit']['project'] = $lang->projectCommon; if($config->edition != 'open') $lang->my->featureBar['audit']['feedback'] = '反馈'; if($config->edition != 'open' and helper::hasFeature('OA')) $lang->my->featureBar['audit']['oa'] = '办公'; diff --git a/module/my/view/dynamic.html.php b/module/my/view/dynamic.html.php index 83b94cf810..f8a8d21ce3 100644 --- a/module/my/view/dynamic.html.php +++ b/module/my/view/dynamic.html.php @@ -67,7 +67,7 @@ objectType == 'meeting') $tab = $action->project ? "data-app='project'" : "data-app='my'";?> edition == 'max' and strpos($config->action->assetType, ",{$action->objectType},") !== false) and empty($action->objectName)) + if((in_array($config->edition, array('max', 'ipd')) and strpos($config->action->assetType, ",{$action->objectType},") !== false) and empty($action->objectName)) { echo '#' . $action->objectID; } diff --git a/module/pivot/ui/preview.html.php b/module/pivot/ui/preview.html.php index 00d3e47643..e9531b50cf 100644 --- a/module/pivot/ui/preview.html.php +++ b/module/pivot/ui/preview.html.php @@ -26,7 +26,7 @@ foreach($groups as $id => $name) featureBar(set::items($items)); -if($config->edition == 'biz' || $config->edition == 'max') +if($config->edition != 'open') { toolbar ( diff --git a/module/pivot/view/preview.html.php b/module/pivot/view/preview.html.php index 3c3e1eafad..4fab319771 100644 --- a/module/pivot/view/preview.html.php +++ b/module/pivot/view/preview.html.php @@ -15,7 +15,7 @@ $('#subNavbar li').not('[data-id=]').removeClass('active') $label", '', "class='btn btn-link {$active}'");?> - config->edition == 'biz' or $this->config->edition == 'max'):?> + config->edition != 'open'):?>
@@ -24,7 +24,7 @@ $('#subNavbar li').not('[data-id=]').removeClass('active')
-config->edition == 'biz' or $this->config->edition == 'max'):?> +config->edition != 'open'):?> app->getModuleExtPath('', 'pivot', 'view');?> diff --git a/module/product/ui/track.html.php b/module/product/ui/track.html.php index 50d0886231..9bf6e7ffeb 100644 --- a/module/product/ui/track.html.php +++ b/module/product/ui/track.html.php @@ -98,11 +98,11 @@ function getTrackTd($storyID, $story, $tab, $module) $trackItem[] = h::td(getTaskTd($story->tasks)); // Task - if($config->edition == 'max') $trackItem[] = h::td(getDesignTd($story->designs)); // Design + if(in_array($config->edition, array('max', 'ipd')) $trackItem[] = h::td(getDesignTd($story->designs)); // Design $trackItem[] = h::td(getCaseTd($story->cases)); // Case - if($config->edition == 'max' && helper::hasFeature('devops')) $trackItem[] = h::td(getRevisionTd($story->revisions)); // Revision + if(in_array($config->edition, array('max', 'ipd')) && helper::hasFeature('devops')) $trackItem[] = h::td(getRevisionTd($story->revisions)); // Revision $trackItem[] = h::td(getBugTd($story->bugs)); // Bug @@ -215,9 +215,9 @@ div ) : null, h::th($lang->story->story), h::th($lang->story->tasks), - $config->edition == 'max' ? h::th($lang->story->design) : null, + in_array($config->edition, array('max', 'ipd')) ? h::th($lang->story->design) : null, h::th($lang->story->case), - $config->edition == 'max' && helper::hasFeature('devops') ? h::th($lang->story->repoCommit) : null, + in_array($config->edition, array('max', 'ipd')) && helper::hasFeature('devops') ? h::th($lang->story->repoCommit) : null, h::th($lang->story->bug), ), h::tbody diff --git a/module/product/view/track.html.php b/module/product/view/track.html.php index d651241c88..730fbabda0 100644 --- a/module/product/view/track.html.php +++ b/module/product/view/track.html.php @@ -44,11 +44,11 @@ story->story;?> story->tasks;?> - edition == 'max'):?> + edition == 'max' or $config->edition == 'ipd'):?> story->design;?> story->case;?> - edition == 'max' and helper::hasFeature('devops')):?> + edition == 'max' or $config->edition == 'ipd') and helper::hasFeature('devops')):?> story->repoCommit;?> story->bug;?> @@ -82,7 +82,7 @@ createLink('task', 'view', "taskID=$taskID"), $task->name, '', "title='$task->name'") . '
';?> - edition == 'max'):?> + edition == 'max' or $config->edition == 'ipd'):?> designs as $designID => $design):?> createLink('design', 'view', "designID=$designID"), $design->name, '', "title='$design->name'") . '
';?> @@ -94,7 +94,7 @@ createLink('testcase', 'view', "caseID=$caseID"), $case->title, '', "title='$case->title'") . '
';?> - edition == 'max' and helper::hasFeature('devops')):?> + edition == 'max' or $config->edition == 'ipd') and helper::hasFeature('devops')):?> revisions as $revision => $repoComment):?> realEnd = $plan->realEnd; $item->desc = $plan->desc; $item->setMilestone = $plan->setMilestone; - if($config->edition == 'max' && $executionType == 'stage') + if(in_array($config->edition, array('max', 'ipd')) && $executionType == 'stage') { $item->output = empty($plan->output) ? 0 : explode(',', $plan->output); } diff --git a/module/programplan/view/create.html.php b/module/programplan/view/create.html.php index 52e0e74284..585f625667 100644 --- a/module/programplan/view/create.html.php +++ b/module/programplan/view/create.html.php @@ -100,7 +100,7 @@ '>programplan->realBegan;?> '>programplan->realEnd;?> '>programplan->desc;?> - config->edition == 'max' and $executionType == 'stage'):?> + config->edition == 'max' or $this->config->edition == 'ipd') and $executionType == 'stage'):?> programplan->output;?> actions;?> @@ -129,7 +129,7 @@ > > - config->edition == 'max' and $executionType == 'stage'):?> + config->edition == 'max' or $this->config->edition == 'ipd') and $executionType == 'stage'):?> @@ -166,7 +166,7 @@ > > '>desc, "rows='1' class='form-control autosize'");?> - config->edition == 'max' and $executionType == 'stage'):?> + config->edition == 'max' or $this->config->edition == 'ipd') and $executionType == 'stage'):?> output) ? 0 : explode(',', $plan->output);?> @@ -202,7 +202,7 @@ > > '> - config->edition == 'max' and $executionType == 'stage'):?> + config->edition == 'max' or $this->config->edition == 'ipd') and $executionType == 'stage'):?> @@ -250,7 +250,7 @@ > > '> - config->edition == 'max' and $executionType == 'stage'):?> + config->edition == 'max' or $this->config->edition == 'ipd') and $executionType == 'stage'):?> diff --git a/module/stakeholder/view/browse.html.php b/module/stakeholder/view/browse.html.php index a2d730d3aa..6466e2d27d 100644 --- a/module/stakeholder/view/browse.html.php +++ b/module/stakeholder/view/browse.html.php @@ -78,7 +78,7 @@ id", $stakeholder, 'list', 'chat-line', '', 'iframe', 'yes'); common::printIcon('stakeholder', 'expect', "id=$stakeholder->id", $stakeholder, 'list', 'flag', '', 'iframe', 'yes'); - if($this->config->edition == 'max' and $stakeholder->projectModel == 'waterfall') common::printIcon('stakeholder', 'userIssue', "account=$stakeholder->id", $stakeholder, 'list', 'list-alt', '', 'iframe', 'yes'); + if(in_array($this->config->edition, array('max', 'ipd')) and $stakeholder->projectModel == 'waterfall') common::printIcon('stakeholder', 'userIssue', "account=$stakeholder->id", $stakeholder, 'list', 'list-alt', '', 'iframe', 'yes'); common::printIcon('stakeholder', 'edit', "id=$stakeholder->id", $stakeholder, 'list', '', '', '', ''); $deleteClass = common::hasPriv('stakeholder', 'delete') ? 'btn' : 'btn disabled'; echo html::a($this->createLink('stakeholder', 'delete', "id=$stakeholder->id"), '', 'hiddenwin', "title='{$lang->stakeholder->delete}' class='{$deleteClass}'");