* Code for task#46521.

This commit is contained in:
xieqiyu
2021-12-30 08:47:06 +08:00
parent d5d09b1e93
commit 2b7249da7a
6 changed files with 13 additions and 0 deletions
+1
View File
@@ -53,6 +53,7 @@ $lang->action->confirmHideAll = 'Do you want to hide all the records?';
$lang->action->needEdit = '%s that you want to restore. Please edit it.';
$lang->action->historyEdit = 'The history EditBy cannot be empty.';
$lang->action->noDynamic = 'No dynamics. ';
$lang->action->undeletedTips = 'This data did not participate in the merging process during the version upgrade process, so restore is not supported.';
$lang->action->history = new stdclass();
$lang->action->history->action = 'Link';
+1
View File
@@ -53,6 +53,7 @@ $lang->action->confirmHideAll = '您确定要全部隐藏这些记录吗?';
$lang->action->needEdit = '要还原%s的名称或代号已经存在,请编辑更改。';
$lang->action->historyEdit = '历史记录编辑不能为空。';
$lang->action->noDynamic = '暂时没有动态。';
$lang->action->undeletedTips = '该数据在版本升级过程中未参与数据归并流程,不支持还原。';
$lang->action->history = new stdclass();
$lang->action->history->action = '关联日志';
+7
View File
@@ -1425,6 +1425,13 @@ class actionModel extends model
{
$action = $this->getById($actionID);
if($action->action != 'deleted') return;
if($action->objectType == 'execution')
{
$execution = $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->eq($action->objectID)->fetch();
if($execution->deleted and empty($execution->project)) return print(js::error($this->lang->action->undeletedTips));
}
if($action->objectType == 'product')
{
$product = $this->dao->select('id,name,code,acl')->from(TABLE_PRODUCT)->where('id')->eq($action->objectID)->fetch();
+1
View File
@@ -126,6 +126,7 @@ $lang->upgrade->mergeRepoTips = "Merge the selected version library under t
$lang->upgrade->needBuild4Add = 'Full text retrieval has been added in this upgrade. Need create index. Please go [Admin->System->BuildIndex] page to build index.';
$lang->upgrade->errorEngineInnodb = 'Your MySQL does not support InnoDB data table engine. Please modify it to MyISAM and try again.';
$lang->upgrade->duplicateProject = "Project name in the same program cannot be duplicate. Please adjust the duplicate names.";
$lang->upgrade->upgradeTips = "Historically deleted data cannot be upgraded, and restoration is not supported after the upgrade. Please be aware.";
$lang->upgrade->projectType['project'] = "Upgrade the historical {$lang->projectCommon} as a project";
$lang->upgrade->projectType['execution'] = "Upgrade the historical {$lang->projectCommon} as an execution";
+1
View File
@@ -126,6 +126,7 @@ $lang->upgrade->mergeRepoTips = "将选中的版本库归并到所选产品
$lang->upgrade->needBuild4Add = '本次升级需要创建索引。请到 [后台->系统->重建索引] 页面,重新创建索引。';
$lang->upgrade->errorEngineInnodb = '您当前的数据库不支持使用InnoDB数据表引擎,请修改为MyISAM后重试。';
$lang->upgrade->duplicateProject = "同一个项目集内项目名称不能重复,请调整重名的项目名称";
$lang->upgrade->upgradeTips = "历史删除数据不参与升级,升级后将不支持还原,请知悉";
$lang->upgrade->projectType['project'] = "把历史的{$lang->projectCommon}作为项目升级";
$lang->upgrade->projectType['execution'] = "把历史的{$lang->projectCommon}作为执行升级";
+2
View File
@@ -46,6 +46,7 @@
<hr/>
<div class='panel-footer text-center'>
<?php echo html::submitButton($lang->upgrade->start . (strpos($this->app->getClientLang(), 'zh') === false ? ' ' : '') . $lang->upgrade->common);?>
<div id='upgradeTips' class='text-danger hidden'><?php echo $lang->upgrade->upgradeTips;?></div>
</div>
</form>
</div>
@@ -57,6 +58,7 @@ $(function()
$('[name=mode]').change(function()
{
$('#selectedModeTips').html(selectedModeTips[$(this).val()]);
$(this).val() == 'new' ? $('#upgradeTips').removeClass('hidden') : $('#upgradeTips').addClass('hidden');
})
})
</script>