mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-07 09:51:26 +00:00
only EX-PORPS set display ex-props (#5820)
This commit is contained in:
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
import Icon from '../icon';
|
import Icon from '../icon';
|
||||||
import { gettext } from '../../utils/constants';
|
import { gettext, canSetExProps } from '../../utils/constants';
|
||||||
import { Utils } from '../../utils/utils';
|
import { Utils } from '../../utils/utils';
|
||||||
import EditFileTagPopover from '../popover/edit-filetag-popover';
|
import EditFileTagPopover from '../popover/edit-filetag-popover';
|
||||||
import ExtraAttributesDialog from '../dialog/extra-attributes-dialog';
|
import ExtraAttributesDialog from '../dialog/extra-attributes-dialog';
|
||||||
@@ -84,7 +84,7 @@ class DetailListView extends React.Component {
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr><th>{gettext('Location')}</th><td>{position}</td></tr>
|
<tr><th>{gettext('Location')}</th><td>{position}</td></tr>
|
||||||
<tr><th>{gettext('Last Update')}</th><td>{moment(direntDetail.mtime).format('YYYY-MM-DD')}</td></tr>
|
<tr><th>{gettext('Last Update')}</th><td>{moment(direntDetail.mtime).format('YYYY-MM-DD')}</td></tr>
|
||||||
{direntDetail.permission === 'rw' && (
|
{direntDetail.permission === 'rw' && canSetExProps && (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<tr className="file-extra-attributes">
|
<tr className="file-extra-attributes">
|
||||||
<th colSpan={2}>
|
<th colSpan={2}>
|
||||||
@@ -126,7 +126,7 @@ class DetailListView extends React.Component {
|
|||||||
<span onClick={this.onEditFileTagToggle} id={this.tagListTitleID}><Icon symbol='tag' /></span>
|
<span onClick={this.onEditFileTagToggle} id={this.tagListTitleID}><Icon symbol='tag' /></span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{direntDetail.permission === 'rw' && (
|
{direntDetail.permission === 'rw' && canSetExProps && (
|
||||||
<tr className="file-extra-attributes">
|
<tr className="file-extra-attributes">
|
||||||
<th colSpan={2}>
|
<th colSpan={2}>
|
||||||
<div className="edit-file-extra-attributes-btn" onClick={this.toggleExtraPropertiesDialog}>
|
<div className="edit-file-extra-attributes-btn" onClick={this.toggleExtraPropertiesDialog}>
|
||||||
|
@@ -94,6 +94,8 @@ export const enableVideoThumbnail = window.app.pageOptions.enableVideoThumbnail;
|
|||||||
export const enableOnlyoffice = window.app.pageOptions.enableOnlyoffice || false;
|
export const enableOnlyoffice = window.app.pageOptions.enableOnlyoffice || false;
|
||||||
export const onlyofficeConverterExtensions = window.app.pageOptions.onlyofficeConverterExtensions || [];
|
export const onlyofficeConverterExtensions = window.app.pageOptions.onlyofficeConverterExtensions || [];
|
||||||
|
|
||||||
|
export const canSetExProps = window.app.pageOptions.canSetExProps || false;
|
||||||
|
|
||||||
// seafile_ai
|
// seafile_ai
|
||||||
export const enableSeafileAI = window.app.pageOptions.enableSeafileAI || false;
|
export const enableSeafileAI = window.app.pageOptions.enableSeafileAI || false;
|
||||||
|
|
||||||
|
@@ -146,6 +146,7 @@
|
|||||||
onlyofficeConverterExtensions: {% if onlyofficeConverterExtensions %} {{onlyofficeConverterExtensions|safe}} {% else %} null {% endif %},
|
onlyofficeConverterExtensions: {% if onlyofficeConverterExtensions %} {{onlyofficeConverterExtensions|safe}} {% else %} null {% endif %},
|
||||||
enableSeadoc: {% if enable_seadoc %} true {% else %} false {% endif %},
|
enableSeadoc: {% if enable_seadoc %} true {% else %} false {% endif %},
|
||||||
enableSeafileAI: {% if enable_seafile_ai %} true {% else %} false {% endif %},
|
enableSeafileAI: {% if enable_seafile_ai %} true {% else %} false {% endif %},
|
||||||
|
canSetExProps: {% if can_set_ex_props %} true {% else %} false {% endif %},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@@ -57,7 +57,7 @@ from seahub.settings import AVATAR_FILE_STORAGE, ENABLE_REPO_SNAPSHOT_LABEL, \
|
|||||||
UPLOAD_LINK_EXPIRE_DAYS_MIN, UPLOAD_LINK_EXPIRE_DAYS_MAX, UPLOAD_LINK_EXPIRE_DAYS_DEFAULT, \
|
UPLOAD_LINK_EXPIRE_DAYS_MIN, UPLOAD_LINK_EXPIRE_DAYS_MAX, UPLOAD_LINK_EXPIRE_DAYS_DEFAULT, \
|
||||||
SEAFILE_COLLAB_SERVER, ENABLE_RESET_ENCRYPTED_REPO_PASSWORD, \
|
SEAFILE_COLLAB_SERVER, ENABLE_RESET_ENCRYPTED_REPO_PASSWORD, \
|
||||||
ADDITIONAL_SHARE_DIALOG_NOTE, ADDITIONAL_APP_BOTTOM_LINKS, ADDITIONAL_ABOUT_DIALOG_LINKS, \
|
ADDITIONAL_SHARE_DIALOG_NOTE, ADDITIONAL_APP_BOTTOM_LINKS, ADDITIONAL_ABOUT_DIALOG_LINKS, \
|
||||||
DTABLE_WEB_SERVER
|
DTABLE_WEB_SERVER, EX_PROPS_TABLE, SEATABLE_EX_PROPS_BASE_API_TOKEN, EX_EDITABLE_COLUMNS
|
||||||
|
|
||||||
from seahub.wopi.settings import ENABLE_OFFICE_WEB_APP
|
from seahub.wopi.settings import ENABLE_OFFICE_WEB_APP
|
||||||
from seahub.ocm.settings import ENABLE_OCM, OCM_REMOTE_SERVERS
|
from seahub.ocm.settings import ENABLE_OCM, OCM_REMOTE_SERVERS
|
||||||
@@ -1245,4 +1245,5 @@ def react_fake_view(request, **kwargs):
|
|||||||
'group_import_members_extra_msg': GROUP_IMPORT_MEMBERS_EXTRA_MSG,
|
'group_import_members_extra_msg': GROUP_IMPORT_MEMBERS_EXTRA_MSG,
|
||||||
'request_from_onlyoffice_desktop_editor': ONLYOFFICE_DESKTOP_EDITOR_HTTP_USER_AGENT in request.headers.get('user-agent', ''),
|
'request_from_onlyoffice_desktop_editor': ONLYOFFICE_DESKTOP_EDITOR_HTTP_USER_AGENT in request.headers.get('user-agent', ''),
|
||||||
'enable_sso_to_thirdpart_website': settings.ENABLE_SSO_TO_THIRDPART_WEBSITE,
|
'enable_sso_to_thirdpart_website': settings.ENABLE_SSO_TO_THIRDPART_WEBSITE,
|
||||||
|
'can_set_ex_props': DTABLE_WEB_SERVER and SEATABLE_EX_PROPS_BASE_API_TOKEN and EX_PROPS_TABLE and EX_EDITABLE_COLUMNS
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user