1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-06-22 13:18:42 +00:00

fix wiki pages style && tagged files link (#2823)

* fix wiki pages style && tagged files link

* use Fragment
This commit is contained in:
王健辉 2019-01-14 13:30:06 +08:00 committed by Daniel Pan
parent 693770685c
commit 2cdba5012a
3 changed files with 23 additions and 21 deletions

View File

@ -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">

View File

@ -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,6 +82,8 @@ class MainPanel extends Component {
return (
<div className="main-panel wiki-main-panel o-hidden">
<div className="main-panel-top panel-top">
{loginUser &&
<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>
{
@ -89,19 +91,23 @@ class MainPanel extends Component {
<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>
<div className="cur-view-container">
<div className="cur-view-path">
<div className="path-containter">
{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>

View File

@ -787,6 +787,7 @@ a.sf-popover-item:hover {
border-bottom: 1px solid #e8e8e8;
display:flex;
flex-shrink:0;
min-height: 49px;
}
/* top logo */