alfresco-ng2-components/docs/content-services/version-manager.component.md
Andy Stark 69d8ff147e [ADF-3323] Updated doc tools to use DocFX intermediate files (#3601)
* [ADF-3323] Moved source file parsing to main doc tool

* [ADF-3323] Moved source info classes

* [ADF-3323] Added doc YAML generator tool

* [ADF-3323] Added doc YAML/JSON source paths to gitignore

* [ADF-3323] Completed templates and template context code

* [ADF-3323] Added source paths and updated type linker

* [ADF-3323] Final fixes to templates and type linking

* [ADF-3323] Fixed filter for private and protected methods

* [ADF-3323] Content services docs after check and rebuild

* [ADF-3323] Updated docbuild script in package.json
2018-08-14 15:42:25 +01:00

56 lines
1.7 KiB
Markdown

---
Added: v2.0.0
Status: Experimental
Last reviewed: 2018-04-13
---
# Version Manager Component
Displays the version history of a node with the ability to upload a new version.
![Version Manager](../docassets/images/version-manager.png)
`This component is still in experimental phase. It has several limitations which will be resolved soon.`
## Basic Usage
```html
<adf-version-manager
[node]="aMinimalNodeEntryEntity"
(uploadSuccess)="customMethod($event)"
(uploadError)="customMethod2($event)">
</adf-version-manager>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| allowDownload | `boolean` | true | Enable/disable downloading a version of the current node. |
| node | [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) | | Target node to manage version history. |
| showComments | `boolean` | true | Toggles showing/hiding of comments. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| uploadError | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Object>` | Emitted when an error occurs during upload. |
| uploadSuccess | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Object>` | Emitted when a file is uploaded successfully. |
## Details
### Version actions
Each version has a context menu on the right, with the following actions.
| Action | Versions | Description |
| ------ | -------- | ----------- |
| Restore | All | Revert the current version to the selected one with creating a new version of it. |
## See also
- [Version list component](version-list.component.md)
- [Document list component](document-list.component.md)