mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-04 00:20:07 +00:00
adjust publish repo
This commit is contained in:
@@ -35,7 +35,6 @@ class WikiSelectDialog extends React.Component {
|
||||
|
||||
onChange = (repo) => {
|
||||
this.setState({
|
||||
name: repo.repo_name,
|
||||
repoID: repo.repo_id,
|
||||
});
|
||||
}
|
||||
@@ -53,15 +52,15 @@ class WikiSelectDialog extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<Modal isOpen={true}>
|
||||
<ModalHeader toggle={this.toggle}>{gettext('Publish a library')}</ModalHeader>
|
||||
<ModalHeader toggle={this.toggle}>{gettext('Publish a Library')}</ModalHeader>
|
||||
<ModalBody className="dialog-list-container">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width='12%'>{/* select */}</th>
|
||||
<th width='13%'>{/* icon */}</th>
|
||||
<th width='50%'>{gettext('Name')}</th>
|
||||
<th width='25%'>{gettext('Last Update')}</th>
|
||||
<th width='6%'>{/* select */}</th>
|
||||
<th width='9%'>{/* icon */}</th>
|
||||
<th width='55%'>{gettext('Name')}</th>
|
||||
<th width='30%'>{gettext('Last Update')}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -80,7 +79,10 @@ class WikiSelectDialog extends React.Component {
|
||||
</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button color="secondary" onClick={this.toggle}>{gettext('Cancel')}</Button>
|
||||
<Button color="primary" onClick={this.handleSubmit}>{gettext('Submit')}</Button>
|
||||
{this.state.repoID ?
|
||||
<Button color="primary" onClick={this.handleSubmit}>{gettext('Submit')}</Button>:
|
||||
<Button color="primary" disabled>{gettext('Submit')}</Button>
|
||||
}
|
||||
</ModalFooter>
|
||||
</Modal>
|
||||
);
|
||||
|
@@ -1,4 +1,5 @@
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Button } from 'reactstrap';
|
||||
import { seafileAPI } from '../../utils/seafile-api';
|
||||
import { gettext, loginUrl } from '../../utils/constants';
|
||||
@@ -9,6 +10,10 @@ import NewWikiDialog from '../../components/dialog/new-wiki-dialog';
|
||||
import WikiSelectDialog from '../../components/dialog/wiki-select-dialog';
|
||||
import WikiListView from '../../components/wiki-list-view/wiki-list-view';
|
||||
|
||||
const propTypes = {
|
||||
onShowSidePanel: PropTypes.func.isRequired,
|
||||
onSearchedClick: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
class Wikis extends Component {
|
||||
constructor(props) {
|
||||
@@ -124,7 +129,7 @@ class Wikis extends Component {
|
||||
<span className="sf2-icon-menu side-nav-toggle hidden-md-up d-md-none" title="Side Nav Menu" onClick={this.props.onShowSidePanel}></span>
|
||||
<div className="operation">
|
||||
<Button className="btn btn-secondary operation-item" onClick={this.onSelectToggle}>
|
||||
<i className="fa fa-plus-square text-secondary mr-1"></i>{gettext('Publish a Library')}
|
||||
{gettext('Publish a Library')}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -175,4 +180,6 @@ class Wikis extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
Wikis.propTypes = propTypes;
|
||||
|
||||
export default Wikis;
|
||||
|
Reference in New Issue
Block a user