Merge branch 'sprint/zentaopms240_daitingting_69246' into 'sprint/zentaopms240'
* Finish task #69246,#69247. See merge request easycorp/zentaopms!5423
This commit is contained in:
@@ -642,11 +642,14 @@ class custom extends control
|
||||
|
||||
$this->app->loadLang('upgrade');
|
||||
|
||||
$this->view->title = $this->lang->custom->mode;
|
||||
$this->view->position[] = $this->lang->custom->common;
|
||||
$this->view->position[] = $this->view->title;
|
||||
$this->view->mode = $mode;
|
||||
$this->view->program = $this->loadModel('program')->getTopPairs('', '', true);
|
||||
$hasMoreData = $this->custom->hasMoreData() ? 'yes' : 'no';
|
||||
$this->lang->custom->changeModeContentTips['lean'] = $this->lang->custom->hasMoreData[$hasMoreData];
|
||||
|
||||
$this->view->title = $this->lang->custom->mode;
|
||||
$this->view->position[] = $this->lang->custom->common;
|
||||
$this->view->position[] = $this->view->title;
|
||||
$this->view->mode = $mode;
|
||||
$this->view->program = $this->loadModel('program')->getTopPairs('', '', true);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -1,15 +1,40 @@
|
||||
$(function()
|
||||
{
|
||||
$('#modeTab').addClass('btn-active-text');
|
||||
$('[name=mode]').change(function()
|
||||
|
||||
$('[name=mode]').change(function(){$("#selectDefaultProgram").toggle($(this).val() == 'lean'); });
|
||||
|
||||
$(document).on('click', '#submit', function()
|
||||
{
|
||||
if($(this).val() == 'lean')
|
||||
if(mode == $('[name=mode]:checked').val()) return false;
|
||||
|
||||
if($(this).hasClass('canSubmit'))
|
||||
{
|
||||
$("#selectDefaultProgram").removeClass('hidden');
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#selectDefaultProgram").addClass('hidden');
|
||||
$(this).removeClass('canSubmit');
|
||||
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');
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-confirm', function()
|
||||
{
|
||||
$('#submit').click();
|
||||
});
|
||||
|
||||
$('#confirmModal').on('hide.zui.modal', function()
|
||||
{
|
||||
$('#submit').removeClass('canSubmit');
|
||||
})
|
||||
})
|
||||
|
||||
@@ -240,11 +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->changeClassicTip = 'The Program module will be hidden, if you switch to the classic mode.';
|
||||
$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->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->changeModeTitleTips['new'] = 'Are you sure you want to switch to the new mode?';
|
||||
$lang->custom->changeModeTitleTips['lean'] = 'Are you sure you want to switch to the lean mode?';
|
||||
$lang->custom->changeModeContentTips['new'] = 'The new mode is suitable for medium and large R&D teams. After switching the new mode, the system will enable functions such as program sets.';
|
||||
|
||||
$lang->custom->hasMoreData['yes'] = 'After switching to lean 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 lean mode, the system will close functions such as program sets, waterfall projects, asset libraries and user requirements.';
|
||||
|
||||
$lang->custom->scoreStatus[1] = 'On';
|
||||
$lang->custom->scoreStatus[0] = 'Off';
|
||||
|
||||
@@ -240,11 +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->changeClassicTip = 'The Program module will be hidden, if you switch to the classic mode.';
|
||||
$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->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->changeModeTitleTips['new'] = 'Are you sure you want to switch to the new mode?';
|
||||
$lang->custom->changeModeTitleTips['lean'] = 'Are you sure you want to switch to the lean mode?';
|
||||
$lang->custom->changeModeContentTips['new'] = 'The new mode is suitable for medium and large R&D teams. After switching the new mode, the system will enable functions such as program sets.';
|
||||
|
||||
$lang->custom->hasMoreData['yes'] = 'After switching to lean 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 lean mode, the system will close functions such as program sets, waterfall projects, asset libraries and user requirements.';
|
||||
|
||||
$lang->custom->scoreStatus[1] = 'On';
|
||||
$lang->custom->scoreStatus[0] = 'Off';
|
||||
|
||||
@@ -240,11 +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->changeClassicTip = 'The Program module will be hidden, if you switch to the classic mode.';
|
||||
$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->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->changeModeTitleTips['new'] = 'Are you sure you want to switch to the new mode?';
|
||||
$lang->custom->changeModeTitleTips['lean'] = 'Are you sure you want to switch to the lean mode?';
|
||||
$lang->custom->changeModeContentTips['new'] = 'The new mode is suitable for medium and large R&D teams. After switching the new mode, the system will enable functions such as program sets.';
|
||||
|
||||
$lang->custom->hasMoreData['yes'] = 'After switching to lean 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 lean mode, the system will close functions such as program sets, waterfall projects, asset libraries and user requirements.';
|
||||
|
||||
$lang->custom->scoreStatus[1] = 'On';
|
||||
$lang->custom->scoreStatus[0] = 'Off';
|
||||
|
||||
@@ -240,11 +240,17 @@ $lang->custom->sprintConceptList[1] = '项目 产品 冲刺';
|
||||
|
||||
$lang->custom->workingList['full'] = '完整研发管理工具';
|
||||
|
||||
$lang->custom->menuTip = '点击显示或隐藏导航条目,拖拽来更改显示顺序。';
|
||||
$lang->custom->saveFail = '保存失败!';
|
||||
$lang->custom->page = '页面';
|
||||
$lang->custom->changeClassicTip = '切换为老版本的习惯后,系统将取消项目集功能。';
|
||||
$lang->custom->changeModeTips = '历史删除数据不参与数据归并流程,切换模式后将不支持还原,请知悉';
|
||||
$lang->custom->menuTip = '点击显示或隐藏导航条目,拖拽来更改显示顺序。';
|
||||
$lang->custom->saveFail = '保存失败!';
|
||||
$lang->custom->page = '页面';
|
||||
$lang->custom->changeModeTips = '历史删除数据不参与数据归并流程,切换模式后将不支持还原,请知悉';
|
||||
|
||||
$lang->custom->changeModeTitleTips['new'] = '您确定要切换到综合模式吗?';
|
||||
$lang->custom->changeModeTitleTips['lean'] = '您确定要切换到迅捷模式吗?';
|
||||
$lang->custom->changeModeContentTips['new'] = '综合模式适用于中大型研发团队,切换综合模式后,系统将启用项目集等功能。';
|
||||
|
||||
$lang->custom->hasMoreData['yes'] = '切换到迅捷模式后,系统将关闭项目集功能,项目集的相关功能将会被隐藏。';
|
||||
$lang->custom->hasMoreData['no'] = '切换到迅捷模式后,系统将关闭项目集、瀑布项目、资产库、用户需求等功能。';
|
||||
|
||||
$lang->custom->scoreStatus[1] = '开启';
|
||||
$lang->custom->scoreStatus[0] = '关闭';
|
||||
|
||||
@@ -816,4 +816,19 @@ class customModel extends model
|
||||
$this->dao->update(TABLE_BLOCK)->set("`title` = REPLACE(`title`, '{$commonList[$oldIndex]}', '{$commonList[$newIndex]}')")->where('source')->eq('product')->exec();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for waterfall, assetLib, URStory data in new mode.
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function hasMoreData()
|
||||
{
|
||||
$waterfallCount = $this->dao->select('COUNT(*) AS waterfallCount')->from(TABLE_PROJECT)->where('model')->eq('waterfall')->andWhere('deleted')->ne('0')->fetch('waterfallCount');
|
||||
$assetLibCount = $this->dao->select('COUNT(*) AS assetLibCount')->from(TABLE_ASSETLIB)->where('deleted')->ne('0')->fetch('assetLibCount');
|
||||
$URStoryCount = $this->dao->select('COUNT(*) AS URStoryCount')->from(TABLE_STORY)->where('type')->eq('requirement')->andWhere('deleted')->ne('0')->fetch('URStoryCount');
|
||||
|
||||
return $waterfallCount || $assetLibCount || $URStoryCount;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,8 +11,11 @@
|
||||
*/
|
||||
?>
|
||||
<?php include 'header.html.php';?>
|
||||
<?php js::set('changeModeTitleTips', $lang->custom->changeModeTitleTips);?>
|
||||
<?php js::set('changeModeContentTips', $lang->custom->changeModeContentTips);?>
|
||||
<?php js::set('mode', $mode);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<form class="load-indicator main-form" method='post'>
|
||||
<form id='modeForm' class="load-indicator main-form" method='post'>
|
||||
<div class='main-header'>
|
||||
<div class='heading'>
|
||||
<strong><?php echo $lang->custom->mode?></strong>
|
||||
@@ -28,18 +31,37 @@
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $class = $mode == 'new' ? "class='hidden'" : "";?>
|
||||
<?php $class = $mode == 'new' ? "class='hide'" : "";?>
|
||||
<tr id="selectDefaultProgram" <?php echo $class;?>>
|
||||
<td></td>
|
||||
<td><?php echo html::select('program', $program, '', "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<?php echo html::submitButton($lang->custom->switch);?>
|
||||
</td>
|
||||
<td><?php echo html::submitButton($lang->custom->switch);?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class='modal fade' id='confirmModal'>
|
||||
<div class='modal-dialog'>
|
||||
<div class='modal-content'>
|
||||
<div class='modal-header'>
|
||||
<button type='button' class='close' data-dismiss='modal'><span aria-hidden='true'>×</span><span class='sr-only'><?php echo $this->lang->close;?></span></button>
|
||||
<h4 class='modal-title'></h4>
|
||||
</div>
|
||||
<div class='modal-body'></div>
|
||||
<div class='modal-footer'>
|
||||
<button type='button' class='btn btn-primary btn-wide btn-confirm'><?php echo $lang->confirm;?></button>
|
||||
<button type='button' class='btn btn-default btn-wide' data-dismiss='modal'><?php echo $this->lang->cancel;?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
#confirmModal .modal-header {border-bottom: 0px}
|
||||
#confirmModal .modal-header h4.modal-title{font-weight: 700}
|
||||
#confirmModal .modal-footer {border-top: 0px; text-align: center}
|
||||
</style>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user