diff --git a/src/app/admin/admin-routes.ts b/src/app/admin/admin-routes.ts index 59529710c9f..e5afe09cc79 100644 --- a/src/app/admin/admin-routes.ts +++ b/src/app/admin/admin-routes.ts @@ -11,8 +11,8 @@ import { REGISTRIES_MODULE_PATH, REPORTS_MODULE_PATH, } from './admin-routing-paths'; -import { AdminSearchPageComponent } from './admin-search-page/admin-search-page.component'; -import { AdminWorkflowPageComponent } from './admin-workflow-page/admin-workflow-page.component'; +import { ThemedAdminSearchPageComponent } from './admin-search-page/themed-admin-search-page.component'; +import { ThemedAdminWorkflowPageComponent } from './admin-workflow-page/themed-admin-workflow-page.component'; export const ROUTES: Route[] = [ { @@ -28,13 +28,13 @@ export const ROUTES: Route[] = [ { path: 'search', resolve: { breadcrumb: i18nBreadcrumbResolver }, - component: AdminSearchPageComponent, + component: ThemedAdminSearchPageComponent, data: { title: 'admin.search.title', breadcrumbKey: 'admin.search' }, }, { path: 'workflow', resolve: { breadcrumb: i18nBreadcrumbResolver }, - component: AdminWorkflowPageComponent, + component: ThemedAdminWorkflowPageComponent, data: { title: 'admin.workflow.title', breadcrumbKey: 'admin.workflow' }, }, { diff --git a/src/app/admin/admin-search-page/admin-search-page.component.ts b/src/app/admin/admin-search-page/admin-search-page.component.ts index 99909b8257f..4ae11a9d47a 100644 --- a/src/app/admin/admin-search-page/admin-search-page.component.ts +++ b/src/app/admin/admin-search-page/admin-search-page.component.ts @@ -4,7 +4,7 @@ import { Context } from '../../core/shared/context.model'; import { ThemedConfigurationSearchPageComponent } from '../../search-page/themed-configuration-search-page.component'; @Component({ - selector: 'ds-admin-search-page', + selector: 'ds-base-admin-search-page', templateUrl: './admin-search-page.component.html', styleUrls: ['./admin-search-page.component.scss'], standalone: true, diff --git a/src/app/admin/admin-search-page/themed-admin-search-page.component.ts b/src/app/admin/admin-search-page/themed-admin-search-page.component.ts new file mode 100644 index 00000000000..d49c1847846 --- /dev/null +++ b/src/app/admin/admin-search-page/themed-admin-search-page.component.ts @@ -0,0 +1,29 @@ +import { Component } from '@angular/core'; + +import { ThemedComponent } from '../../shared/theme-support/themed.component'; +import { AdminSearchPageComponent } from './admin-search-page.component'; + +/** + * Themed wrapper for {@link AdminSearchPageComponent} + */ +@Component({ + selector: 'ds-admin-search-page', + templateUrl: '../../shared/theme-support/themed.component.html', + standalone: true, + imports: [AdminSearchPageComponent], +}) +export class ThemedAdminSearchPageComponent extends ThemedComponent { + + protected getComponentName(): string { + return 'AdminSearchPageComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../themes/${themeName}/app/admin/admin-search-page/admin-search-page.component`); + } + + protected importUnthemedComponent(): Promise { + return import('./admin-search-page.component'); + } + +} diff --git a/src/app/admin/admin-workflow-page/admin-workflow-page.component.ts b/src/app/admin/admin-workflow-page/admin-workflow-page.component.ts index 62a66039aff..74de483c017 100644 --- a/src/app/admin/admin-workflow-page/admin-workflow-page.component.ts +++ b/src/app/admin/admin-workflow-page/admin-workflow-page.component.ts @@ -4,11 +4,13 @@ import { Context } from '../../core/shared/context.model'; import { ThemedConfigurationSearchPageComponent } from '../../search-page/themed-configuration-search-page.component'; @Component({ - selector: 'ds-admin-workflow-page', + selector: 'ds-base-admin-workflow-page', templateUrl: './admin-workflow-page.component.html', styleUrls: ['./admin-workflow-page.component.scss'], standalone: true, - imports: [ThemedConfigurationSearchPageComponent], + imports: [ + ThemedConfigurationSearchPageComponent, + ], }) /** diff --git a/src/app/admin/admin-workflow-page/themed-admin-workflow-page.component.ts b/src/app/admin/admin-workflow-page/themed-admin-workflow-page.component.ts new file mode 100644 index 00000000000..5668b5c7a61 --- /dev/null +++ b/src/app/admin/admin-workflow-page/themed-admin-workflow-page.component.ts @@ -0,0 +1,29 @@ +import { Component } from '@angular/core'; + +import { ThemedComponent } from '../../shared/theme-support/themed.component'; +import { AdminWorkflowPageComponent } from './admin-workflow-page.component'; + +/** + * Themed wrapper for {@link AdminWorkflowPageComponent} + */ +@Component({ + selector: 'ds-admin-workflow-page', + templateUrl: '../../shared/theme-support/themed.component.html', + standalone: true, + imports: [AdminWorkflowPageComponent], +}) +export class ThemedAdminWorkflowPageComponent extends ThemedComponent { + + protected getComponentName(): string { + return 'AdminWorkflowPageComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../themes/${themeName}/app/admin/admin-workflow-page/admin-workflow-page.component`); + } + + protected importUnthemedComponent(): Promise { + return import('./admin-workflow-page.component'); + } + +} diff --git a/src/app/core/metadata/metadata.service.ts b/src/app/core/metadata/metadata.service.ts index 1aacb762955..dcc355edd0f 100644 --- a/src/app/core/metadata/metadata.service.ts +++ b/src/app/core/metadata/metadata.service.ts @@ -27,7 +27,7 @@ export class MetadataService { * Returns undefined otherwise. */ public virtualValue(metadataValue: MetadataValue | undefined): string { - if (this.isVirtual) { + if (this.isVirtual(metadataValue)) { return metadataValue.authority.substring(metadataValue.authority.indexOf(VIRTUAL_METADATA_PREFIX) + VIRTUAL_METADATA_PREFIX.length); } else { return undefined; diff --git a/src/app/navbar/navbar.component.html b/src/app/navbar/navbar.component.html index 90cf07caa42..f2f87a8bb68 100644 --- a/src/app/navbar/navbar.component.html +++ b/src/app/navbar/navbar.component.html @@ -1,6 +1,6 @@