From 99384a70605b2eccaaae249103673c3735da8c85 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Tue, 21 May 2024 12:02:15 +0200 Subject: [PATCH 1/4] 115051: Created ThemedAdminSearchPageComponent --- src/app/admin/admin-routing.module.ts | 4 +-- .../admin-search-page/admin-search.module.ts | 2 ++ .../themed-admin-search-page.component.ts | 26 +++++++++++++++++++ .../admin-search-page.component.html | 0 .../admin-search-page.component.scss | 0 .../admin-search-page.component.ts | 12 +++++++++ src/themes/custom/lazy-theme.module.ts | 4 +-- 7 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 src/app/admin/admin-search-page/themed-admin-search-page.component.ts create mode 100644 src/themes/custom/app/admin/admin-search-page/admin-search-page.component.html create mode 100644 src/themes/custom/app/admin/admin-search-page/admin-search-page.component.scss create mode 100644 src/themes/custom/app/admin/admin-search-page/admin-search-page.component.ts diff --git a/src/app/admin/admin-routing.module.ts b/src/app/admin/admin-routing.module.ts index 1ea20bc9a0f..3e3a8924ac8 100644 --- a/src/app/admin/admin-routing.module.ts +++ b/src/app/admin/admin-routing.module.ts @@ -1,7 +1,7 @@ import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import { MetadataImportPageComponent } from './admin-import-metadata-page/metadata-import-page.component'; -import { AdminSearchPageComponent } from './admin-search-page/admin-search-page.component'; +import { ThemedAdminSearchPageComponent } from './admin-search-page/themed-admin-search-page.component'; import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver'; import { AdminWorkflowPageComponent } from './admin-workflow-page/admin-workflow-page.component'; import { I18nBreadcrumbsService } from '../core/breadcrumbs/i18n-breadcrumbs.service'; @@ -20,7 +20,7 @@ import { BatchImportPageComponent } from './admin-import-batch-page/batch-import { path: 'search', resolve: { breadcrumb: I18nBreadcrumbResolver }, - component: AdminSearchPageComponent, + component: ThemedAdminSearchPageComponent, data: { title: 'admin.search.title', breadcrumbKey: 'admin.search' } }, { diff --git a/src/app/admin/admin-search-page/admin-search.module.ts b/src/app/admin/admin-search-page/admin-search.module.ts index 353d6dd4985..b45eca15c4b 100644 --- a/src/app/admin/admin-search-page/admin-search.module.ts +++ b/src/app/admin/admin-search-page/admin-search.module.ts @@ -1,5 +1,6 @@ import { NgModule } from '@angular/core'; import { SharedModule } from '../../shared/shared.module'; +import { ThemedAdminSearchPageComponent } from './themed-admin-search-page.component'; import { AdminSearchPageComponent } from './admin-search-page.component'; import { ItemAdminSearchResultListElementComponent } from './admin-search-results/admin-search-result-list-element/item-search-result/item-admin-search-result-list-element.component'; import { CommunityAdminSearchResultListElementComponent } from './admin-search-results/admin-search-result-list-element/community-search-result/community-admin-search-result-list-element.component'; @@ -31,6 +32,7 @@ const ENTRY_COMPONENTS = [ ResearchEntitiesModule.withEntryComponents() ], declarations: [ + ThemedAdminSearchPageComponent, AdminSearchPageComponent, ...ENTRY_COMPONENTS ] 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..741a3b04f9c --- /dev/null +++ b/src/app/admin/admin-search-page/themed-admin-search-page.component.ts @@ -0,0 +1,26 @@ +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-themed-admin-search-page', + templateUrl: '../../shared/theme-support/themed.component.html', +}) +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/themes/custom/app/admin/admin-search-page/admin-search-page.component.html b/src/themes/custom/app/admin/admin-search-page/admin-search-page.component.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/themes/custom/app/admin/admin-search-page/admin-search-page.component.scss b/src/themes/custom/app/admin/admin-search-page/admin-search-page.component.scss new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/themes/custom/app/admin/admin-search-page/admin-search-page.component.ts b/src/themes/custom/app/admin/admin-search-page/admin-search-page.component.ts new file mode 100644 index 00000000000..358f11f0d19 --- /dev/null +++ b/src/themes/custom/app/admin/admin-search-page/admin-search-page.component.ts @@ -0,0 +1,12 @@ +import { Component } from '@angular/core'; +import { AdminSearchPageComponent as BaseComponent } from '../../../../../app/admin/admin-search-page/admin-search-page.component'; + +@Component({ + selector: 'ds-admin-search-page', + // styleUrls: ['./admin-search-page.component.scss'], + styleUrls: ['../../../../../app/admin/admin-search-page/admin-search-page.component.scss'], + // templateUrl: './admin-search-page.component.html', + templateUrl: '../../../../../app/admin/admin-search-page/admin-search-page.component.html', +}) +export class AdminSearchPageComponent extends BaseComponent { +} diff --git a/src/themes/custom/lazy-theme.module.ts b/src/themes/custom/lazy-theme.module.ts index d2ac0ae7877..4f35854e5ed 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 { AdminSearchPageComponent } from './app/admin/admin-search-page/admin-search-page.component'; const DECLARATIONS = [ FileSectionComponent, @@ -168,8 +169,7 @@ const DECLARATIONS = [ BrowseByMetadataPageComponent, BrowseByDatePageComponent, BrowseByTitlePageComponent, - - + AdminSearchPageComponent, ]; @NgModule({ From 61e52cd2abb8ec5dea4b17170e93fe190b086dc9 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Tue, 21 May 2024 13:26:19 +0200 Subject: [PATCH 2/4] Fixed navbar overflowing over breadcrumbs in mobile mode in custom theme --- src/app/navbar/navbar.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@