diff --git a/frontend/src/components/dialog/lib-history-setting-dialog.js b/frontend/src/components/dialog/lib-history-setting-dialog.js index 5dcabcecd3..19252ffafa 100644 --- a/frontend/src/components/dialog/lib-history-setting-dialog.js +++ b/frontend/src/components/dialog/lib-history-setting-dialog.js @@ -1,6 +1,6 @@ import React, { Fragment } from 'react'; import PropTypes from 'prop-types'; -import { gettext } from '../../utils/constants'; +import { gettext, enableRepoHistorySetting } from '../../utils/constants'; import toaster from '../toast'; import { Button, Modal, ModalHeader, ModalBody, Form, FormGroup, Label, Input } from 'reactstrap'; import { seafileAPI } from '../../utils/seafile-api.js'; @@ -101,16 +101,21 @@ class LibHistorySetting extends React.Component {
+ {!enableRepoHistorySetting && + + + + } - {this.setLimitDays('allHistory')}}/>{' '} + {this.setLimitDays('allHistory')}}/>{' '} - {this.setLimitDays('noHistory')}}/>{' '} + {this.setLimitDays('noHistory')}}/>{' '} - {this.setLimitDays('autoHistory')}}/>{' '} + {this.setLimitDays('autoHistory')}}/>{' '} diff --git a/seahub/views/__init__.py b/seahub/views/__init__.py index ecd653be3d..7204a56df4 100644 --- a/seahub/views/__init__.py +++ b/seahub/views/__init__.py @@ -719,6 +719,7 @@ def libraries(request): 'share_link_expire_days_min': SHARE_LINK_EXPIRE_DAYS_MIN, 'share_link_expire_days_max': SHARE_LINK_EXPIRE_DAYS_MAX, 'enable_encrypted_library': config.ENABLE_ENCRYPTED_LIBRARY, + 'enable_repo_history_setting': config.ENABLE_REPO_HISTORY_SETTING, }) return render(request, 'libraries.html', {