Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ui-core] Add the copy action to the context menu on the documents page and left assist #3809

Merged
merged 3 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,13 @@ const TEMPLATE = `
'Show details'
)}</a></li>
<li><a href="javascript: void(0);" data-bind="click: open"><i class="fa fa-fw fa-edit"></i> ${I18n(
'Open document'
'Open'
)}</a></li>
<li><a href="javascript: void(0);" data-bind="click: function() { $data.selected(true); $data.parent.copy() }"><i class="fa fa-fw fa-files-o"></i> ${I18n(
'Copy'
)}</a></li>
<li><a href="javascript: void(0);" data-bind="click: function() { $data.selected(true); huePubSub.publish('doc.show.delete.modal', $data.parent); }"><i class="fa fa-fw fa-trash-o"></i> ${I18n(
'Delete document'
'Delete'
)}</a></li>
<!-- /ko -->
<!-- ko if: $containerContext.sharingEnabled -->
Expand Down
3 changes: 3 additions & 0 deletions desktop/core/src/desktop/templates/document_browser.mako
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,9 @@ else:
<li data-bind="css: { 'disabled': $parent.selectedEntries().length !== 1 }"><a href="javascript:void(0);" data-bind="click: showRenameDirectoryModal, css: { 'disabled': $parent.selectedEntries().length !== 1 }"><i class="fa fa-fw fa-edit"></i> ${ _('Rename') }</a></li>
<!-- /ko -->
<li data-bind="css: { 'disabled': $parent.selectedEntries().length !== 1 }"><a href="javascript:void(0);" data-bind="click: open, css: { 'disabled': $parent.selectedEntries().length !== 1 }"><i class="fa fa-fw fa-file-o"></i> ${ _('Open') }</a></li>
<li data-bind="css: { 'disabled': isDirectory() || isTrashed() }">
<a href="javascript:void(0);" data-bind="click: function () { $parent.copy() }, css: { 'disabled': isDirectory() || isTrashed() }"><i class="fa fa-fw fa-files-o"></i> ${_('Copy')} <span data-bind="visible: $parent.selectedEntries().length > 1, text: '(' + $parent.selectedEntries().length + ')'"></span></a>
</li>
<li><a href="javascript:void(0);" data-bind="click: contextMenuDownload"><i class="fa fa-fw fa-download"></i> ${ _('Download') } <span data-bind="visible: $parent.selectedEntries().length > 1, text: '(' + $parent.selectedEntries().length + ')'"></span></a></li>
<li data-bind="css: { 'disabled' : $parent.sharedWithMeSelected() && ! $parent.superuser }"><a href="javascript:void(0);" data-bind="click: function () { huePubSub.publish('doc.show.delete.modal', $parent); }, css: { 'disabled' : $parent.sharedWithMeSelected() && ! $parent.superuser }">
<i class="fa fa-fw fa-times"></i> ${ _('Move to trash') } <span data-bind="visible: $parent.selectedEntries().length > 1, text: '(' + $parent.selectedEntries().length + ')'"></span></a>
Expand Down
Loading