From 72dbb0fdefc1532c7b9c47234e7b8f2f1bd8aa5a Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Mon, 6 Mar 2023 22:09:34 +0100 Subject: [PATCH] Themed FeedbackFormComponent --- .../themed-feedback-form.component.ts | 27 +++++++++++++++++++ src/app/info/feedback/feedback.component.html | 4 +-- src/app/info/info.module.ts | 2 ++ .../feedback-form.component.html | 0 .../feedback-form.component.scss | 0 .../feedback-form/feedback-form.component.ts | 14 ++++++++++ src/themes/custom/lazy-theme.module.ts | 2 ++ 7 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 src/app/info/feedback/feedback-form/themed-feedback-form.component.ts create mode 100644 src/themes/custom/app/info/feedback/feedback-form/feedback-form.component.html create mode 100644 src/themes/custom/app/info/feedback/feedback-form/feedback-form.component.scss create mode 100644 src/themes/custom/app/info/feedback/feedback-form/feedback-form.component.ts diff --git a/src/app/info/feedback/feedback-form/themed-feedback-form.component.ts b/src/app/info/feedback/feedback-form/themed-feedback-form.component.ts new file mode 100644 index 0000000000..9b42db629f --- /dev/null +++ b/src/app/info/feedback/feedback-form/themed-feedback-form.component.ts @@ -0,0 +1,27 @@ +import { Component } from '@angular/core'; +import { ThemedComponent } from '../../../shared/theme-support/themed.component'; +import { FeedbackFormComponent } from './feedback-form.component'; + +/** + * Themed wrapper for {@link FeedbackFormComponent} + */ +@Component({ + selector: 'ds-themed-feedback-form', + styleUrls: [], + templateUrl: '../../../shared/theme-support/themed.component.html', +}) +export class ThemedFeedbackFormComponent extends ThemedComponent { + + protected getComponentName(): string { + return 'FeedbackFormComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../../themes/${themeName}/app/info/feedback/feedback-form/feedback-form.component`); + } + + protected importUnthemedComponent(): Promise { + return import('./feedback-form.component'); + } + +} diff --git a/src/app/info/feedback/feedback.component.html b/src/app/info/feedback/feedback.component.html index 210bdcf1d7..ad42f0f90e 100644 --- a/src/app/info/feedback/feedback.component.html +++ b/src/app/info/feedback/feedback.component.html @@ -1,3 +1,3 @@
- -
\ No newline at end of file + + diff --git a/src/app/info/info.module.ts b/src/app/info/info.module.ts index 61eee71f3a..ccc4af0a7d 100644 --- a/src/app/info/info.module.ts +++ b/src/app/info/info.module.ts @@ -10,6 +10,7 @@ import { ThemedEndUserAgreementComponent } from './end-user-agreement/themed-end import { ThemedPrivacyComponent } from './privacy/themed-privacy.component'; import { FeedbackComponent } from './feedback/feedback.component'; import { FeedbackFormComponent } from './feedback/feedback-form/feedback-form.component'; +import { ThemedFeedbackFormComponent } from './feedback/feedback-form/themed-feedback-form.component'; import { ThemedFeedbackComponent } from './feedback/themed-feedback.component'; import { FeedbackGuard } from '../core/feedback/feedback.guard'; @@ -23,6 +24,7 @@ const DECLARATIONS = [ ThemedPrivacyComponent, FeedbackComponent, FeedbackFormComponent, + ThemedFeedbackFormComponent, ThemedFeedbackComponent ]; diff --git a/src/themes/custom/app/info/feedback/feedback-form/feedback-form.component.html b/src/themes/custom/app/info/feedback/feedback-form/feedback-form.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/info/feedback/feedback-form/feedback-form.component.scss b/src/themes/custom/app/info/feedback/feedback-form/feedback-form.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/info/feedback/feedback-form/feedback-form.component.ts b/src/themes/custom/app/info/feedback/feedback-form/feedback-form.component.ts new file mode 100644 index 0000000000..fb0041882e --- /dev/null +++ b/src/themes/custom/app/info/feedback/feedback-form/feedback-form.component.ts @@ -0,0 +1,14 @@ +import { Component } from '@angular/core'; +import { + FeedbackFormComponent as BaseComponent +} from '../../../../../../app/info/feedback/feedback-form/feedback-form.component'; + +@Component({ + selector: 'ds-feedback-form', + // templateUrl: './feedback-form.component.html', + templateUrl: '../../../../../../app/info/feedback/feedback-form/feedback-form.component.html', + // styleUrls: ['./feedback-form.component.scss'], + styleUrls: ['../../../../../../app/info/feedback/feedback-form/feedback-form.component.scss'], +}) +export class FeedbackFormComponent extends BaseComponent { +} diff --git a/src/themes/custom/lazy-theme.module.ts b/src/themes/custom/lazy-theme.module.ts index d2ac0ae787..4a04575920 100644 --- a/src/themes/custom/lazy-theme.module.ts +++ b/src/themes/custom/lazy-theme.module.ts @@ -114,6 +114,7 @@ import { ObjectListComponent } from './app/shared/object-list/object-list.compon import { BrowseByMetadataPageComponent } from './app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component'; import { BrowseByDatePageComponent } from './app/browse-by/browse-by-date-page/browse-by-date-page.component'; import { BrowseByTitlePageComponent } from './app/browse-by/browse-by-title-page/browse-by-title-page.component'; +import { FeedbackFormComponent } from './app/info/feedback/feedback-form/feedback-form.component'; const DECLARATIONS = [ FileSectionComponent, @@ -153,6 +154,7 @@ const DECLARATIONS = [ WorkflowItemSendBackComponent, BreadcrumbsComponent, FeedbackComponent, + FeedbackFormComponent, CommunityListComponent, ComcolPageHandleComponent, AuthNavMenuComponent,