diff --git a/frontend/src/components/dirent-grid-view/dirent-grid-view.js b/frontend/src/components/dirent-grid-view/dirent-grid-view.js index 1b76c839e1..441bb4fdd9 100644 --- a/frontend/src/components/dirent-grid-view/dirent-grid-view.js +++ b/frontend/src/components/dirent-grid-view/dirent-grid-view.js @@ -170,6 +170,9 @@ class DirentGridView extends React.Component { case 'Access Log': this.onAccessLog(currentObject); break; + case 'Properties': + this.props.showDirentDetail('info'); + break; case 'Open via Client': this.onOpenViaClient(currentObject); break; diff --git a/frontend/src/components/dirent-list-view/dirent-list-item.js b/frontend/src/components/dirent-list-view/dirent-list-item.js index 4362469581..28d65d62b7 100644 --- a/frontend/src/components/dirent-list-view/dirent-list-item.js +++ b/frontend/src/components/dirent-list-view/dirent-list-item.js @@ -283,6 +283,10 @@ class DirentListItem extends React.Component { case 'Access Log': this.onAccessLog(); break; + case 'Properties': + this.props.onDirentClick(this.props.dirent); + this.props.showDirentDetail('info'); + break; case 'Open via Client': this.onOpenViaClient(); break; diff --git a/frontend/src/components/toolbar/multiple-dir-operation-toolbar.js b/frontend/src/components/toolbar/multiple-dir-operation-toolbar.js index 0066f1ec52..cb0d24b2ff 100644 --- a/frontend/src/components/toolbar/multiple-dir-operation-toolbar.js +++ b/frontend/src/components/toolbar/multiple-dir-operation-toolbar.js @@ -220,6 +220,9 @@ class MultipleDirOperationToolbar extends React.Component { case 'Access Log': this.onAccessLog(dirent); break; + case 'Properties': + this.props.showDirentDetail('info'); + break; case 'Open via Client': this.onOpenViaClient(dirent); break; diff --git a/frontend/src/components/toolbar/view-mode-toolbar.js b/frontend/src/components/toolbar/view-mode-toolbar.js index f15f1c6401..e2e2013492 100644 --- a/frontend/src/components/toolbar/view-mode-toolbar.js +++ b/frontend/src/components/toolbar/view-mode-toolbar.js @@ -34,7 +34,7 @@ class ViewModeToolbar extends React.Component { {!this.props.isCustomPermission && (
- +
)} diff --git a/frontend/src/utils/text-translation.js b/frontend/src/utils/text-translation.js index 0f46f64f2d..6b2e5a7b82 100644 --- a/frontend/src/utils/text-translation.js +++ b/frontend/src/utils/text-translation.js @@ -22,6 +22,7 @@ const TextTranslation = { 'COMMENT' : {key : 'Comment', value : gettext('Comment')}, 'HISTORY' : {key : 'History', value : gettext('History')}, 'ACCESS_LOG' : {key : 'Access Log', value : gettext('Access Log')}, + 'PROPERTIES' : {key : 'Properties', value : gettext('Properties')}, 'TAGS': {key: 'Tags', value: gettext('Tags')}, 'ONLYOFFICE_CONVERT': {key: 'Convert with ONLYOFFICE', value: gettext('Convert with ONLYOFFICE')} }; diff --git a/frontend/src/utils/utils.js b/frontend/src/utils/utils.js index 409e5ba082..0c13d2b742 100644 --- a/frontend/src/utils/utils.js +++ b/frontend/src/utils/utils.js @@ -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, MARK_AS_DRAFT, UNMARK_AS_DRAFT, - COMMENT, HISTORY, ACCESS_LOG, OPEN_VIA_CLIENT, ONLYOFFICE_CONVERT } = TextTranslation; + COMMENT, HISTORY, ACCESS_LOG, PROPERTIES, OPEN_VIA_CLIENT, ONLYOFFICE_CONVERT } = TextTranslation; const permission = dirent.permission; const { isCustomPermission, customPermission } = Utils.getUserPermission(permission); @@ -601,10 +601,12 @@ export const Utils = { list.push(MARK_AS_DRAFT); } } + /* if (enableFileComment) { list.push(COMMENT); } - list.push(HISTORY); + */ + list.push(PROPERTIES, HISTORY); if (isPro && fileAuditEnabled) { list.push(ACCESS_LOG); } @@ -615,9 +617,11 @@ export const Utils = { if (!currentRepoInfo.encrypted) { list.push(COPY); } + /* if (enableFileComment) { list.push(COMMENT); } + */ list.push(HISTORY); }