1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-13 05:39:59 +00:00

Markdown previewer location (#3833)

* Change the position in the markdown preview page

* modify func name

* optimization code
This commit is contained in:
zxj96
2019-07-10 15:53:47 +08:00
committed by Daniel Pan
parent 514302a7b2
commit d1923e4850
2 changed files with 7 additions and 8 deletions

View File

@@ -85,6 +85,11 @@ class ViewFileToolbar extends React.Component {
});
}
onHistoryClick = () => {
let historyUrl = siteRoot + 'repo/file_revisions/' + this.props.repoID + '/?p=' + Utils.encodePath(this.props.path);
location.href = historyUrl;
}
render() {
let { filePermission } = this.props;
let name = Utils.getFileName(this.props.path);
@@ -114,6 +119,7 @@ class ViewFileToolbar extends React.Component {
}
<DropdownItem onClick={this.onEditFileTagToggle}>{gettext('Tags')}</DropdownItem>
<DropdownItem onClick={this.onListRelatedFileToggle}>{gettext('Related Files')}</DropdownItem>
<DropdownItem onClick={this.onHistoryClick}>{gettext('History')}</DropdownItem>
</DropdownMenu>
</Dropdown>
)}