mirror of
https://github.com/haiwen/seahub.git
synced 2025-06-22 05:08:33 +00:00
fix wiki pages style && tagged files link (#2823)
* fix wiki pages style && tagged files link * use Fragment
This commit is contained in:
parent
693770685c
commit
2cdba5012a
@ -61,12 +61,7 @@ class ListTaggedFilesDialog extends React.Component {
|
||||
<tbody>
|
||||
{taggedFileList.map((taggedFile, index) => {
|
||||
let path = Utils.joinPath(taggedFile.parent_path, taggedFile.filename);
|
||||
let href = '';
|
||||
if (Utils.isMarkdownFile(path)) {
|
||||
href = siteRoot + 'wiki/lib/' + this.props.repoID + Utils.encodePath(path);
|
||||
} else {
|
||||
href = siteRoot + 'lib/' + this.props.repoID + '/file' + Utils.encodePath(path);
|
||||
}
|
||||
let href = siteRoot + 'lib/' + this.props.repoID + '/file' + Utils.encodePath(path);
|
||||
return (
|
||||
<tr key={index}>
|
||||
<td className="name">
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { Component } from 'react';
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { gettext, repoID, slug, siteRoot } from '../../utils/constants';
|
||||
import CommonToolbar from '../../components/toolbar/common-toolbar';
|
||||
@ -82,26 +82,32 @@ class MainPanel extends Component {
|
||||
return (
|
||||
<div className="main-panel wiki-main-panel o-hidden">
|
||||
<div className="main-panel-top panel-top">
|
||||
<div className="cur-view-toolbar border-left-show">
|
||||
<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>
|
||||
}
|
||||
</div>
|
||||
{loginUser &&
|
||||
<CommonToolbar
|
||||
repoID={repoID}
|
||||
onSearchedClick={this.props.onSearchedClick}
|
||||
searchPlaceholder={gettext('Search files in this library')}
|
||||
/>
|
||||
<Fragment>
|
||||
<div className="cur-view-toolbar border-left-show">
|
||||
<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>
|
||||
}
|
||||
</div>
|
||||
<CommonToolbar
|
||||
repoID={repoID}
|
||||
onSearchedClick={this.props.onSearchedClick}
|
||||
searchPlaceholder={gettext('Search files in this library')}
|
||||
/>
|
||||
</Fragment>
|
||||
}
|
||||
</div>
|
||||
<div className="cur-view-container">
|
||||
<div className="cur-view-path">
|
||||
<div className="path-containter">
|
||||
<a href={siteRoot + 'wikis/'} className="normal">{gettext('Wikis')}</a>
|
||||
<span className="path-split">/</span>
|
||||
{loginUser &&
|
||||
<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>
|
||||
{pathElem}
|
||||
</div>
|
||||
|
@ -787,6 +787,7 @@ a.sf-popover-item:hover {
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
display:flex;
|
||||
flex-shrink:0;
|
||||
min-height: 49px;
|
||||
}
|
||||
|
||||
/* top logo */
|
||||
|
Loading…
Reference in New Issue
Block a user