diff --git a/demo-shell/resources/i18n/en.json b/demo-shell/resources/i18n/en.json index b09db9a03d..9589d50b36 100644 --- a/demo-shell/resources/i18n/en.json +++ b/demo-shell/resources/i18n/en.json @@ -5,6 +5,11 @@ "COMMENTS": "Comments", "PROPERTIES": "Properties", "VERSIONS": "Versions" + }, + "ADF_VERSION_MANAGER": { + "ALLOW_DELETE": "Allow delete", + "SHOW_COMMENTS" : "Show comments on versions", + "ALLOW_DOWNLOAD" :"Enable version download" } }, "title": "Welcome", @@ -67,11 +72,9 @@ "CUSTOM_FILTER" :"Custom extensions filter", "MAX_SIZE" : "Max size filter", "ENABLE_VERSIONING" :"Enable versioning", - "ENABLE_VERSION_DOWNLOAD" :"Enable version download", "DESCRIPTION_UPLOAD" : "Enable upload", "ENABLE_INFINITE_SCROLL":"Enable Infinite Scrolling", "MULTISELECT_DESCRIPTION" : "Use Cmd (Mac) or Ctrl (Windows) to toggle selection of multiple items", - "SHOW_VERSION_COMMENTS" : "Show comments on versions", "RECENT" : { "EMPTY_STATE": { "TITLE": "Recent is empty" diff --git a/demo-shell/src/app.config.json b/demo-shell/src/app.config.json index e55d910b5f..1028d7377c 100644 --- a/demo-shell/src/app.config.json +++ b/demo-shell/src/app.config.json @@ -484,5 +484,10 @@ "exif:exif": "*" } } + }, + "adf-version-manager": { + "allowComments": true, + "allowDownload": true, + "allowDelete": true } } diff --git a/demo-shell/src/app/components/files/files.component.html b/demo-shell/src/app/components/files/files.component.html index 084ba7dd2e..28278682bf 100644 --- a/demo-shell/src/app/components/files/files.component.html +++ b/demo-shell/src/app/components/files/files.component.html @@ -362,7 +362,8 @@ + [allowDownload]="allowVersionDownload" + [allowDelete]="allowVersionDelete"> @@ -437,23 +438,32 @@ - {{'DOCUMENT_LIST.ENABLE_VERSIONING' | - translate}} + + {{'DOCUMENT_LIST.ENABLE_VERSIONING' | translate}} - + {{'DOCUMENT_LIST.ENABLE_INFINITE_SCROLL' | translate}} - - {{'DOCUMENT_LIST.SHOW_VERSION_COMMENTS' | translate}} + + {{'APP.ADF_VERSION_MANAGER.SHOW_COMMENTS' | translate}} - - {{'DOCUMENT_LIST.ENABLE_VERSION_DOWNLOAD' | translate}} + + + + + {{'APP.ADF_VERSION_MANAGER.ALLOW_DOWNLOAD' | translate}} + + + + + + {{'APP.ADF_VERSION_MANAGER.ALLOW_DELETE' | translate}} diff --git a/demo-shell/src/app/components/files/files.component.ts b/demo-shell/src/app/components/files/files.component.ts index 6124d90346..063329055e 100644 --- a/demo-shell/src/app/components/files/files.component.ts +++ b/demo-shell/src/app/components/files/files.component.ts @@ -103,7 +103,10 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy { versioning = false; @Input() - enableVersionDownload = true; + allowVersionDownload = true; + + @Input() + allowVersionDelete = true; @Input() acceptedFilesType = '.jpg,.pdf,.js'; @@ -365,11 +368,11 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy { onManageVersions(event) { const contentEntry = event.value.entry; const showComments = this.showVersionComments; - const enableDownload = this.enableVersionDownload; + const allowDownload = this.allowVersionDownload; if (this.contentService.hasPermission(contentEntry, 'update')) { this.dialog.open(VersionManagerDialogAdapterComponent, { - data: { contentEntry, showComments, enableDownload }, + data: { contentEntry, showComments, allowDownload }, panelClass: 'adf-version-manager-dialog', width: '630px' }); diff --git a/demo-shell/src/app/components/files/version-manager-dialog-adapter.component.html b/demo-shell/src/app/components/files/version-manager-dialog-adapter.component.html index 509c3bb54a..ffb418667d 100644 --- a/demo-shell/src/app/components/files/version-manager-dialog-adapter.component.html +++ b/demo-shell/src/app/components/files/version-manager-dialog-adapter.component.html @@ -1,6 +1,6 @@ {{'VERSION.DIALOG.TITLE' | translate}} - +