mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1733] Restore files and folders from Trash (#2467)
* restore nodes * changed @Inputs implementation * NotificationService over mdSnackBar
This commit is contained in:
committed by
Denys Vuika
parent
a102a7ffb2
commit
bfe8fc8d15
52
docs/node-restore.directive.md
Normal file
52
docs/node-restore.directive.md
Normal file
@@ -0,0 +1,52 @@
|
||||
# Node Restore directive
|
||||
|
||||
<!-- markdown-toc start - Don't edit this section. npm run toc to generate it-->
|
||||
|
||||
<!-- toc -->
|
||||
|
||||
- [Basic Usage](#basic-usage)
|
||||
* [Properties](#properties)
|
||||
* [Events](#events)
|
||||
- [Details](#details)
|
||||
|
||||
<!-- tocstop -->
|
||||
|
||||
<!-- markdown-toc end -->
|
||||
|
||||
## Basic Usage
|
||||
|
||||
```html
|
||||
<adf-toolbar title="toolbar example">
|
||||
<button md-icon-button
|
||||
location="/files"
|
||||
[adf-restore]="documentList.selection"
|
||||
(restore)="documentList.reload()">
|
||||
<md-icon>restore</md-icon>
|
||||
</button>
|
||||
</adf-toolbar>
|
||||
|
||||
<adf-document-list #documentList
|
||||
currentFolderId="-trash-" ...>
|
||||
...
|
||||
</adf-document-list>
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| ----------------- | ------------------- | ------- | ------------------------------- |
|
||||
| adf-restore | DeletedNodeEntry[] | [] | Deleted nodes to restore |
|
||||
| location | string | '' | Route path to view restored node |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Description |
|
||||
| --------- | ------------------------------- |
|
||||
| restore | Raised when the restore is done |
|
||||
|
||||
## Details
|
||||
|
||||
'NodeRestoreDirective' directive takes a selection of `DeletedNodeEntry[]` and restores them in their original location.
|
||||
If the original location doesn't exist anymore, then they remain in the trash list.
|
||||
|
||||
For single node restore, there is action to jump to the location where the node has been restored and for this `location` is used to specify the route path where the list of nodes are rendered
|
Reference in New Issue
Block a user