Skip to content

Commit

Permalink
115051: Created ThemedAdminWorkflowPageComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrevryghem committed May 22, 2024
1 parent 99384a7 commit 970b19b
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/admin/admin-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { I18nBreadcrumbsService } from '../core/breadcrumbs/i18n-breadcrumbs.ser
import { AdminCurationTasksComponent } from './admin-curation-tasks/admin-curation-tasks.component';
import { REGISTRIES_MODULE_PATH } from './admin-routing-paths';
import { BatchImportPageComponent } from './admin-import-batch-page/batch-import-page.component';
import { ThemedAdminWorkflowPageComponent } from './admin-workflow-page/themed-admin-workflow-page.component';

@NgModule({
imports: [
Expand All @@ -26,7 +27,7 @@ import { BatchImportPageComponent } from './admin-import-batch-page/batch-import
{
path: 'workflow',
resolve: { breadcrumb: I18nBreadcrumbResolver },
component: AdminWorkflowPageComponent,
component: ThemedAdminWorkflowPageComponent,
data: { title: 'admin.workflow.title', breadcrumbKey: 'admin.workflow' }
},
{
Expand Down
2 changes: 2 additions & 0 deletions src/app/admin/admin-workflow-page/admin-workflow.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { WorkflowItemAdminWorkflowActionsComponent } from './admin-workflow-sear
import { WorkflowItemSearchResultAdminWorkflowListElementComponent } from './admin-workflow-search-results/admin-workflow-search-result-list-element/workflow-item/workflow-item-search-result-admin-workflow-list-element.component';
import { AdminWorkflowPageComponent } from './admin-workflow-page.component';
import { SearchModule } from '../../shared/search/search.module';
import { ThemedAdminWorkflowPageComponent } from './themed-admin-workflow-page.component';

const ENTRY_COMPONENTS = [
// put only entry components that use custom decorator
Expand All @@ -19,6 +20,7 @@ const ENTRY_COMPONENTS = [
SharedModule.withEntryComponents()
],
declarations: [
ThemedAdminWorkflowPageComponent,
AdminWorkflowPageComponent,
WorkflowItemAdminWorkflowActionsComponent,
...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 { AdminWorkflowPageComponent } from './admin-workflow-page.component';

/**
* Themed wrapper for {@link AdminWorkflowPageComponent}
*/
@Component({
selector: 'ds-themed-admin-workflow-page',
templateUrl: '../../shared/theme-support/themed.component.html',
})
export class ThemedAdminWorkflowPageComponent extends ThemedComponent<AdminWorkflowPageComponent> {

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

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

protected importUnthemedComponent(): Promise<any> {
return import('./admin-workflow-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 { AdminWorkflowPageComponent as BaseComponent } from '../../../../../app/admin/admin-workflow-page/admin-workflow-page.component';

@Component({
selector: 'ds-admin-workflow-page',
// styleUrls: ['./admin-workflow-page.component.scss'],
styleUrls: ['../../../../../app/admin/admin-workflow-page/admin-workflow-page.component.scss'],
// templateUrl: './admin-workflow-page.component.html',
templateUrl: '../../../../../app/admin/admin-workflow-page/admin-workflow-page.component.html',
})
export class AdminWorkflowPageComponent extends BaseComponent {
}
2 changes: 2 additions & 0 deletions src/themes/custom/lazy-theme.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ import { BrowseByMetadataPageComponent } from './app/browse-by/browse-by-metadat
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';
import { AdminWorkflowPageComponent } from './app/admin/admin-workflow-page/admin-workflow-page.component';

const DECLARATIONS = [
FileSectionComponent,
Expand Down Expand Up @@ -170,6 +171,7 @@ const DECLARATIONS = [
BrowseByDatePageComponent,
BrowseByTitlePageComponent,
AdminSearchPageComponent,
AdminWorkflowPageComponent,
];

@NgModule({
Expand Down

0 comments on commit 970b19b

Please sign in to comment.