* Finish task #74180.

This commit is contained in:
daitingting
2022-11-03 01:40:17 +00:00
parent 4f3915a122
commit 998866a374
8 changed files with 140 additions and 103 deletions
-9
View File
@@ -646,15 +646,6 @@ class custom extends control
$this->app->loadLang('upgrade');
$this->lang->custom->changeModeContentTips['light'] = $this->lang->custom->hasMoreData['yes'];
$counts = $this->custom->getCounts();
foreach($counts as $function => $count)
{
if($count) unset($this->lang->custom->needClosedFunctions[$function]);
}
if(!empty($this->lang->custom->needClosedFunctions)) $this->lang->custom->changeModeContentTips['light'] = sprintf($this->lang->custom->hasMoreData['no'], implode($this->lang->comma, $this->lang->custom->needClosedFunctions));
$this->view->title = $this->lang->custom->mode;
$this->view->position[] = $this->lang->custom->common;
$this->view->position[] = $this->view->title;
+9 -27
View File
@@ -12,36 +12,18 @@ $(function()
$(document).on('click', '#submit', function()
{
if(mode == $('[name=mode]:checked').val()) return false;
var selectedMode = $('[name=mode]:checked').val();
if($(this).hasClass('canSubmit'))
if(mode == selectedMode) return false;
bootbox.confirm(changeModeTips, function(result)
{
$(this).removeClass('canSubmit');
$('#confirmModal').modal('hide');
return true;
}
$(this).addClass('canSubmit');
var $mode = $('[name=mode]:checked').val();
var confirmTitle = changeModeTitleTips[$mode];
var confirmContent = changeModeContentTips[$mode]
$('#confirmModal .modal-title').html(confirmTitle);
$('#confirmModal .modal-body').html(confirmContent);
$('#confirmModal').modal('show');
if(result)
{
$('#modeForm').submit();
}
});
return false;
});
$(document).on('click', '.btn-confirm', function()
{
$('#submit').click();
});
$('#confirmModal').on('hide.zui.modal', function()
{
$('#submit').removeClass('canSubmit');
});
})
+9 -9
View File
@@ -240,17 +240,17 @@ $lang->custom->sprintConceptList[1] = 'Program Product Sprint';
$lang->custom->workingList['full'] = 'Full Management of Dev';
$lang->custom->menuTip = 'Click to show/hide navigation bar. Drag to swtich display order.';
$lang->custom->saveFail = 'Failed to save!';
$lang->custom->page = ' Page';
$lang->custom->changeModeTips = 'Historical deleted data does not participate in the data merging process. After switching the mode, it will not support restoration. Please know.';
$lang->custom->menuTip = 'Click to show/hide navigation bar. Drag to swtich display order.';
$lang->custom->saveFail = 'Failed to save!';
$lang->custom->page = ' Page';
$lang->custom->currentModeTips = 'You are currently using %s, you can switch to the %s.';
$lang->custom->changeModeTips = 'Please double confirm to switch to %s Mode.';
$lang->custom->changeModeTitleTips['ALM'] = 'Please double confirm to switch to ALM Mode.';
$lang->custom->changeModeTitleTips['light'] = 'Please double confirm to switch to Light Mode.';
$lang->custom->changeModeContentTips['ALM'] = 'The ALM mode is suitable for medium and large R&D teams. After switching the ALM mode, the system will enable functions such as program sets.';
$lang->custom->modeList['light'] = 'Light Mode';
$lang->custom->modeList['ALM'] = 'ALM Mode';
$lang->custom->hasMoreData['yes'] = 'After switching to light mode, the system will close the program function, and the related functions of the program will be hidden.';
$lang->custom->hasMoreData['no'] = 'After switching to light mode, the system will close functions such as program sets, %s.';
$lang->custom->modeIntrodutionList['light'] = 'Light Mode suitable for small software development teams.';
$lang->custom->modeIntrodutionList['ALM'] = 'ALM Mode suitable for medium and large software R&D teams';
$lang->custom->needClosedFunctions['waterfall'] = 'Waterfall';
$lang->custom->needClosedFunctions['URStory'] = 'User Story';
+9 -9
View File
@@ -240,17 +240,17 @@ $lang->custom->sprintConceptList[1] = 'Program Product Sprint';
$lang->custom->workingList['full'] = 'Application Lifecycle Management';
$lang->custom->menuTip = 'Click to show/hide the menu. Drag to switch display order.';
$lang->custom->saveFail = 'Failed to save!';
$lang->custom->page = ' Page';
$lang->custom->changeModeTips = 'Historical deleted data does not participate in the data merging process. After switching the mode, it will not support restoration. Please know.';
$lang->custom->menuTip = 'Click to show/hide the menu. Drag to switch display order.';
$lang->custom->saveFail = 'Failed to save!';
$lang->custom->page = ' Page';
$lang->custom->currentModeTips = 'You are currently using %s, you can switch to the %s.';
$lang->custom->changeModeTips = 'Please double confirm to switch to %s Mode.';
$lang->custom->changeModeTitleTips['ALM'] = 'Please double confirm to switch to ALM Mode.';
$lang->custom->changeModeTitleTips['light'] = 'Please double confirm to switch to Light Mode.';
$lang->custom->changeModeContentTips['ALM'] = 'The ALM mode is suitable for medium and large R&D teams. After switching the ALM mode, the system will enable functions such as program sets.';
$lang->custom->modeList['light'] = 'Light Mode';
$lang->custom->modeList['ALM'] = 'ALM Mode';
$lang->custom->hasMoreData['yes'] = 'After switching to light mode, the system will close the program function, and the related functions of the program will be hidden.';
$lang->custom->hasMoreData['no'] = 'After switching to light mode, the system will close functions such as program sets, %s.';
$lang->custom->modeIntrodutionList['light'] = 'Light Mode suitable for small software development teams.';
$lang->custom->modeIntrodutionList['ALM'] = 'ALM Mode suitable for medium and large software R&D teams';
$lang->custom->needClosedFunctions['waterfall'] = 'Waterfall';
$lang->custom->needClosedFunctions['URStory'] = 'User Story';
+9 -9
View File
@@ -240,17 +240,17 @@ $lang->custom->sprintConceptList[1] = 'Program Product Sprint';
$lang->custom->workingList['full'] = 'Application Lifecycle Management';
$lang->custom->menuTip = "Cliquez pour montrer/cacher le menu. Déplacez pour changer l'ordre d'affichage.";
$lang->custom->saveFail = 'Echec de la sauvegarde !';
$lang->custom->page = ' Page';
$lang->custom->changeModeTips = 'Historical deleted data does not participate in the data merging process. After switching the mode, it will not support restoration. Please know.';
$lang->custom->menuTip = "Cliquez pour montrer/cacher le menu. Déplacez pour changer l'ordre d'affichage.";
$lang->custom->saveFail = 'Echec de la sauvegarde !';
$lang->custom->page = ' Page';
$lang->custom->currentModeTips = 'You are currently using %s, you can switch to the %s.';
$lang->custom->changeModeTips = 'Please double confirm to switch to %s Mode.';
$lang->custom->changeModeTitleTips['ALM'] = 'Please double confirm to switch to ALM Mode.';
$lang->custom->changeModeTitleTips['light'] = 'Please double confirm to switch to Light Mode.';
$lang->custom->changeModeContentTips['ALM'] = 'The ALM mode is suitable for medium and large R&D teams. After switching the ALM mode, the system will enable functions such as program sets.';
$lang->custom->modeList['light'] = 'Light Mode';
$lang->custom->modeList['ALM'] = 'ALM Mode';
$lang->custom->hasMoreData['yes'] = 'After switching to light mode, the system will close the program function, and the related functions of the program will be hidden.';
$lang->custom->hasMoreData['no'] = 'After switching to light mode, the system will close functions such as program sets, %s.';
$lang->custom->modeIntrodutionList['light'] = 'Light Mode suitable for small software development teams.';
$lang->custom->modeIntrodutionList['ALM'] = 'ALM Mode suitable for medium and large software R&D teams';
$lang->custom->needClosedFunctions['waterfall'] = 'Waterfall';
$lang->custom->needClosedFunctions['URStory'] = 'User Story';
+9 -9
View File
@@ -241,17 +241,17 @@ $lang->custom->sprintConceptList[1] = '项目 产品 冲刺';
$lang->custom->workingList['full'] = '完整研发管理工具';
$lang->custom->menuTip = '点击显示或隐藏导航条目,拖拽来更改显示顺序。';
$lang->custom->saveFail = '保存失败!';
$lang->custom->page = '页面';
$lang->custom->changeModeTips = '历史删除数据不参与数据归并流程,切换模式后将不支持还原,请知悉';
$lang->custom->menuTip = '点击显示或隐藏导航条目,拖拽来更改显示顺序。';
$lang->custom->saveFail = '保存失败!';
$lang->custom->page = '页面';
$lang->custom->currentModeTips = '您当前使用的是%s, 您可以切换到%s';
$lang->custom->changeModeTips = '您确定要切换到%s吗?';
$lang->custom->changeModeTitleTips['ALM'] = '您确定要切换到全生命周期管理模式吗?';
$lang->custom->changeModeTitleTips['light'] = '您确定要切换到轻量管理模式吗?';
$lang->custom->changeModeContentTips['ALM'] = '全生命周期管理模式适用于中大型研发团队,切换全生命周期管理模式后,系统将启用项目集等功能。';
$lang->custom->modeList['light'] = '轻量级管理模式';
$lang->custom->modeList['ALM'] = '全生命周期管理模式';
$lang->custom->hasMoreData['yes'] = '切换到轻量管理模式后,系统将关闭项目集功能,项目集的相关功能将会被隐藏。';
$lang->custom->hasMoreData['no'] = '切换到轻量管理模式后,系统将关闭项目集,%s等功能。';
$lang->custom->modeIntrodutionList['light'] = '轻量级管理模式适用于小型软件研发团队';
$lang->custom->modeIntrodutionList['ALM'] = '全生命周期管理模式适用于中大型软件研发团队';
$lang->custom->needClosedFunctions['waterfall'] = '瀑布项目';
$lang->custom->needClosedFunctions['URStory'] = '用户需求';
-16
View File
@@ -817,22 +817,6 @@ class customModel extends model
}
}
/**
* Get waterfall, assetLib, URStory counts.
*
* @access public
* @return array
*/
public function getCounts()
{
$counts = array();
$counts['waterfall'] = $this->dao->select('COUNT(*) AS waterfallCount')->from(TABLE_PROJECT)->where('model')->eq('waterfall')->andWhere('deleted')->eq('0')->fetch('waterfallCount');
$counts['URStory'] = $this->dao->select('COUNT(*) AS URStoryCount')->from(TABLE_STORY)->where('type')->eq('requirement')->andWhere('deleted')->eq('0')->fetch('URStoryCount');
if($this->config->edition == 'max') $counts['assetLib'] = $this->dao->select('COUNT(*) AS assetLibCount')->from(TABLE_ASSETLIB)->where('deleted')->eq('0')->fetch('assetLibCount');
return $counts;
}
/**
* process project priv within a program set.
*
+95 -15
View File
@@ -11,26 +11,107 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('changeModeTitleTips', $lang->custom->changeModeTitleTips);?>
<?php js::set('changeModeContentTips', $lang->custom->changeModeContentTips);?>
<?php js::set('changeModeTips', sprintf($lang->custom->changeModeTips, $lang->custom->modeList[$mode == 'light' ? 'ALM' : 'light']));?>
<?php js::set('mode', $mode);?>
<div id='mainContent' class='main-content'>
<form id='modeForm' class="load-indicator main-form form-ajax" method='post'>
<div class='main-header'>
<div class='heading'>
<strong><?php echo $lang->custom->mode?></strong>
</div>
<h2><?php echo $lang->custom->mode;?></h2>
</div>
<table class='table table-form'>
<table class='table table-form w-700px'>
<tr>
<th class='text-top w-120px'><?php echo $lang->custom->mode;?></th>
<td class='w-300px'>
<p>
<label class="radio-inline"><input type="radio" name="mode" value="light" <?php echo $mode == 'light'? "checked='checked'" : '';?> id="modelight"><?php echo $lang->upgrade->to18Mode['light'];?></label>
<label class="radio-inline"><input type="radio" name="mode" value="ALM" <?php echo $mode == 'ALM'? "checked='checked'" : '';?> id="modeALM"><?php echo $lang->upgrade->to18Mode['ALM'];?></label>
</p>
<td colspan='2'><?php echo sprintf($lang->custom->currentModeTips, $lang->custom->modeList[$mode], $lang->custom->modeList[$mode == 'light' ? 'ALM' : 'light']);?> </td>
</tr>
<tr>
<td>
<label class='radio-inline'><input type='radio' name='mode' value='light' <?php echo $mode == 'light'? "checked='checked'" : '';?> id="modelight"><strong><?php echo $lang->upgrade->to18Mode['light'];?></strong></label>
<p class='with-padding text-muted'><?php echo $lang->custom->modeIntrodutionList['light'];?></p>
</td>
<td>
<label class='radio-inline'><input type='radio' name='mode' value='ALM' <?php echo $mode == 'ALM'? "checked='checked'" : '';?> id="modeALM"><strong><?php echo $lang->upgrade->to18Mode['ALM'];?></strong></label>
<p class='with-padding text-muted'><?php echo $lang->custom->modeIntrodutionList['ALM'];?></p>
</td>
</tr>
<tr>
<td colspan='2'>
<table class='table table-bordered'>
<thead>
<tr>
<th><?php echo $this->lang->upgrade->mode;?></th>
<th class="text-center"><?php echo $this->lang->upgrade->to18Mode['light'];?></th>
<th class="text-center"><?php echo $this->lang->upgrade->to18Mode['ALM'];?></th>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo $this->lang->upgrade->program;?></td>
<td class="text-center"><i class="icon text-red text-red icon-close"></i></td>
<td class="text-center"><i class="icon text-success text-success icon-check"></i></td>
</tr>
<tr>
<td><?php echo $this->lang->upgrade->productRR;?></td>
<td class="text-center"><i class="icon text-success icon-check"></i></td>
<td class="text-center"><i class="icon text-success icon-check"></i></td>
</tr>
<tr>
<td><?php echo $this->lang->upgrade->productUR;?></td>
<td class="text-center"><i class="icon text-red icon-close"></i></td>
<td class="text-center"><i class="icon text-success icon-check"></i></td>
</tr>
<tr>
<td><?php echo $this->lang->upgrade->productLine;?></td>
<td class="text-center"><i class="icon text-red icon-close"></i></td>
<td class="text-center"><i class="icon text-success icon-check"></i></td>
</tr>
<tr>
<td><?php echo $this->lang->upgrade->projectScrum;?></td>
<td class="text-center"><i class="icon text-success icon-check"></i></td>
<td class="text-center"><i class="icon text-success icon-check"></i></td>
</tr>
<?php if($config->edition == 'max'):?>
<tr>
<td><?php echo $this->lang->upgrade->scrumDetail;?></td>
<td class="text-center"><i class="icon text-red icon-close"></i></td>
<td class="text-center"><i class="icon text-success icon-check"></i></td>
</tr>
<?php endif;?>
<tr>
<td><?php echo $this->lang->upgrade->projectWaterfall;?></td>
<td class="text-center"><i class="icon text-red icon-close"></i></td>
<td class="text-center"><i class="icon text-success icon-check"></i></td>
</tr>
<tr>
<td><?php echo $this->lang->upgrade->projectKanban;?></td>
<td class="text-center"><i class="icon text-success icon-check"></i></td>
<td class="text-center"><i class="icon text-success icon-check"></i></td>
</tr>
<tr>
<td><?php echo $this->lang->upgrade->execution;?></td>
<td class="text-center"><i class="icon text-success icon-check"></i></td>
<td class="text-center"><i class="icon text-success icon-check"></i></td>
</tr>
<?php if($config->edition == 'max'):?>
<tr>
<td><?php echo $this->lang->upgrade->assetlib;?></td>
<td class="text-center"><i class="icon text-red icon-close"></i></td>
<td class="text-center"><i class="icon text-success icon-check"></i></td>
</tr>
<?php endif;?>
<?php if($config->edition == 'biz' or $config->edition == 'max'):?>
<tr>
<td><?php echo $this->lang->upgrade->oa;?></td>
<td class="text-center"><i class="icon text-success icon-check"></i></td>
<td class="text-center"><i class="icon text-success icon-check"></i></td>
</tr>
<?php endif;?>
<tr>
<td><?php echo $this->lang->upgrade->vision;?></td>
<td class="text-center"><i class="icon text-success icon-check"></i></td>
<td class="text-center"><i class="icon text-success icon-check"></i></td>
</tr>
</tbody>
</table>
</td>
<td></td>
</tr>
<?php if($program):?>
<tr class='hide'>
@@ -44,8 +125,7 @@
</tr>
<?php endif;?>
<tr>
<td></td>
<td><?php echo html::submitButton($lang->custom->switch, 'disabled');?></td>
<td colspan='2'><?php echo html::submitButton($lang->custom->switch, 'disabled');?></td>
</tr>
</table>
</form>