1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-04 00:20:07 +00:00

View mode improve (#2984)

* improve file content layout

* repair review tab padding bug

* combine operation btn

* update code style
This commit is contained in:
杨顺强
2019-02-22 15:35:31 +08:00
committed by Daniel Pan
parent 91fa00944f
commit 3113e5f5d6
7 changed files with 86 additions and 83 deletions

View File

@@ -66,35 +66,33 @@ class DirColumnFile extends React.Component {
);
}
return (
<div className="cur-view-content">
<WikiMarkdownViewer
isTOCShow={false}
isFileLoading={this.props.isFileLoading}
markdownContent={this.props.content}
lastModified = {this.props.lastModified}
latestContributor={this.props.latestContributor}
onLinkClick={this.props.onLinkClick}
>
<Fragment>
{this.props.reviewStatus === 'open' &&
<div className='seafile-btn-view-review text-center'>
<div className='tag tag-green'>
{gettext('This file is in review stage')}
<span className="ml-2" onClick={this.goReviewPage}>{gettext('View Review')}</span>
</div>
<WikiMarkdownViewer
isTOCShow={false}
isFileLoading={this.props.isFileLoading}
markdownContent={this.props.content}
lastModified = {this.props.lastModified}
latestContributor={this.props.latestContributor}
onLinkClick={this.props.onLinkClick}
>
<Fragment>
{this.props.reviewStatus === 'open' &&
<div className='seafile-btn-view-review text-center'>
<div className='tag tag-green'>
{gettext('This file is in review stage')}
<span className="ml-2" onClick={this.goReviewPage}>{gettext('View Review')}</span>
</div>
}
{(this.props.reviewStatus !== 'open' && !this.props.isDraft && this.props.hasDraft) &&
<div className='seafile-btn-view-review text-center'>
<div className='tag tag-green'>
{gettext('This file is in draft stage.')}
<span className="ml-2" onClick={this.goDraftPage}>{gettext('Edit Draft')}</span>
</div>
</div>
}
{(this.props.reviewStatus !== 'open' && !this.props.isDraft && this.props.hasDraft) &&
<div className='seafile-btn-view-review text-center'>
<div className='tag tag-green'>
{gettext('This file is in draft stage.')}
<span className="ml-2" onClick={this.goDraftPage}>{gettext('Edit Draft')}</span>
</div>
}
</Fragment>
</WikiMarkdownViewer>
</div>
</div>
}
</Fragment>
</WikiMarkdownViewer>
);
}
}