diff --git a/frontend/src/components/dialog/about-dialog.js b/frontend/src/components/dialog/about-dialog.js index 61416a5794..c0165df475 100644 --- a/frontend/src/components/dialog/about-dialog.js +++ b/frontend/src/components/dialog/about-dialog.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { Modal, ModalBody } from 'reactstrap'; -import { gettext, lang, mediaUrl, logoPath, logoWidth, logoHeight, siteTitle, seafileVersion, extraAboutDialogLinks } from '../../utils/constants'; +import { gettext, lang, mediaUrl, logoPath, logoWidth, logoHeight, siteTitle, seafileVersion, additionalAboutDialogLinks } from '../../utils/constants'; const propTypes = { onCloseAboutDialog: PropTypes.func.isRequired, @@ -14,10 +14,10 @@ class AboutDialog extends React.Component { } renderExternalAboutLinks = () => { - if (extraAboutDialogLinks && (typeof extraAboutDialogLinks) === 'object') { - let keys = Object.keys(extraAboutDialogLinks); + if (additionalAboutDialogLinks && (typeof additionalAboutDialogLinks) === 'object') { + let keys = Object.keys(additionalAboutDialogLinks); return keys.map((key, index) => { - return {key}; + return {key}; }); } return null; diff --git a/frontend/src/components/dialog/share-dialog.js b/frontend/src/components/dialog/share-dialog.js index 607e0280dc..dfeedb3ead 100644 --- a/frontend/src/components/dialog/share-dialog.js +++ b/frontend/src/components/dialog/share-dialog.js @@ -1,7 +1,7 @@ import React, { Fragment } from 'react'; import PropTypes from 'prop-types'; import { Modal, ModalHeader, ModalBody, TabContent, TabPane, Nav, NavItem, NavLink } from 'reactstrap'; -import { gettext, username, canGenerateShareLink, canGenerateUploadLink, extraShareDialogNote } from '../../utils/constants'; +import { gettext, username, canGenerateShareLink, canGenerateUploadLink, additionalShareDialogNote } from '../../utils/constants'; import ShareToUser from './share-to-user'; import ShareToGroup from './share-to-group'; import GenerateShareLink from './generate-share-link'; @@ -208,11 +208,11 @@ class ShareDialog extends React.Component { } renderExternalShareMessage = () => { - if (extraShareDialogNote && (typeof extraShareDialogNote) === 'object') { + if (additionalShareDialogNote && (typeof additionalShareDialogNote) === 'object') { return (
-
{extraShareDialogNote.title}
-
{extraShareDialogNote.content}
+
{additionalShareDialogNote.title}
+
{additionalShareDialogNote.content}
); } diff --git a/frontend/src/components/side-nav-footer.js b/frontend/src/components/side-nav-footer.js index d0f89f93d4..188a6d55b3 100644 --- a/frontend/src/components/side-nav-footer.js +++ b/frontend/src/components/side-nav-footer.js @@ -1,5 +1,5 @@ import React, { Fragment } from 'react'; -import { gettext, siteRoot, sideNavFooterCustomHtml, extraAppBottomLinks } from '../utils/constants'; +import { gettext, siteRoot, sideNavFooterCustomHtml, additionalAppBottomLinks } from '../utils/constants'; import ModalPortal from './modal-portal'; import AboutDialog from './dialog/about-dialog'; @@ -17,10 +17,10 @@ class SideNavFooter extends React.Component { } renderExternalAppLinks = () => { - if (extraAppBottomLinks && (typeof extraAppBottomLinks) === 'object') { - let keys = Object.keys(extraAppBottomLinks); + if (additionalAppBottomLinks && (typeof additionalAppBottomLinks) === 'object') { + let keys = Object.keys(additionalAppBottomLinks); return keys.map((key, index) => { - return {key}; + return {key}; }); } return null; @@ -37,7 +37,7 @@ class SideNavFooter extends React.Component { {gettext('Help')} {gettext('About')} {this.renderExternalAppLinks()} - + {' '} {gettext('Clients')} diff --git a/frontend/src/utils/constants.js b/frontend/src/utils/constants.js index b43ea58780..eb61f8a0b7 100644 --- a/frontend/src/utils/constants.js +++ b/frontend/src/utils/constants.js @@ -62,9 +62,9 @@ export const curNoteMsg = window.app.pageOptions.curNoteMsg; export const curNoteID = window.app.pageOptions.curNoteID; export const showLogoutIcon = window.app.pageOptions.showLogoutIcon; -export const extraShareDialogNote = window.app.pageOptions.extraShareDialogNote; -export const extraAppBottomLinks = window.app.pageOptions.extraAppBottomLinks; -export const extraAboutDialogLinks = window.app.pageOptions.extraAboutDialogLinks; +export const additionalShareDialogNote = window.app.pageOptions.additionalShareDialogNote; +export const additionalAppBottomLinks = window.app.pageOptions.additionalAppBottomLinks; +export const additionalAboutDialogLinks = window.app.pageOptions.additionalAboutDialogLinks; // wiki export const slug = window.wiki ? window.wiki.config.slug : ''; diff --git a/seahub/settings.py b/seahub/settings.py index 9d08b8e1c4..68fbf03de6 100644 --- a/seahub/settings.py +++ b/seahub/settings.py @@ -771,26 +771,26 @@ ENABLE_REPO_SNAPSHOT_LABEL = False ENABLE_REPO_WIKI_MODE = True ############################ -# HU berlin external# +# HU berlin additional # ############################ -# EXTRA_SHARE_DIALOG_NOTE = { +# ADDITIONAL_SHARE_DIALOG_NOTE = { # 'title': 'Attention! Read before shareing files:', # 'content': 'Do not share personal or confidential official data with **.' # } -EXTRA_SHARE_DIALOG_NOTE = None +ADDITIONAL_SHARE_DIALOG_NOTE = None -# EXTRA_APP_BOTTOM_LINKS = { +# ADDITIONAL_APP_BOTTOM_LINKS = { # 'seafile': 'http://dev.seahub.com/seahub', # 'dtable-web': 'http://dev.seahub.com/dtable-web' # } -EXTRA_APP_BOTTOM_LINKS = None +ADDITIONAL_APP_BOTTOM_LINKS = None -# EXTRA_ABOUT_DIALOG_LINKS = { +# ADDITIONAL_ABOUT_DIALOG_LINKS = { # 'seafile': 'http://dev.seahub.com/seahub', # 'dtable-web': 'http://dev.seahub.com/dtable-web' # } -EXTRA_ABOUT_DIALOG_LINKS = None +ADDITIONAL_ABOUT_DIALOG_LINKS = None ############################ # Settings for SeafileDocs # diff --git a/seahub/templates/base_for_react.html b/seahub/templates/base_for_react.html index 7bdb151a0a..07effc53bd 100644 --- a/seahub/templates/base_for_react.html +++ b/seahub/templates/base_for_react.html @@ -103,9 +103,9 @@ curNoteID: '{{ request.cur_note.id }}', {% endif %} showLogoutIcon: {% if show_logout_icon %} true {% else %} false {% endif %}, - extraShareDialogNote: {% if extra_share_dialog_note %} {{ extra_share_dialog_note|safe }} {% else %} null {% endif %}, - extraAppBottomLinks: {% if extra_app_bottom_links %} {{ extra_app_bottom_links|safe }} {% else %} null {% endif %}, - extraAboutDialogLinks: {% if extra_about_dialog_links %} {{ extra_about_dialog_links|safe }} {% else %} null {% endif %} + additionalShareDialogNote: {% if additional_share_dialog_note %} {{ additional_share_dialog_note|safe }} {% else %} null {% endif %}, + additionalAppBottomLinks: {% if additional_app_bottom_links %} {{ additional_app_bottom_links|safe }} {% else %} null {% endif %}, + additionalAboutDialogLinks: {% if additional_about_dialog_links %} {{ additional_about_dialog_links|safe }} {% else %} null {% endif %} } }; diff --git a/seahub/views/__init__.py b/seahub/views/__init__.py index dc9c936a83..d268876c76 100644 --- a/seahub/views/__init__.py +++ b/seahub/views/__init__.py @@ -57,7 +57,7 @@ from seahub.settings import AVATAR_FILE_STORAGE, \ UNREAD_NOTIFICATIONS_REQUEST_INTERVAL, SHARE_LINK_EXPIRE_DAYS_MIN, \ SHARE_LINK_EXPIRE_DAYS_MAX, SHARE_LINK_EXPIRE_DAYS_DEFAULT, \ SEAFILE_COLLAB_SERVER, ENABLE_RESET_ENCRYPTED_REPO_PASSWORD, \ - EXTRA_SHARE_DIALOG_NOTE, EXTRA_APP_BOTTOM_LINKS, EXTRA_ABOUT_DIALOG_LINKS + ADDITIONAL_SHARE_DIALOG_NOTE, ADDITIONAL_APP_BOTTOM_LINKS, ADDITIONAL_ABOUT_DIALOG_LINKS from seahub.wopi.settings import ENABLE_OFFICE_WEB_APP from seahub.onlyoffice.settings import ENABLE_ONLYOFFICE @@ -1278,7 +1278,7 @@ def react_fake_view(request, **kwargs): 'folder_perm_enabled': folder_perm_enabled, 'file_audit_enabled' : FILE_AUDIT_ENABLED, 'custom_nav_items' : json.dumps(CUSTOM_NAV_ITEMS), - 'extra_share_dialog_note': EXTRA_SHARE_DIALOG_NOTE, - 'extra_app_bottom_links': EXTRA_APP_BOTTOM_LINKS, - 'extra_about_dialog_links': EXTRA_ABOUT_DIALOG_LINKS + 'additional_share_dialog_note': ADDITIONAL_SHARE_DIALOG_NOTE, + 'additional_app_bottom_links': ADDITIONAL_APP_BOTTOM_LINKS, + 'additional_about_dialog_links': ADDITIONAL_SHARE_DIALOG_NOTE })