mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[MNT-24660] version list action cannot be disabled using app conf (#10308)
* MNT-24660 Added possibility to hide and show viewing of versions when calling openUploadNewVersionDialog function * MNT-24660 Unit tests * MNT-24660 Allow to set allowVersionDelete and showActions by new version uploader service * MNT-24660 Unit tests and documentation * MNT-24660 Reformated documentation table * MNT-24660 Fixed sonar issues * MNT-24660 Fix sonar and additional fixes
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
---
|
||||
Title: Version List component
|
||||
Added: v4.1.1
|
||||
Status: Active
|
||||
Last reviewed: 2024-10-21
|
||||
---
|
||||
|
||||
# [New Version Uploader dialog](../../../lib/content-services/src/lib/new-version-uploader/new-version-uploader.dialog.ts "Defined in new-version-uploader.dialog.ts")
|
||||
|
||||
Displays list of versions history of a node in a dialog.
|
||||
|
||||

|
||||
### Basic Usage
|
||||
|
||||
```ts
|
||||
this.dialog.open<NewVersionUploaderDialogComponent, NewVersionUploaderDialogData>(
|
||||
NewVersionUploaderDialogComponent,
|
||||
{
|
||||
data: {
|
||||
file,
|
||||
node,
|
||||
currentVersion: version,
|
||||
showComments: true,
|
||||
allowDownload: true,
|
||||
showVersionsOnly: true,
|
||||
allowViewVersions: true,
|
||||
allowVersionDelete: true,
|
||||
showActions: true
|
||||
},
|
||||
width: '630px'
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
|--------------|--------------------------------------------------------------------------------------|-----------------------------------|
|
||||
| dialogAction | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<NewVersionUploaderData>` | Emitted when any action occurs. |
|
||||
| uploadError | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when upload error occurs. |
|
||||
|
||||
## Details
|
||||
|
||||
This component can be used by calling openUploadNewVersionDialog function of [New Version Uploader service](../services/new-version-uploader.dialog.service.md).
|
||||
|
||||
## See also
|
||||
|
||||
- [Version manager component](version-manager.component.md)
|
||||
- [New Version Uploader service](../services/new-version-uploader.dialog.service.md)
|
||||
- [Version List component](version-list.component.md)
|
@@ -1,7 +1,7 @@
|
||||
---
|
||||
Title: Version List component
|
||||
Added: v2.0.0
|
||||
Status: Experimental
|
||||
Status: Active
|
||||
Last reviewed: 2019-01-16
|
||||
---
|
||||
|
||||
@@ -19,21 +19,22 @@ Displays the version history of a node in a [Version Manager component](version-
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| allowDownload | `boolean` | true | Enable/disable downloading a version of the current node. |
|
||||
| allowViewVersions | `boolean` | true | Enable/disable viewing a version of the current node. |
|
||||
| node | `Node` | | The target node. |
|
||||
| showActions | `boolean` | true | Toggles showing/hiding of version actions |
|
||||
| showComments | `boolean` | true | Toggles showing/hiding of comments |
|
||||
| Name | Type | Default value | Description |
|
||||
|--------------------|-----------|---------------|-----------------------------------------------------------|
|
||||
| allowDownload | `boolean` | true | Enable/disable downloading a version of the current node. |
|
||||
| allowViewVersions | `boolean` | true | Enable/disable viewing a version of the current node. |
|
||||
| node | `Node` | | The target node. |
|
||||
| showActions | `boolean` | true | Toggles showing/hiding of version actions |
|
||||
| showComments | `boolean` | true | Toggles showing/hiding of comments |
|
||||
| allowVersionDelete | `boolean` | true | Enable/disable deletion of version |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| deleted | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Node>` | Emitted when a version is deleted |
|
||||
| restored | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Node>` | Emitted when a version is restored |
|
||||
| viewVersion | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when viewing a version |
|
||||
| Name | Type | Description |
|
||||
|-------------|----------------------------------------------------------------------|------------------------------------|
|
||||
| deleted | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Node>` | Emitted when a version is deleted |
|
||||
| restored | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Node>` | Emitted when a version is restored |
|
||||
| viewVersion | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when viewing a version |
|
||||
|
||||
## Details
|
||||
|
||||
@@ -49,3 +50,5 @@ If you want show readonly version list you set this component with showActions f
|
||||
## See also
|
||||
|
||||
- [Version manager component](version-manager.component.md)
|
||||
- [New Version Uploader service](../services/new-version-uploader.dialog.service.md)
|
||||
- [New Version Uploader component](new-version-uploader.dialog.md)
|
||||
|
@@ -1,7 +1,7 @@
|
||||
---
|
||||
Title: Version Manager Component
|
||||
Added: v2.0.0
|
||||
Status: Experimental
|
||||
Status: Active
|
||||
Last reviewed: 2019-01-16
|
||||
---
|
||||
|
||||
@@ -11,8 +11,6 @@ Displays the version history of a node with the ability to upload a new version.
|
||||
|
||||

|
||||
|
||||
`This component is still in experimental phase. It has several limitations which will be resolved soon.`
|
||||
|
||||
## Basic Usage
|
||||
|
||||
```html
|
||||
@@ -27,13 +25,16 @@ Displays the version history of a node with the ability to upload a new version.
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| allowDownload | `boolean` | true | Enable/disable downloading a version of the current node. |
|
||||
| newFileVersion | `File` | | New file for updating current version. |
|
||||
| node | `Node` | | Target node to manage version history. |
|
||||
| showComments | `boolean` | true | Toggles showing/hiding of comments. |
|
||||
| showVersionComparison | `boolean` | false | Toggles showing/hiding the [version comparison component](../../content-services/components/version-comparison.component.md). |
|
||||
| Name | Type | Default value | Description |
|
||||
|-----------------------|-----------|---------------|-------------------------------------------------------------------------------------------------------------------------------|
|
||||
| allowDownload | `boolean` | true | Enable/disable downloading a version of the current node. |
|
||||
| newFileVersion | `File` | | New file for updating current version. |
|
||||
| node | `Node` | | Target node to manage version history. |
|
||||
| showComments | `boolean` | true | Toggles showing/hiding of comments. |
|
||||
| showVersionComparison | `boolean` | false | Toggles showing/hiding the [version comparison component](../../content-services/components/version-comparison.component.md). |
|
||||
| showActions | `boolean` | true | Toggles showing/hiding of version actions. |
|
||||
| allowViewVersions | `boolean` | true | Enable/disable viewing versions of the current node. |
|
||||
| allowVersionDelete | `boolean` | true | Enable/disable deletion of version |
|
||||
|
||||
### Events
|
||||
|
||||
@@ -50,11 +51,16 @@ Displays the version history of a node with the ability to upload a new version.
|
||||
|
||||
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. |
|
||||
| Action | Versions | Description |
|
||||
|----------|----------|-----------------------------------------------------------------------------------|
|
||||
| View | All | View selected version. |
|
||||
| Restore | All | Revert the current version to the selected one with creating a new version of it. |
|
||||
| Download | All | Download selected version. |
|
||||
| Delete | All | Delete selected version. |
|
||||
|
||||
## See also
|
||||
|
||||
- [Version list component](version-list.component.md)
|
||||
- [Document list component](document-list.component.md)
|
||||
- [New Version Uploader service](../services/new-version-uploader.dialog.service.md)
|
||||
- [New Version Uploader component](new-version-uploader.dialog.md)
|
||||
|
@@ -88,6 +88,6 @@ yourFunctionToOpenDialog(){
|
||||
|
||||
## See Also
|
||||
|
||||
- [Version list component](../components/docs/content-services/components/version-list.component.md)
|
||||
- [Version Comparison Component](../components/docs/content-services/components/version-comparison.component.md)
|
||||
- [Version Upload Component](../components/docs/content-services/components/version-upload.component.md)
|
||||
- [Version list component](../components/version-list.component.md)
|
||||
- [Version Comparison Component](../components/version-comparison.component.md)
|
||||
- [Version Upload Component](../components/version-upload.component.md)
|
||||
|
Reference in New Issue
Block a user