|
@@ -576,15 +576,17 @@ from filebrowser.conf import ENABLE_EXTRACT_UPLOADED_ARCHIVE
|
|
|
<!-- actions context menu -->
|
|
<!-- actions context menu -->
|
|
|
<ul class="context-menu dropdown-menu">
|
|
<ul class="context-menu dropdown-menu">
|
|
|
<!-- ko ifnot: $root.inTrash -->
|
|
<!-- ko ifnot: $root.inTrash -->
|
|
|
- <li data-bind="visible: !isS3() || (isS3() && !isS3Root())"><a href="#" title="${_('Rename')}" data-bind="visible: !$root.inTrash() && $root.selectedFiles().length == 1, click: $root.renameFile,
|
|
|
|
|
- enable: $root.selectedFiles().length == 1 && isCurrentDirSelected().length == 0"><i class="fa fa-fw fa-font"></i>
|
|
|
|
|
|
|
+ <li data-bind="visible: !isS3() || (isS3() && !isS3Root()), css: {'disabled': $root.selectedFiles().length != 1 || isCurrentDirSelected().length > 0}">
|
|
|
|
|
+ <a href="#" title="${_('Rename')}" data-bind="click: ($root.selectedFiles().length == 1 && isCurrentDirSelected().length == 0) ? $root.renameFile: void(0)"><i class="fa fa-fw fa-font"></i>
|
|
|
${_('Rename')}</a></li>
|
|
${_('Rename')}</a></li>
|
|
|
- <li data-bind="visible: !isS3() || (isS3() && !isS3Root())"><a href="#" title="${_('Move')}" data-bind="click: $root.move, enable: $root.selectedFiles().length > 0 &&
|
|
|
|
|
- isCurrentDirSelected().length == 0"><i class="fa fa-fw fa-random"></i> ${_('Move')}</a></li>
|
|
|
|
|
- <li data-bind="visible: !isS3() || (isS3() && !isS3Root())"><a href="#" title="${_('Copy')}" data-bind="click: $root.copy, enable: $root.selectedFiles().length > 0 &&
|
|
|
|
|
- isCurrentDirSelected().length == 0"><i class="fa fa-fw fa-files-o"></i> ${_('Copy')}</a></li>
|
|
|
|
|
|
|
+ <li data-bind="visible: !isS3() || (isS3() && !isS3Root()), css: {'disabled': $root.selectedFiles().length == 0 || isCurrentDirSelected().length > 0}">
|
|
|
|
|
+ <a href="#" title="${_('Move')}" data-bind="click: ( $root.selectedFiles().length > 0 && isCurrentDirSelected().length == 0) ? $root.move: void(0)"><i class="fa fa-fw fa-random"></i> ${_('Move')}</a></li>
|
|
|
|
|
+ <li data-bind="visible: !isS3() || (isS3() && !isS3Root()), css: {'disabled': $root.selectedFiles().length == 0 || isCurrentDirSelected().length > 0}">
|
|
|
|
|
+ <a href="#" title="${_('Copy')}" data-bind="click: ($root.selectedFiles().length > 0 && isCurrentDirSelected().length == 0) ? $root.copy: void(0)"><i class="fa fa-fw fa-files-o"></i> ${_('Copy')}</a></li>
|
|
|
% if show_download_button:
|
|
% if show_download_button:
|
|
|
- <li><a href="#" title="${_('Download')}" data-bind="visible: !$root.inTrash() && $root.selectedFiles().length == 1 && selectedFile().type == 'file', click: $root.downloadFile"><i class="fa fa-fw fa-arrow-circle-o-down"></i> ${_('Download')}</a></li>
|
|
|
|
|
|
|
+ <li data-bind="css: {'disabled': $root.inTrash() || $root.selectedFiles().length != 1 || selectedFile().type != 'file'}">
|
|
|
|
|
+ <a href="#" title="${_('Download')}" data-bind="click: (!$root.inTrash() && $root.selectedFiles().length == 1 && selectedFile().type == 'file') ? $root.downloadFile: void(0)">
|
|
|
|
|
+ <i class="fa fa-fw fa-arrow-circle-o-down"></i> ${_('Download')}</a></li>
|
|
|
% endif
|
|
% endif
|
|
|
<li class="divider" data-bind="visible: !isS3()"></li>
|
|
<li class="divider" data-bind="visible: !isS3()"></li>
|
|
|
% if is_fs_superuser:
|
|
% if is_fs_superuser:
|
|
@@ -601,23 +603,27 @@ from filebrowser.conf import ENABLE_EXTRACT_UPLOADED_ARCHIVE
|
|
|
</li>
|
|
</li>
|
|
|
<li class="divider" data-bind="visible: !isS3() || (isS3() && !isS3Root())"></li>
|
|
<li class="divider" data-bind="visible: !isS3() || (isS3() && !isS3Root())"></li>
|
|
|
% if is_trash_enabled:
|
|
% if is_trash_enabled:
|
|
|
- <li><a href="#" data-bind="enable: $root.selectedFiles().length > 0 && isCurrentDirSelected().length == 0, click: $root.trashSelected"><i class="fa fa-fw fa-times"></i> ${_('Move to trash')}</a></li>
|
|
|
|
|
|
|
+ <li data-bind="css: {'disabled': $root.selectedFiles().length == 0 || isCurrentDirSelected().length > 0}">
|
|
|
|
|
+ <a href="#" data-bind="click: ($root.selectedFiles().length > 0 && isCurrentDirSelected().length == 0) ? $root.trashSelected: void(0)">
|
|
|
|
|
+ <i class="fa fa-fw fa-times"></i> ${_('Move to trash')}</a></li>
|
|
|
%endif
|
|
%endif
|
|
|
<li><a href="#" class="delete-link" title="${_('Delete forever')}" data-bind="enable: $root.selectedFiles().length > 0, click: $root.deleteSelected"><i class="fa fa-fw fa-bolt"></i> ${_('Delete forever')}</a></li>
|
|
<li><a href="#" class="delete-link" title="${_('Delete forever')}" data-bind="enable: $root.selectedFiles().length > 0, click: $root.deleteSelected"><i class="fa fa-fw fa-bolt"></i> ${_('Delete forever')}</a></li>
|
|
|
<li class="divider" data-bind="visible: !isS3()"></li>
|
|
<li class="divider" data-bind="visible: !isS3()"></li>
|
|
|
<li data-bind="css: {'disabled': selectedFiles().length > 1 }, visible: !isS3()">
|
|
<li data-bind="css: {'disabled': selectedFiles().length > 1 }, visible: !isS3()">
|
|
|
<a class="pointer" data-bind="click: function(){ selectedFiles().length == 1 ? showSummary(): void(0)}"><i class="fa fa-fw fa-pie-chart"></i> ${_('Summary')}</a>
|
|
<a class="pointer" data-bind="click: function(){ selectedFiles().length == 1 ? showSummary(): void(0)}"><i class="fa fa-fw fa-pie-chart"></i> ${_('Summary')}</a>
|
|
|
</li>
|
|
</li>
|
|
|
- <li>
|
|
|
|
|
- <a href="javascript: void(0)" title="${_('Set Replication')}" data-bind="visible: !inTrash() && !isS3() && selectedFiles().length == 1 && selectedFile().type == 'file', click: setReplicationFactor">
|
|
|
|
|
|
|
+ <li data-bind="css: {'disabled': inTrash() || isS3() || selectedFiles().length != 1 || selectedFile().type != 'file'}">
|
|
|
|
|
+ <a href="javascript: void(0)" title="${_('Set Replication')}" data-bind="click: (!inTrash() && !isS3() && selectedFiles().length == 1 && selectedFile().type == 'file') ? setReplicationFactor: void(0)">
|
|
|
<i class="fa fa-fw fa-hdd-o"></i> ${_('Set replication')}
|
|
<i class="fa fa-fw fa-hdd-o"></i> ${_('Set replication')}
|
|
|
</a>
|
|
</a>
|
|
|
</li>
|
|
</li>
|
|
|
% if ENABLE_EXTRACT_UPLOADED_ARCHIVE.get():
|
|
% if ENABLE_EXTRACT_UPLOADED_ARCHIVE.get():
|
|
|
- <li><a href="javascript: void(0)" title="${_('Compress selection into a single archive')}" data-bind="click: function() { setCompressArchiveDefault(); confirmCompressFiles();}, visible: showCompressButton">
|
|
|
|
|
|
|
+ <li data-bind="css: {'disabled': ! showCompressButton}">
|
|
|
|
|
+ <a href="javascript: void(0)" title="${_('Compress selection into a single archive')}" data-bind="click: function() { if(showCompressButton) { setCompressArchiveDefault(); confirmCompressFiles();}}">
|
|
|
<i class="fa fa-fw fa-file-archive-o"></i> ${_('Compress')}</a>
|
|
<i class="fa fa-fw fa-file-archive-o"></i> ${_('Compress')}</a>
|
|
|
</li>
|
|
</li>
|
|
|
- <li><a href="javascript: void(0)" title="${_('Extract selected archive')}" data-bind="visible: selectedFiles().length == 1 && isArchive() && !isS3(), click: confirmExtractArchive">
|
|
|
|
|
|
|
+ <li data-bind="css: {'disabled': selectedFiles().length != 1 || !isArchive() || isS3()}">
|
|
|
|
|
+ <a href="javascript: void(0)" title="${_('Extract selected archive')}" data-bind="click: (selectedFiles().length == 1 && isArchive() && !isS3()) ? confirmExtractArchive : void(0)">
|
|
|
<i class="fa fa-fw fa-file-archive-o"></i> ${_('Extract')}</a>
|
|
<i class="fa fa-fw fa-file-archive-o"></i> ${_('Extract')}</a>
|
|
|
</li>
|
|
</li>
|
|
|
% endif
|
|
% endif
|