diff --git a/frontend/src/components/dir-view-mode/dir-others.js b/frontend/src/components/dir-view-mode/dir-others.js index 7e5b1759e1..58417ca910 100644 --- a/frontend/src/components/dir-view-mode/dir-others.js +++ b/frontend/src/components/dir-view-mode/dir-others.js @@ -7,13 +7,12 @@ import TreeSection from '../tree-section'; const DirOthers = ({ userPerm, repoID, currentPath }) => { let trashUrl = null; - let historyUrl = null; + const historyUrl = siteRoot + 'repo/history/' + repoID + '/'; if (userPerm === 'rw' && !Utils.isMarkdownFile(currentPath)) { if (Utils.getFileName(currentPath)) { trashUrl = siteRoot + 'repo/' + repoID + '/trash/?path=' + encodeURIComponent(currentPath); } else { trashUrl = siteRoot + 'repo/' + repoID + '/trash/'; - historyUrl = siteRoot + 'repo/history/' + repoID + '/'; } } @@ -29,16 +28,14 @@ const DirOthers = ({ userPerm, repoID, currentPath }) => { } - {historyUrl && -
location.href = historyUrl}> -
{gettext('History')}
-
-
- -
+
location.href = historyUrl}> +
{gettext('History')}
+
+
+
- } +
); };