mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-02 07:27:04 +00:00
[dir view] for file items: added 'Properties' to its context menu, (#5581)
* [dir view] for file items: added 'Properties' to its context menu, 'more' dropdown menus in <tr> & the top toolbar - click 'Properties', the 'info' panel will be shown * [dir view] operation menu for file item: removed 'Comment', moved 'Properties'
This commit is contained in:
@@ -170,6 +170,9 @@ class DirentGridView extends React.Component {
|
|||||||
case 'Access Log':
|
case 'Access Log':
|
||||||
this.onAccessLog(currentObject);
|
this.onAccessLog(currentObject);
|
||||||
break;
|
break;
|
||||||
|
case 'Properties':
|
||||||
|
this.props.showDirentDetail('info');
|
||||||
|
break;
|
||||||
case 'Open via Client':
|
case 'Open via Client':
|
||||||
this.onOpenViaClient(currentObject);
|
this.onOpenViaClient(currentObject);
|
||||||
break;
|
break;
|
||||||
|
@@ -283,6 +283,10 @@ class DirentListItem extends React.Component {
|
|||||||
case 'Access Log':
|
case 'Access Log':
|
||||||
this.onAccessLog();
|
this.onAccessLog();
|
||||||
break;
|
break;
|
||||||
|
case 'Properties':
|
||||||
|
this.props.onDirentClick(this.props.dirent);
|
||||||
|
this.props.showDirentDetail('info');
|
||||||
|
break;
|
||||||
case 'Open via Client':
|
case 'Open via Client':
|
||||||
this.onOpenViaClient();
|
this.onOpenViaClient();
|
||||||
break;
|
break;
|
||||||
|
@@ -220,6 +220,9 @@ class MultipleDirOperationToolbar extends React.Component {
|
|||||||
case 'Access Log':
|
case 'Access Log':
|
||||||
this.onAccessLog(dirent);
|
this.onAccessLog(dirent);
|
||||||
break;
|
break;
|
||||||
|
case 'Properties':
|
||||||
|
this.props.showDirentDetail('info');
|
||||||
|
break;
|
||||||
case 'Open via Client':
|
case 'Open via Client':
|
||||||
this.onOpenViaClient(dirent);
|
this.onOpenViaClient(dirent);
|
||||||
break;
|
break;
|
||||||
|
@@ -34,7 +34,7 @@ class ViewModeToolbar extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
{!this.props.isCustomPermission && (
|
{!this.props.isCustomPermission && (
|
||||||
<div className="detail-btn btn-group">
|
<div className="detail-btn btn-group">
|
||||||
<button className="btn btn-secondary btn-icon ml-1 fas fa-info" id='detail' title={gettext('Detail')} aria-label={gettext('Detail')} onClick={this.switchViewMode}></button>
|
<button className="btn btn-secondary btn-icon ml-1 fas fa-info" id='detail' title={gettext('Properties')} aria-label={gettext('Properties')} onClick={this.switchViewMode}></button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
|
@@ -22,6 +22,7 @@ const TextTranslation = {
|
|||||||
'COMMENT' : {key : 'Comment', value : gettext('Comment')},
|
'COMMENT' : {key : 'Comment', value : gettext('Comment')},
|
||||||
'HISTORY' : {key : 'History', value : gettext('History')},
|
'HISTORY' : {key : 'History', value : gettext('History')},
|
||||||
'ACCESS_LOG' : {key : 'Access Log', value : gettext('Access Log')},
|
'ACCESS_LOG' : {key : 'Access Log', value : gettext('Access Log')},
|
||||||
|
'PROPERTIES' : {key : 'Properties', value : gettext('Properties')},
|
||||||
'TAGS': {key: 'Tags', value: gettext('Tags')},
|
'TAGS': {key: 'Tags', value: gettext('Tags')},
|
||||||
'ONLYOFFICE_CONVERT': {key: 'Convert with ONLYOFFICE', value: gettext('Convert with ONLYOFFICE')}
|
'ONLYOFFICE_CONVERT': {key: 'Convert with ONLYOFFICE', value: gettext('Convert with ONLYOFFICE')}
|
||||||
};
|
};
|
||||||
|
@@ -527,7 +527,7 @@ export const Utils = {
|
|||||||
getFileOperationList: function(isRepoOwner, currentRepoInfo, dirent, isContextmenu) {
|
getFileOperationList: function(isRepoOwner, currentRepoInfo, dirent, isContextmenu) {
|
||||||
let list = [];
|
let list = [];
|
||||||
const { SHARE, DOWNLOAD, DELETE, RENAME, MOVE, COPY, TAGS, UNLOCK, LOCK, MARK_AS_DRAFT, UNMARK_AS_DRAFT,
|
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 permission = dirent.permission;
|
||||||
const { isCustomPermission, customPermission } = Utils.getUserPermission(permission);
|
const { isCustomPermission, customPermission } = Utils.getUserPermission(permission);
|
||||||
|
|
||||||
@@ -601,10 +601,12 @@ export const Utils = {
|
|||||||
list.push(MARK_AS_DRAFT);
|
list.push(MARK_AS_DRAFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
if (enableFileComment) {
|
if (enableFileComment) {
|
||||||
list.push(COMMENT);
|
list.push(COMMENT);
|
||||||
}
|
}
|
||||||
list.push(HISTORY);
|
*/
|
||||||
|
list.push(PROPERTIES, HISTORY);
|
||||||
if (isPro && fileAuditEnabled) {
|
if (isPro && fileAuditEnabled) {
|
||||||
list.push(ACCESS_LOG);
|
list.push(ACCESS_LOG);
|
||||||
}
|
}
|
||||||
@@ -615,9 +617,11 @@ export const Utils = {
|
|||||||
if (!currentRepoInfo.encrypted) {
|
if (!currentRepoInfo.encrypted) {
|
||||||
list.push(COPY);
|
list.push(COPY);
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
if (enableFileComment) {
|
if (enableFileComment) {
|
||||||
list.push(COMMENT);
|
list.push(COMMENT);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
list.push(HISTORY);
|
list.push(HISTORY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user