1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-19 10:26:17 +00:00

feat: list revisions

This commit is contained in:
er-pai-r
2023-07-07 16:07:14 +08:00
parent 74f18d8b79
commit cee0349f3c
13 changed files with 312 additions and 11 deletions

View File

@@ -19,6 +19,7 @@ const TextTranslation = {
'MASK_AS_DRAFT' : {key : 'Mask as draft', value : gettext('Mark as draft')},
'UNMASK_AS_DRAFT' : {key : 'Unmask as draft', value : gettext('Unmark as draft')},
'START_REVISE' : {key : 'Start revise', value : gettext('Start revise')},
'LIST_REVISIONS': { key: 'List revisions', value: gettext('List revisions') },
'COMMENT' : {key : 'Comment', value : gettext('Comment')},
'HISTORY' : {key : 'History', value : gettext('History')},
'ACCESS_LOG' : {key : 'Access Log', value : gettext('Access Log')},

View File

@@ -527,7 +527,7 @@ export const Utils = {
getFileOperationList: function(isRepoOwner, currentRepoInfo, dirent, isContextmenu) {
let list = [];
const { SHARE, DOWNLOAD, DELETE, RENAME, MOVE, COPY, TAGS, UNLOCK, LOCK, MASK_AS_DRAFT, UNMASK_AS_DRAFT,
START_REVISE, COMMENT, HISTORY, ACCESS_LOG, OPEN_VIA_CLIENT, ONLYOFFICE_CONVERT } = TextTranslation;
START_REVISE, LIST_REVISIONS, COMMENT, HISTORY, ACCESS_LOG, OPEN_VIA_CLIENT, ONLYOFFICE_CONVERT } = TextTranslation;
const permission = dirent.permission;
const { isCustomPermission, customPermission } = Utils.getUserPermission(permission);
@@ -601,6 +601,7 @@ export const Utils = {
list.push(MASK_AS_DRAFT);
}
list.push(START_REVISE);
list.push(LIST_REVISIONS);
}
if (enableFileComment) {
list.push(COMMENT);
@@ -1548,6 +1549,12 @@ export const Utils = {
generateRevisionURL: function(siteRoot, repoID, path) {
if (!siteRoot || !repoID || !path) return '';
return siteRoot + 'repo/sdoc_revision/' + repoID + '/?p=' + this.encodePath(path);
},
generateRevisionsURL: function(siteRoot, repoID, path) {
if (!siteRoot || !repoID || !path) return '';
console.log(siteRoot + 'repo/sdoc_revisions/' + repoID + '/?p=' + this.encodePath(path))
return siteRoot + 'repo/sdoc_revisions/' + repoID + '/?p=' + this.encodePath(path);
}
};