mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-25 23:02:26 +00:00
@@ -79,7 +79,7 @@ class MainPanel extends Component {
|
||||
<div className="cur-view-toolbar">
|
||||
<span className="sf2-icon-menu hidden-md-up d-md-none side-nav-toggle" title="Side Nav Menu" onClick={this.onMenuClick}></span>
|
||||
{this.props.permission === 'rw' && (
|
||||
<button className="btn btn-secondary operation-item" title="Edit File" onClick={this.onEditClick}>{gettext('Edit Page')}</button>
|
||||
<button className="btn btn-secondary operation-item" title="Edit" onClick={this.onEditClick}>{gettext('Edit')}</button>
|
||||
)}
|
||||
</div>
|
||||
<CommonToolbar
|
||||
@@ -93,12 +93,6 @@ class MainPanel extends Component {
|
||||
<div className="main-panel-center">
|
||||
<div className="cur-view-path">
|
||||
<div className="path-containter">
|
||||
{username &&
|
||||
<Fragment>
|
||||
<a href={siteRoot + 'wikis/'} className="normal">{gettext('Wikis')}</a>
|
||||
<span className="path-split">/</span>
|
||||
</Fragment>
|
||||
}
|
||||
<a href={siteRoot + 'wikis/' + slug} className="normal">{slug}</a>
|
||||
{this.renderNavPath()}
|
||||
</div>
|
||||
|
@@ -46,7 +46,7 @@ class SidePanel extends Component {
|
||||
renderTreeView = () => {
|
||||
return (
|
||||
<Fragment>
|
||||
<h3 className="wiki-pages-heading">{gettext('Pages')}</h3>
|
||||
<h3 className="wiki-pages-heading">{gettext('Contents')}</h3>
|
||||
<div className="wiki-pages-container">
|
||||
{this.props.treeData && (
|
||||
<TreeView
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import { Dropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap';
|
||||
import { Button } from 'reactstrap';
|
||||
import { seafileAPI } from '../../utils/seafile-api';
|
||||
import { gettext, loginUrl } from '../../utils/constants';
|
||||
import toaster from '../../components/toast';
|
||||
@@ -73,8 +73,8 @@ class Wikis extends Component {
|
||||
this.setState({isShowCreateDialog: !this.state.isShowCreateDialog});
|
||||
}
|
||||
|
||||
addWiki = (isExist, name, repoID) => {
|
||||
seafileAPI.addWiki(isExist, name, repoID).then((res) => {
|
||||
addWiki = (repoID) => {
|
||||
seafileAPI.addWiki(repoID).then((res) => {
|
||||
this.state.wikis.push(res.data);
|
||||
this.setState({wikis: this.state.wikis});
|
||||
}).catch((error) => {
|
||||
@@ -123,15 +123,9 @@ class Wikis extends Component {
|
||||
<div className="cur-view-toolbar">
|
||||
<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">
|
||||
<Dropdown tag="div" isOpen={this.state.isShowAddWikiMenu} toggle={this.onMenuToggle}>
|
||||
<DropdownToggle className="btn btn-secondary operation-item">
|
||||
<i className="fa fa-plus-square text-secondary mr-1"></i>{gettext('Add Wiki')}
|
||||
</DropdownToggle>
|
||||
<DropdownMenu>
|
||||
<DropdownItem onClick={this.onCreateToggle}>{gettext('New Wiki')}</DropdownItem>
|
||||
<DropdownItem onClick={this.onSelectToggle}>{gettext('Choose a library as Wiki')}</DropdownItem>
|
||||
</DropdownMenu>
|
||||
</Dropdown>
|
||||
<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')}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<CommonToolbar onSearchedClick={this.props.onSearchedClick} />
|
||||
@@ -140,7 +134,7 @@ class Wikis extends Component {
|
||||
<div className="cur-view-container" id="wikis">
|
||||
<div className="cur-view-path">
|
||||
<div className="path-container">
|
||||
<h3 className="sf-heading">{gettext('Wikis')}</h3>
|
||||
<h3 className="sf-heading">{gettext('Published Libraries')}</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div className="cur-view-content">
|
||||
|
Reference in New Issue
Block a user