From c7507c0c31261d81179c8d4dc513edd61aaf6ad2 Mon Sep 17 00:00:00 2001 From: Suzana Dirla Date: Thu, 5 Apr 2018 14:05:58 +0300 Subject: [PATCH] [ADF-2561] add showComments toggle on demo-shell (#3143) --- demo-shell/resources/i18n/en.json | 1 + demo-shell/src/app/components/files/files.component.html | 9 ++++++++- demo-shell/src/app/components/files/files.component.ts | 6 +++++- .../files/version-manager-dialog-adapter.component.html | 2 +- .../files/version-manager-dialog-adapter.component.ts | 2 ++ 5 files changed, 17 insertions(+), 3 deletions(-) diff --git a/demo-shell/resources/i18n/en.json b/demo-shell/resources/i18n/en.json index ad91af01e7..92f267e7fa 100644 --- a/demo-shell/resources/i18n/en.json +++ b/demo-shell/resources/i18n/en.json @@ -62,6 +62,7 @@ "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/components/files/files.component.html b/demo-shell/src/app/components/files/files.component.html index c9f7dde549..28c5d72b54 100644 --- a/demo-shell/src/app/components/files/files.component.html +++ b/demo-shell/src/app/components/files/files.component.html @@ -352,7 +352,8 @@ + [node]="documentList.selection[0].entry" + [showComments]="showVersionComments"> @@ -438,6 +439,12 @@ +
+ {{'DOCUMENT_LIST.SHOW_VERSION_COMMENTS' | + translate}} + +
+
Upload
diff --git a/demo-shell/src/app/components/files/files.component.ts b/demo-shell/src/app/components/files/files.component.ts index 3f255ceb2c..06648bf4b6 100644 --- a/demo-shell/src/app/components/files/files.component.ts +++ b/demo-shell/src/app/components/files/files.component.ts @@ -96,6 +96,9 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy { @Input() maxSizeShow = false; + @Input() + showVersionComments = true; + @Input() versioning = false; @@ -358,10 +361,11 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy { onManageVersions(event) { const contentEntry = event.value.entry; + const showComments = this.showVersionComments; if (this.contentService.hasPermission(contentEntry, 'update')) { this.dialog.open(VersionManagerDialogAdapterComponent, { - data: { contentEntry }, + data: { contentEntry, showComments }, 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 0be206cf1b..6a2dc154c8 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}}
- +