Skip to content

Commit

Permalink
115051: Created ThemedAdminSearchPageComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrevryghem committed May 21, 2024
1 parent ca86437 commit 99384a7
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/app/admin/admin-routing.module.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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' }
},
{
Expand Down
2 changes: 2 additions & 0 deletions src/app/admin/admin-search-page/admin-search.module.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -31,6 +32,7 @@ const ENTRY_COMPONENTS = [
ResearchEntitiesModule.withEntryComponents()
],
declarations: [
ThemedAdminSearchPageComponent,
AdminSearchPageComponent,
...ENTRY_COMPONENTS
]
Expand Down
Original file line number Diff line number Diff line change
@@ -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<AdminSearchPageComponent> {

protected getComponentName(): string {
return 'AdminSearchPageComponent';
}

protected importThemedComponent(themeName: string): Promise<any> {
return import(`../../../themes/${themeName}/app/admin/admin-search-page/admin-search-page.component`);
}

protected importUnthemedComponent(): Promise<any> {
return import('./admin-search-page.component');
}

}
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -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 {
}
4 changes: 2 additions & 2 deletions src/themes/custom/lazy-theme.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -168,8 +169,7 @@ const DECLARATIONS = [
BrowseByMetadataPageComponent,
BrowseByDatePageComponent,
BrowseByTitlePageComponent,


AdminSearchPageComponent,
];

@NgModule({
Expand Down

0 comments on commit 99384a7

Please sign in to comment.