1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-17 07:41:26 +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

@@ -87,14 +87,7 @@ class DirTool extends React.Component {
let trashUrl = siteRoot + 'repo/' + repoID + '/trash/';
let historyUrl = siteRoot + 'repo/history/' + repoID + '/';
if (permission) {
if (isFile) { // isFile
historyUrl = siteRoot + 'repo/file_revisions/' + repoID + '/?p=' + Utils.encodePath(currentPath);
return (
<ul className="path-toolbar">
<li className="toolbar-item"><a className="op-link sf2-icon-history" href={historyUrl} title={gettext('History')} aria-label={gettext('History')}></a></li>
</ul>
);
} else {
if (!isFile) {
if (name) { // name not '' is not root path
trashUrl = siteRoot + 'repo/' + repoID + '/trash/?path=' + encodeURIComponent(currentPath);
return (