mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2567] delete a version (#3151)
* configuration support for version manager * checkbox for version deletion demo * i18n support for version manager * deleting versions * confirmation dialog for version deletion * readme update * update schema * update code as per code review * update i18n resources for demo shell * unit tests
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
import { Component, Input, ViewEncapsulation, ViewChild, Output, EventEmitter } from '@angular/core';
|
||||
import { MinimalNodeEntryEntity } from 'alfresco-js-api';
|
||||
import { VersionListComponent } from './version-list.component';
|
||||
import { AppConfigService } from '@alfresco/adf-core';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-version-manager',
|
||||
@@ -31,20 +32,29 @@ export class VersionManagerComponent {
|
||||
node: MinimalNodeEntryEntity;
|
||||
|
||||
@Input()
|
||||
showComments: boolean = true;
|
||||
allowDelete = true;
|
||||
|
||||
@Input()
|
||||
enableDownload: boolean = true;
|
||||
showComments = true;
|
||||
|
||||
@Input()
|
||||
allowDownload = true;
|
||||
|
||||
@Output()
|
||||
uploadSuccess: EventEmitter<any> = new EventEmitter();
|
||||
uploadSuccess = new EventEmitter();
|
||||
|
||||
@Output()
|
||||
uploadError: EventEmitter<any> = new EventEmitter();
|
||||
uploadError = new EventEmitter();
|
||||
|
||||
@ViewChild('versionList')
|
||||
versionListComponent: VersionListComponent;
|
||||
|
||||
constructor(config: AppConfigService) {
|
||||
this.allowDelete = config.get('adf-version-manager.allowDelete', true);
|
||||
this.showComments = config.get('adf-version-manager.allowComments', true);
|
||||
this.allowDownload = config.get('adf-version-manager.allowDownload', true);
|
||||
}
|
||||
|
||||
onUploadSuccess(event): void {
|
||||
this.versionListComponent.loadVersionHistory();
|
||||
this.uploadSuccess.emit(event);
|
||||
|
Reference in New Issue
Block a user