mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-20 02:48:51 +00:00
change wiki (#6052)
This commit is contained in:
@@ -68,7 +68,7 @@ class WikiSelectDialog extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<Modal isOpen={true} toggle={this.toggle}>
|
||||
<ModalHeader toggle={this.toggle}>{gettext('Publish a Library')}</ModalHeader>
|
||||
<ModalHeader toggle={this.toggle}>{gettext('Create Wiki from existing library')}</ModalHeader>
|
||||
<ModalBody className="dialog-list-container">
|
||||
<table>
|
||||
<thead>
|
||||
|
@@ -222,9 +222,9 @@ class MainSideNav extends React.Component {
|
||||
</li>
|
||||
}
|
||||
<li className="nav-item">
|
||||
<Link className={`nav-link ellipsis ${this.getActiveClass('published')}`} to={siteRoot + 'published/'} title={gettext('Published Libraries')} onClick={(e) => this.tabItemClick(e, 'published')}>
|
||||
<Link className={`nav-link ellipsis ${this.getActiveClass('published')}`} to={siteRoot + 'published/'} title={gettext('Wikis')} onClick={(e) => this.tabItemClick(e, 'published')}>
|
||||
<span className="sf2-icon-wiki-view" aria-hidden="true"></span>
|
||||
<span className="nav-text">{gettext('Published Libraries')}</span>
|
||||
<span className="nav-text">{gettext('Wikis')}</span>
|
||||
</Link>
|
||||
</li>
|
||||
<li className="nav-item">
|
||||
|
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
|
||||
import { Dropdown, DropdownToggle, DropdownItem } from 'reactstrap';
|
||||
import PropTypes from 'prop-types';
|
||||
import moment from 'moment';
|
||||
import { siteRoot, gettext } from '../../utils/constants';
|
||||
import { siteRoot, gettext, username } from '../../utils/constants';
|
||||
import { Utils } from '../../utils/utils';
|
||||
// import { seafileAPI } from '../../utils/seafile-api';
|
||||
// import Toast from '../toast';
|
||||
@@ -136,6 +136,7 @@ class WikiListItem extends Component {
|
||||
let wiki = this.props.wiki;
|
||||
let userProfileURL = `${siteRoot}profile/${encodeURIComponent(wiki.owner)}/`;
|
||||
let fileIconUrl = Utils.getDefaultLibIconUrl(false);
|
||||
const isWikiOwner = wiki.owner === username;
|
||||
|
||||
const desktopItem = (
|
||||
<tr
|
||||
@@ -154,14 +155,16 @@ class WikiListItem extends Component {
|
||||
</td>
|
||||
<td><a href={userProfileURL} target='_blank' rel="noreferrer">{wiki.owner_nickname}</a></td>
|
||||
<td>{moment(wiki.updated_at).fromNow()}</td>
|
||||
<td className="text-center cursor-pointer">
|
||||
<td className="text-center cursor-pointer align-top">
|
||||
{isWikiOwner &&
|
||||
<span
|
||||
className={`iconfont icon-edit mr-4 action-icon ${this.state.highlight ? '' : 'invisible'}`}
|
||||
onClick={() => window.open(wiki.link.replace('/published/', '/edit-wiki/'))}
|
||||
title={gettext('Edit')}
|
||||
aria-label={gettext('Edit')}
|
||||
style={{color: '#999'}}
|
||||
style={{color: '#999', fontSize: '20px'}}
|
||||
></span>
|
||||
}
|
||||
<a
|
||||
href="#"
|
||||
role="button"
|
||||
|
Reference in New Issue
Block a user