From c63001c205313d963c4ad5a4a63dd582fc8df71f Mon Sep 17 00:00:00 2001 From: "Mark H. Wood" Date: Fri, 16 Jun 2023 16:08:18 -0400 Subject: [PATCH] Fix illogical templateUrl paths. Add missed DenyRequestCopyComponent. --- .../themed-deny-request-copy.component.ts | 26 +++++++++++++++++++ .../themed-email-request-copy.component.ts | 1 - .../request-copy-routing.module.ts | 4 +-- src/app/request-copy/request-copy.module.ts | 5 ++++ .../deny-request-copy.component.ts | 2 +- .../email-request-copy.component.ts | 2 +- .../grant-request-copy.component.ts | 2 +- src/themes/custom/lazy-theme.module.ts | 2 ++ 8 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 src/app/request-copy/deny-request-copy/themed-deny-request-copy.component.ts diff --git a/src/app/request-copy/deny-request-copy/themed-deny-request-copy.component.ts b/src/app/request-copy/deny-request-copy/themed-deny-request-copy.component.ts new file mode 100644 index 0000000000..664e4c541b --- /dev/null +++ b/src/app/request-copy/deny-request-copy/themed-deny-request-copy.component.ts @@ -0,0 +1,26 @@ +import { Component } from '@angular/core'; +import { ThemedComponent } from 'src/app/shared/theme-support/themed.component'; + +import { DenyRequestCopyComponent } from 'src/themes/custom/app/request-copy/deny-request-copy/deny-request-copy.component'; + +/** + * Themed wrapper for deny-request-copy.component + */ +@Component({ + selector: 'ds-themed-deny-request-copy', + styleUrls: [], + templateUrl: './../../shared/theme-support/themed.component.html', +}) +export class ThemedDenyRequestCopyComponent extends ThemedComponent { + protected getComponentName(): string { + return 'DenyRequestCopyComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../themes/${themeName}/app/request-copy/deny-request-copy/deny-request-copy.component`); + } + + protected importUnthemedComponent(): Promise { + return import('./deny-request-copy.component'); + } +} diff --git a/src/app/request-copy/email-request-copy/themed-email-request-copy.component.ts b/src/app/request-copy/email-request-copy/themed-email-request-copy.component.ts index 6b808288ad..d010e43060 100644 --- a/src/app/request-copy/email-request-copy/themed-email-request-copy.component.ts +++ b/src/app/request-copy/email-request-copy/themed-email-request-copy.component.ts @@ -12,7 +12,6 @@ import { RequestCopyEmail } from './request-copy-email.model'; styleUrls: [], templateUrl: './../../shared/theme-support/themed.component.html', }) - export class ThemedEmailRequestCopyComponent extends ThemedComponent { /** * Event emitter for sending the email diff --git a/src/app/request-copy/request-copy-routing.module.ts b/src/app/request-copy/request-copy-routing.module.ts index c3ac0be46a..4138fc42a6 100644 --- a/src/app/request-copy/request-copy-routing.module.ts +++ b/src/app/request-copy/request-copy-routing.module.ts @@ -3,7 +3,7 @@ import { RouterModule } from '@angular/router'; import { RequestCopyResolver } from './request-copy.resolver'; import { GrantDenyRequestCopyComponent } from './grant-deny-request-copy/grant-deny-request-copy.component'; import { REQUEST_COPY_DENY_PATH, REQUEST_COPY_GRANT_PATH } from './request-copy-routing-paths'; -import { DenyRequestCopyComponent } from './deny-request-copy/deny-request-copy.component'; +import { ThemedDenyRequestCopyComponent } from './deny-request-copy/themed-deny-request-copy.component'; import { ThemedGrantRequestCopyComponent } from './grant-request-copy/themed-grant-request-copy.component'; @NgModule({ @@ -21,7 +21,7 @@ import { ThemedGrantRequestCopyComponent } from './grant-request-copy/themed-gra }, { path: REQUEST_COPY_DENY_PATH, - component: DenyRequestCopyComponent, + component: ThemedDenyRequestCopyComponent, }, { path: REQUEST_COPY_GRANT_PATH, diff --git a/src/app/request-copy/request-copy.module.ts b/src/app/request-copy/request-copy.module.ts index b5ea3da50c..90d741a879 100644 --- a/src/app/request-copy/request-copy.module.ts +++ b/src/app/request-copy/request-copy.module.ts @@ -4,6 +4,7 @@ import { SharedModule } from '../shared/shared.module'; import { GrantDenyRequestCopyComponent } from './grant-deny-request-copy/grant-deny-request-copy.component'; import { RequestCopyRoutingModule } from './request-copy-routing.module'; import { DenyRequestCopyComponent } from './deny-request-copy/deny-request-copy.component'; +import { ThemedDenyRequestCopyComponent } from './deny-request-copy/themed-deny-request-copy.component'; import { EmailRequestCopyComponent } from './email-request-copy/email-request-copy.component'; import { ThemedEmailRequestCopyComponent } from './email-request-copy/themed-email-request-copy.component'; import { GrantRequestCopyComponent } from './grant-request-copy/grant-request-copy.component'; @@ -18,11 +19,15 @@ import { ThemedGrantRequestCopyComponent } from './grant-request-copy/themed-gra declarations: [ GrantDenyRequestCopyComponent, DenyRequestCopyComponent, + ThemedDenyRequestCopyComponent, EmailRequestCopyComponent, ThemedEmailRequestCopyComponent, GrantRequestCopyComponent, ThemedGrantRequestCopyComponent, ], + exports: [ + ThemedEmailRequestCopyComponent, + ], providers: [] }) diff --git a/src/themes/custom/app/request-copy/deny-request-copy/deny-request-copy.component.ts b/src/themes/custom/app/request-copy/deny-request-copy/deny-request-copy.component.ts index fb65aae9bc..628b2b3f83 100644 --- a/src/themes/custom/app/request-copy/deny-request-copy/deny-request-copy.component.ts +++ b/src/themes/custom/app/request-copy/deny-request-copy/deny-request-copy.component.ts @@ -8,7 +8,7 @@ import { // styleUrls: ['./deny-request-copy.component.scss'], styleUrls: [], // templateUrl: './deny-request-copy.component.html', - templateUrl: './../../request-copy/deny-request-copy/deny-request-copy.component.html', + templateUrl: './../../../../../app/request-copy/deny-request-copy/deny-request-copy.component.html', }) export class DenyRequestCopyComponent extends BaseComponent { diff --git a/src/themes/custom/app/request-copy/email-request-copy/email-request-copy.component.ts b/src/themes/custom/app/request-copy/email-request-copy/email-request-copy.component.ts index d4da93a99f..a0274f6efd 100644 --- a/src/themes/custom/app/request-copy/email-request-copy/email-request-copy.component.ts +++ b/src/themes/custom/app/request-copy/email-request-copy/email-request-copy.component.ts @@ -8,7 +8,7 @@ import { // styleUrls: ['./email-request-copy.component.scss'], styleUrls: [], // templateUrl: './email-request-copy.component.html', - templateUrl: './../../request-copy/email-request-copy/email-request-copy.component.html', + templateUrl: './../../../../../app/request-copy/email-request-copy/email-request-copy.component.html', }) export class EmailRequestCopyComponent extends BaseComponent { diff --git a/src/themes/custom/app/request-copy/grant-request-copy/grant-request-copy.component.ts b/src/themes/custom/app/request-copy/grant-request-copy/grant-request-copy.component.ts index 20d0ae90c1..446044942e 100644 --- a/src/themes/custom/app/request-copy/grant-request-copy/grant-request-copy.component.ts +++ b/src/themes/custom/app/request-copy/grant-request-copy/grant-request-copy.component.ts @@ -8,7 +8,7 @@ import { // styleUrls: ['./grant-request-copy.component.scss'], styleUrls: [], // templateUrl: './grant-request-copy.component.html', - templateUrl: './../../request-copy/grant-request-copy/grant-request-copy.component.html', + templateUrl: './../../../../../app/request-copy/grant-request-copy/grant-request-copy.component.html', }) export class GrantRequestCopyComponent extends BaseComponent { diff --git a/src/themes/custom/lazy-theme.module.ts b/src/themes/custom/lazy-theme.module.ts index 6ec946a6ba..b0f94d3ab7 100644 --- a/src/themes/custom/lazy-theme.module.ts +++ b/src/themes/custom/lazy-theme.module.ts @@ -153,6 +153,7 @@ import { ThumbnailComponent } from './app/thumbnail/thumbnail.component'; import { ItemStatusComponent } from './app/item-page/edit-item-page/item-status/item-status.component'; import { EditBitstreamPageComponent } from './app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component'; import { FormModule } from '../../app/shared/form/form.module'; +import { RequestCopyModule } from 'src/app/request-copy/request-copy.module'; const DECLARATIONS = [ FileSectionComponent, @@ -293,6 +294,7 @@ const DECLARATIONS = [ SystemWideAlertModule, NgxGalleryModule, FormModule, + RequestCopyModule, ], declarations: DECLARATIONS, exports: [