* [task#142970,doing,1h] Change the history of template when upgrade.

This commit is contained in:
xieqiyu
2025-05-13 10:15:25 +08:00
committed by 刘刚
parent 829c5de6da
commit ff226280c3
10 changed files with 22 additions and 2 deletions
+4
View File
@@ -330,6 +330,9 @@ $lang->action->desc->releaseddoc = '$date, <strong>$actor</strong> released <str
/* Describe the operation records of document conversion.。*/
$lang->action->desc->convertdoc = '$date, <strong>$actor</strong> complete document conversion <strong>$extra</strong>.' . "\n";
/* Describe the operation records of template conversion. */
$lang->action->desc->convertdoctemplate = '$date, <strong>$actor</strong> complete template conversion <strong>$extra</strong>.' . "\n";
/* This parameter describes historical operations that are performed when a document is collected or uncollected. */
$lang->action->desc->collected = '$date, <strong>$actor</strong> collected <strong>$extra</strong>.' . "\n";
$lang->action->desc->uncollected = '$date, <strong>$actor</strong> uncollected <strong>$extra</strong>.' . "\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';
+4
View File
@@ -330,6 +330,9 @@ $lang->action->desc->releaseddoc = '$date, <strong>$actor</strong> released <str
/* Describe the operation records of document conversion.。*/
$lang->action->desc->convertdoc = '$date, <strong>$actor</strong> complete document conversion <strong>$extra</strong>.' . "\n";
/* Describe the operation records of template conversion. */
$lang->action->desc->convertdoctemplate = '$date, <strong>$actor</strong> complete template conversion <strong>$extra</strong>.' . "\n";
/* This parameter describes historical operations that are performed when a document is collected or uncollected. */
$lang->action->desc->collected = '$date, <strong>$actor</strong> collected <strong>$extra</strong>.' . "\n";
$lang->action->desc->uncollected = '$date, <strong>$actor</strong> uncollected <strong>$extra</strong>.' . "\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';
+4
View File
@@ -330,6 +330,9 @@ $lang->action->desc->releaseddoc = '$date, <strong>$actor</strong> released <str
/* Describe the operation records of document conversion.。*/
$lang->action->desc->convertdoc = '$date, <strong>$actor</strong> complete document conversion <strong>$extra</strong>.' . "\n";
/* Describe the operation records of template conversion. */
$lang->action->desc->convertdoctemplate = '$date, <strong>$actor</strong> complete template conversion <strong>$extra</strong>.' . "\n";
/* This parameter describes historical operations that are performed when a document is collected or uncollected. */
$lang->action->desc->collected = '$date, <strong>$actor</strong> collected <strong>$extra</strong>.' . "\n";
$lang->action->desc->uncollected = '$date, <strong>$actor</strong> uncollected <strong>$extra</strong>.' . "\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';
+4
View File
@@ -330,6 +330,9 @@ $lang->action->desc->releaseddoc = '$date, 由 <strong>$actor</strong> 发布 <s
/* 用来描述文档转换的操作记录。*/
$lang->action->desc->convertdoc = '$date, 由 <strong>$actor</strong> 完成文档转换 <strong>$extra</strong>。' . "\n";
/* 用来描述文档模板转换的操作记录。*/
$lang->action->desc->convertdoctemplate = '$date, 由 <strong>$actor</strong> 完成文档模板转换 <strong>$extra</strong>。' . "\n";
/* 用来描述文档收藏或取消收藏时的历史操作记录。*/
$lang->action->desc->collected = '$date, 由 <strong>$actor</strong> 收藏 <strong>$extra</strong>。' . "\n";
$lang->action->desc->uncollected = '$date, 由 <strong>$actor</strong> 取消收藏 <strong>$extra</strong>。' . "\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 = '上架了';
+1
View File
@@ -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.";
+1
View File
@@ -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.";
+1
View File
@@ -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.";
+1
View File
@@ -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}访问权限或白名单里的用户可以访问。";
+1 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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;