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

Merge branch '7.0'

This commit is contained in:
plt
2019-07-17 09:28:53 +08:00
9 changed files with 449 additions and 20 deletions

View File

@@ -0,0 +1,54 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';
import Loading from '../loading';
const propTypes = {
importDepartmentDialogToggle: PropTypes.func.isRequired,
onImportDepartmentSubmit: PropTypes.func.isRequired,
departmentsCount: PropTypes.number.isRequired,
membersCount: PropTypes.number.isRequired,
departmentName: PropTypes.string.isRequired,
};
class ImportWorkWeixinDepartmentDialog extends React.Component {
constructor(props) {
super(props);
this.state = {
isLoading : false,
};
}
toggle = () => {
this.props.importDepartmentDialogToggle(null);
};
handleSubmit = () => {
this.props.onImportDepartmentSubmit();
this.setState({ isLoading : true });
};
render() {
const { departmentsCount, membersCount, departmentName } = this.props;
return (
<Modal isOpen={true} toggle={this.toggle}>
<ModalHeader toggle={this.toggle}>
<span>{'导入部门 '}</span><span className="op-target" title={departmentName}>{departmentName}</span>
</ModalHeader>
<ModalBody>
<p>{'将要导入 '}<strong>{departmentsCount}</strong>{' '}<strong>{membersCount}</strong>{' '}</p>
{this.state.isLoading && <Loading/>}
</ModalBody>
<ModalFooter>
<Button color="secondary" onClick={this.toggle}>{'取消'}</Button>
<Button color="primary" onClick={this.handleSubmit}>{'导入'}</Button>
</ModalFooter>
</Modal>
);
}
}
ImportWorkWeixinDepartmentDialog.propTypes = propTypes;
export default ImportWorkWeixinDepartmentDialog;

View File

@@ -238,7 +238,7 @@ class DirentDetail extends React.Component {
<TabPane tabId="comments" className="comments h-100">
<DetailCommentList
repoID={this.props.repoID}
filePath={(dirent && dirent.type === 'file') ? path + dirent.name : path}
filePath={(dirent && dirent.type === 'file') ? path + '/' + dirent.name : path}
/>
</TabPane>
</TabContent>