1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-03 07:55:36 +00:00

file scan records page (#3051)

* file scan records page

* add file scan setting

* repair code
This commit is contained in:
王健辉
2019-03-13 16:50:30 +08:00
committed by Daniel Pan
parent 53c3791043
commit 8c81489c51
17 changed files with 611 additions and 2 deletions

View File

@@ -1,9 +1,14 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import ReactDOM from 'react-dom';
import { Utils } from '../../utils/utils';
import editorUtilities from '../../utils/editor-utilties';
import { siteRoot, gettext } from '../../utils/constants';
const propTypes = {
isAdminPanel: PropTypes.bool,
};
class Account extends Component {
constructor(props) {
super(props);
@@ -87,11 +92,16 @@ class Account extends Component {
}
renderMenu = () => {
if(this.state.isStaff){
if (this.state.isStaff && !this.props.isAdminPanel) {
return (
<a href={siteRoot + 'sys/useradmin/'} title={gettext('System Admin')} className="item">{gettext('System Admin')}</a>
);
}
if (this.props.isAdminPanel) {
return (
<a href={siteRoot} title={gettext('Exit Admin Panel')} className="item">{gettext('Exit Admin Panel')}</a>
);
}
if (this.state.isOrgStaff) {
return (
<a href={siteRoot + 'org/useradmin/'} title={gettext('Organization Admin')} className="item">{gettext('Organization Admin')}</a>
@@ -143,4 +153,6 @@ class Account extends Component {
}
}
Account.propTypes = propTypes;
export default Account;