diff --git a/module/action/lang/de.php b/module/action/lang/de.php
index 25d8cad136..62320eca61 100644
--- a/module/action/lang/de.php
+++ b/module/action/lang/de.php
@@ -330,6 +330,9 @@ $lang->action->desc->releaseddoc = '$date, $actor released action->desc->convertdoc = '$date, $actor complete document conversion $extra.' . "\n";
+/* Describe the operation records of template conversion. */
+$lang->action->desc->convertdoctemplate = '$date, $actor complete template conversion $extra.' . "\n";
+
/* This parameter describes historical operations that are performed when a document is collected or uncollected. */
$lang->action->desc->collected = '$date, $actor collected $extra.' . "\n";
$lang->action->desc->uncollected = '$date, $actor uncollected $extra.' . "\n";
@@ -551,6 +554,7 @@ $lang->action->label->deletesnapshot = 'deleted snapshot';
$lang->action->label->saveddraft = 'save draft';
$lang->action->label->releaseddoc = 'released';
$lang->action->label->convertdoc = 'Convert doc';
+$lang->action->label->convertdoctemplate = 'Convert template';
$lang->action->label->collected = 'collected';
$lang->action->label->uncollected = 'uncollected';
$lang->action->label->online = 'online';
diff --git a/module/action/lang/en.php b/module/action/lang/en.php
index 19f5160821..fa05b5f3d2 100755
--- a/module/action/lang/en.php
+++ b/module/action/lang/en.php
@@ -330,6 +330,9 @@ $lang->action->desc->releaseddoc = '$date, $actor released action->desc->convertdoc = '$date, $actor complete document conversion $extra.' . "\n";
+/* Describe the operation records of template conversion. */
+$lang->action->desc->convertdoctemplate = '$date, $actor complete template conversion $extra.' . "\n";
+
/* This parameter describes historical operations that are performed when a document is collected or uncollected. */
$lang->action->desc->collected = '$date, $actor collected $extra.' . "\n";
$lang->action->desc->uncollected = '$date, $actor uncollected $extra.' . "\n";
@@ -551,6 +554,7 @@ $lang->action->label->deletesnapshot = 'deleted snapshot';
$lang->action->label->saveddraft = 'save draft';
$lang->action->label->releaseddoc = 'released';
$lang->action->label->convertdoc = 'Convert doc';
+$lang->action->label->convertdoctemplate = 'Convert template';
$lang->action->label->collected = 'collected';
$lang->action->label->uncollected = 'uncollected';
$lang->action->label->online = 'online';
diff --git a/module/action/lang/fr.php b/module/action/lang/fr.php
index 899eee57bd..d46e8c8724 100644
--- a/module/action/lang/fr.php
+++ b/module/action/lang/fr.php
@@ -330,6 +330,9 @@ $lang->action->desc->releaseddoc = '$date, $actor released action->desc->convertdoc = '$date, $actor complete document conversion $extra.' . "\n";
+/* Describe the operation records of template conversion. */
+$lang->action->desc->convertdoctemplate = '$date, $actor complete template conversion $extra.' . "\n";
+
/* This parameter describes historical operations that are performed when a document is collected or uncollected. */
$lang->action->desc->collected = '$date, $actor collected $extra.' . "\n";
$lang->action->desc->uncollected = '$date, $actor uncollected $extra.' . "\n";
@@ -551,6 +554,7 @@ $lang->action->label->deletesnapshot = 'deleted snapshot';
$lang->action->label->saveddraft = 'save draft';
$lang->action->label->releaseddoc = 'released';
$lang->action->label->convertdoc = 'Convert doc';
+$lang->action->label->convertdoctemplate = 'Convert template';
$lang->action->label->collected = 'collected';
$lang->action->label->uncollected = 'uncollected';
$lang->action->label->online = 'online';
diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php
index 4902910526..bd2ec0a289 100755
--- a/module/action/lang/zh-cn.php
+++ b/module/action/lang/zh-cn.php
@@ -330,6 +330,9 @@ $lang->action->desc->releaseddoc = '$date, 由 $actor 发布 action->desc->convertdoc = '$date, 由 $actor 完成文档转换 $extra。' . "\n";
+/* 用来描述文档模板转换的操作记录。*/
+$lang->action->desc->convertdoctemplate = '$date, 由 $actor 完成文档模板转换 $extra。' . "\n";
+
/* 用来描述文档收藏或取消收藏时的历史操作记录。*/
$lang->action->desc->collected = '$date, 由 $actor 收藏 $extra。' . "\n";
$lang->action->desc->uncollected = '$date, 由 $actor 取消收藏 $extra。' . "\n";
@@ -551,6 +554,7 @@ $lang->action->label->deletesnapshot = '编辑了快照';
$lang->action->label->saveddraft = '存为草稿';
$lang->action->label->releaseddoc = '发布了';
$lang->action->label->convertdoc = '转为新文档';
+$lang->action->label->convertdoctemplate = '转为新文档模板';
$lang->action->label->collected = '收藏了';
$lang->action->label->uncollected = '取消收藏了';
$lang->action->label->online = '上架了';
diff --git a/module/doc/lang/de.php b/module/doc/lang/de.php
index d7b02c95de..07a82cbe5e 100644
--- a/module/doc/lang/de.php
+++ b/module/doc/lang/de.php
@@ -527,6 +527,7 @@ $lang->doc->docConvertComment = "This document has been converted to t
$lang->doc->previewNotAvailable = 'Preview function is not available. Please visit the Kanban board to view the document %s.';
$lang->doc->hocuspocusConnect = 'The collaborative editing service is connected.';
$lang->doc->hocuspocusDisconnect = 'The collaborative editing service is disconnected. Edits will be synchronized after reconnection.';
+$lang->doc->docTemplateConvertComment = 'The template has been converted to the new editor format. Switch to version %s to view the template before conversion.';
$lang->doc->noticeAcl['lib']['product']['default'] = "Users who can access the selected {$lang->productCommon} can access it.";
$lang->doc->noticeAcl['lib']['product']['custom'] = "Users who can access the selected {$lang->productCommon} or users in the whiltelist can access it.";
diff --git a/module/doc/lang/en.php b/module/doc/lang/en.php
index 1d7f05929f..3c456fd980 100644
--- a/module/doc/lang/en.php
+++ b/module/doc/lang/en.php
@@ -527,6 +527,7 @@ $lang->doc->docConvertComment = "This document has been converted to t
$lang->doc->previewNotAvailable = 'Preview function is not available. Please visit the Kanban board to view the document %s.';
$lang->doc->hocuspocusConnect = 'The collaborative editing service is connected.';
$lang->doc->hocuspocusDisconnect = 'The collaborative editing service is disconnected. Edits will be synchronized after reconnection.';
+$lang->doc->docTemplateConvertComment = 'The template has been converted to the new editor format. Switch to version %s to view the template before conversion.';
$lang->doc->noticeAcl['lib']['product']['default'] = "Users who can access the selected {$lang->productCommon} can access it.";
$lang->doc->noticeAcl['lib']['product']['custom'] = "Users who can access the selected {$lang->productCommon} or users in the whiltelist can access it.";
diff --git a/module/doc/lang/fr.php b/module/doc/lang/fr.php
index 70eeee3428..3b55f4b804 100644
--- a/module/doc/lang/fr.php
+++ b/module/doc/lang/fr.php
@@ -527,6 +527,7 @@ $lang->doc->docConvertComment = "This document has been converted to t
$lang->doc->previewNotAvailable = 'Preview function is not available. Please visit the Kanban board to view the document %s.';
$lang->doc->hocuspocusConnect = 'The collaborative editing service is connected.';
$lang->doc->hocuspocusDisconnect = 'The collaborative editing service is disconnected. Edits will be synchronized after reconnection.';
+$lang->doc->docTemplateConvertComment = 'The template has been converted to the new editor format. Switch to version %s to view the template before conversion.';
$lang->doc->noticeAcl['lib']['product']['default'] = "Users who can access the selected {$lang->productCommon} can access it.";
$lang->doc->noticeAcl['lib']['product']['custom'] = "Users who can access the selected {$lang->productCommon} or users in the whiltelist can access it.";
diff --git a/module/doc/lang/zh-cn.php b/module/doc/lang/zh-cn.php
index c3731b23b9..f614b4f3ef 100644
--- a/module/doc/lang/zh-cn.php
+++ b/module/doc/lang/zh-cn.php
@@ -527,6 +527,7 @@ $lang->doc->docConvertComment = "文档已经转换为新编辑器格
$lang->doc->previewNotAvailable = '预览功能暂不可用,请访问禅道查看文档 %s。';
$lang->doc->hocuspocusConnect = '协作编辑服务已连接。';
$lang->doc->hocuspocusDisconnect = '协作编辑服务已断开,编辑内容将在重新连接后同步。';
+$lang->doc->docTemplateConvertComment = "文档模板已经转换为新编辑器格式,切换版本 %s 来查看转换前的文档模板。";
$lang->doc->noticeAcl['lib']['product']['default'] = "有所选{$lang->productCommon}访问权限的用户可以访问。";
$lang->doc->noticeAcl['lib']['product']['custom'] = "有所选{$lang->productCommon}访问权限或白名单里的用户可以访问。";
diff --git a/module/upgrade/js/upgradedoctemplates.ui.js b/module/upgrade/js/upgradedoctemplates.ui.js
index 5011f6d420..a2afa9269f 100644
--- a/module/upgrade/js/upgradedoctemplates.ui.js
+++ b/module/upgrade/js/upgradedoctemplates.ui.js
@@ -41,10 +41,10 @@ async function upgradeDocTemplates(idList, options)
const total = idList.html.length;
for(const id of idList['html'])
{
- onProgress(current, total);
await upgradeTemplateContent(id, {processUrl: $.createLink('upgrade', 'ajaxUpgradeDocTemplate', 'docID={docID}')});
await zui.delay(50);
current++;
+ onProgress(current, total);
}
return idList;
}
diff --git a/module/upgrade/model.php b/module/upgrade/model.php
index d7d880c9ac..2855c964ea 100644
--- a/module/upgrade/model.php
+++ b/module/upgrade/model.php
@@ -10989,7 +10989,7 @@ class upgradeModel extends model
$this->dao->insert(TABLE_DOCCONTENT)->data($newDocContent)->exec();
$this->dao->update(TABLE_DOC)->set('version')->eq($newDocContent->version)->where('id')->eq($docID)->exec();
- $this->loadModel('action')->create('doc', $docID, 'convertDoc', sprintf($this->lang->doc->docConvertComment, "#$docContent->version", '', 'system'));
+ $this->loadModel('action')->create('docTemplate', $docID, 'convertDocTemplate', sprintf($this->lang->doc->docTemplateConvertComment, "#$docContent->version", '', 'system'));
if(dao::isError()) return false;
return true;