added functionality to view a previous version (#5913)

This commit is contained in:
Urse Daniel
2020-07-27 11:29:29 +03:00
committed by GitHub
parent 8d43155c14
commit 7c09fb1fb9
26 changed files with 337 additions and 111 deletions

View File

@@ -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) => {