mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-24 14:31:41 +00:00
added functionality to view a previous version (#5913)
This commit is contained in:
@@ -48,6 +48,10 @@ export class VersionListComponent implements OnChanges {
|
||||
@Input()
|
||||
allowDownload = true;
|
||||
|
||||
/** Enable/disable viewing a version of the current node. */
|
||||
@Input()
|
||||
allowViewVersions = true;
|
||||
|
||||
/** Toggles showing/hiding of version actions */
|
||||
@Input()
|
||||
showActions = true;
|
||||
@@ -60,6 +64,10 @@ export class VersionListComponent implements OnChanges {
|
||||
@Output()
|
||||
deleted: EventEmitter<Node> = new EventEmitter<Node>();
|
||||
|
||||
/** Emitted when viewing a version */
|
||||
@Output()
|
||||
viewVersion: EventEmitter<string> = new EventEmitter<string>();
|
||||
|
||||
constructor(private alfrescoApi: AlfrescoApiService,
|
||||
private contentService: ContentService,
|
||||
private dialog: MatDialog) {
|
||||
@@ -92,6 +100,10 @@ export class VersionListComponent implements OnChanges {
|
||||
}
|
||||
}
|
||||
|
||||
onViewVersion(versionId) {
|
||||
this.viewVersion.emit(versionId);
|
||||
}
|
||||
|
||||
loadVersionHistory() {
|
||||
this.isLoading = true;
|
||||
this.versionsApi.listVersionHistory(this.node.id).then((versionPaging: VersionPaging) => {
|
||||
|
Reference in New Issue
Block a user