[jb] Make back button from editing a file more obvious
@@ -44,6 +44,14 @@ ${ fb_components.menubar() }
<!-- ko if: $root.file -->
<ul class="nav nav-list">
<!-- ko if: $root.isViewing -->
+ <li><a href="${url('filebrowser.views.view', path=dirname_enc)}"><i class="fa fa-reply"></i> ${_('Back')}</a></li>
+
+ <!-- ko if: $root.file().view.compression() && $root.file().view.compression() === "none" && $root.file().editable -->
+ <li><a class="pointer" data-bind="click: $root.editFile"><i class="fa fa-pencil"></i> ${_('Edit file')}</a></li>
+ <!-- /ko -->
+
+ <li><a class="pointer" data-bind="click: changePage"><i class="fa fa-refresh"></i> ${_('Refresh')}</a></li>
+
<!-- ko if: $root.file().view.mode() === 'binary' -->
<li><a class="pointer" data-bind="click: function(){ switchMode('text'); }"><i class="fa fa-font"></i> ${_('View as text')}</a></li>
<!-- /ko -->
@@ -67,11 +75,8 @@ ${ fb_components.menubar() }
<!-- ko if: $root.file().view.compression() && $root.file().view.compression() !== "none" -->
<li><a class="pointer" data-bind="click: function(){ switchCompression('none'); }"><i class="fa fa-times-circle"></i> ${_('Stop preview')}</a></li>
<!-- /ko -->
-
- <!-- ko if: $root.file().view.compression() && $root.file().view.compression() === "none" && $root.file().editable -->
- <li><a class="pointer" data-bind="click: $root.editFile"><i class="fa fa-pencil"></i> ${_('Edit file')}</a></li>
- <!-- /ko -->
<!-- /ko -->
+
<!-- ko ifnot: $root.isViewing -->
<li><a class="pointer" data-bind="click: $root.viewFile"><i class="fa fa-eye"></i> ${_('View file')}</a></li>
<!-- /ko -->
@@ -80,8 +85,6 @@ ${ fb_components.menubar() }
<!-- ko if: $root.file().show_download_button -->
<li><a class="pointer" data-bind="click: $root.downloadFile"><i class="fa fa-download"></i> ${_('Download')}</a></li>
<!-- /ko -->
- <li><a href="${url('filebrowser.views.view', path=dirname_enc)}"><i class="fa fa-file-text"></i> ${_('View file location')}</a></li>
- <li><a class="pointer" data-bind="click: changePage"><i class="fa fa-refresh"></i> ${_('Refresh')}</a></li>
<!-- /ko -->
<!-- ko if: $root.file().stats -->
