From 8b7a33bff2152a032a53d77c771a7c3429e8624a Mon Sep 17 00:00:00 2001 From: Yana De Pauw Date: Wed, 3 Mar 2021 11:05:52 +0100 Subject: [PATCH] 77349: Add themeable components - pt. 1 --- .../themed-browse-by-switcher.component.ts | 28 +++++++ .../+browse-by/browse-by-routing.module.ts | 4 +- src/app/+browse-by/browse-by.module.ts | 2 + .../collection-page-routing.module.ts | 4 +- .../collection-page.module.ts | 2 + .../themed-collection-page.component.ts | 27 +++++++ .../community-page-routing.module.ts | 4 +- .../+community-page/community-page.module.ts | 17 +++-- .../themed-community-page.component.ts | 27 +++++++ .../lookup-by-id-routing.module.ts | 4 +- src/app/+lookup-by-id/lookup-by-id.module.ts | 4 +- .../themed-objectnotfound.component.ts | 27 +++++++ .../search-page-routing.module.ts | 8 +- src/app/+search-page/search-page.module.ts | 4 +- ...med-configuration-search-page.component.ts | 73 +++++++++++++++++++ .../themed-search-page.component.ts | 27 +++++++ src/app/app-routing.module.ts | 9 ++- src/app/app.module.ts | 4 + .../community-list-page.module.ts | 15 +++- .../community-list-page.routing.module.ts | 4 +- .../themed-community-list-page.component.ts | 27 +++++++ .../forbidden/themed-forbidden.component.ts | 27 +++++++ .../themed-end-user-agreement.component.ts | 28 +++++++ src/app/info/info-routing.module.ts | 8 +- src/app/info/info.module.ts | 19 ++++- .../info/privacy/themed-privacy.component.ts | 27 +++++++ .../themed-pagenotfound.component.ts | 27 +++++++ src/app/shared/shared.module.ts | 4 +- ...ed-collection-statistics-page.component.ts | 27 +++++++ ...med-community-statistics-page.component.ts | 27 +++++++ .../themed-item-statistics-page.component.ts | 27 +++++++ .../themed-site-statistics-page.component.ts | 27 +++++++ .../statistics-page-routing.module.ts | 17 +++-- .../statistics-page/statistics-page.module.ts | 10 ++- src/environments/environment.common.ts | 8 +- .../browse-by-switcher.component.html | 0 .../browse-by-switcher.component.scss | 0 .../browse-by-switcher.component.ts | 15 ++++ .../collection-page.component.html | 0 .../collection-page.component.scss | 0 .../collection-page.component.ts | 17 +++++ .../community-page.component.html | 0 .../community-page.component.scss | 0 .../community-page.component.ts | 17 +++++ .../objectnotfound.component.html | 0 .../objectnotfound.component.scss | 0 .../objectnotfound.component.ts | 16 ++++ .../configuration-search-page.component.html | 0 .../configuration-search-page.component.scss | 0 .../configuration-search-page.component.ts | 15 ++++ .../+search-page/search-page.component.html | 0 .../+search-page/search-page.component.scss | 0 .../app/+search-page/search-page.component.ts | 15 ++++ .../community-list-page.component.html | 0 .../community-list-page.component.scss | 0 .../community-list-page.component.ts | 15 ++++ .../app/forbidden/forbidden.component.html | 0 .../app/forbidden/forbidden.component.scss | 0 .../app/forbidden/forbidden.component.ts | 17 +++++ .../end-user-agreement.component.html | 0 .../end-user-agreement.component.scss | 0 .../end-user-agreement.component.ts | 16 ++++ .../app/info/privacy/privacy.component.html | 0 .../app/info/privacy/privacy.component.scss | 0 .../app/info/privacy/privacy.component.ts | 15 ++++ .../pagenotfound/pagenotfound.component.html | 0 .../pagenotfound/pagenotfound.component.scss | 0 .../pagenotfound/pagenotfound.component.ts | 16 ++++ .../collection-statistics-page.component.html | 0 .../collection-statistics-page.component.scss | 0 .../collection-statistics-page.component.ts | 16 ++++ .../community-statistics-page.component.html | 0 .../community-statistics-page.component.scss | 0 .../community-statistics-page.component.ts | 16 ++++ .../item-statistics-page.component.html | 0 .../item-statistics-page.component.scss | 0 .../item-statistics-page.component.ts | 16 ++++ .../site-statistics-page.component.html | 0 .../site-statistics-page.component.scss | 0 .../site-statistics-page.component.ts | 16 ++++ src/themes/custom/theme.module.ts | 42 ++++++++++- 81 files changed, 833 insertions(+), 51 deletions(-) create mode 100644 src/app/+browse-by/+browse-by-switcher/themed-browse-by-switcher.component.ts create mode 100644 src/app/+collection-page/themed-collection-page.component.ts create mode 100644 src/app/+community-page/themed-community-page.component.ts create mode 100644 src/app/+lookup-by-id/objectnotfound/themed-objectnotfound.component.ts create mode 100644 src/app/+search-page/themed-configuration-search-page.component.ts create mode 100644 src/app/+search-page/themed-search-page.component.ts create mode 100644 src/app/community-list-page/themed-community-list-page.component.ts create mode 100644 src/app/forbidden/themed-forbidden.component.ts create mode 100644 src/app/info/end-user-agreement/themed-end-user-agreement.component.ts create mode 100644 src/app/info/privacy/themed-privacy.component.ts create mode 100644 src/app/pagenotfound/themed-pagenotfound.component.ts create mode 100644 src/app/statistics-page/collection-statistics-page/themed-collection-statistics-page.component.ts create mode 100644 src/app/statistics-page/community-statistics-page/themed-community-statistics-page.component.ts create mode 100644 src/app/statistics-page/item-statistics-page/themed-item-statistics-page.component.ts create mode 100644 src/app/statistics-page/site-statistics-page/themed-site-statistics-page.component.ts create mode 100644 src/themes/custom/app/+browse-by/+browse-by-switcher/browse-by-switcher.component.html create mode 100644 src/themes/custom/app/+browse-by/+browse-by-switcher/browse-by-switcher.component.scss create mode 100644 src/themes/custom/app/+browse-by/+browse-by-switcher/browse-by-switcher.component.ts create mode 100644 src/themes/custom/app/+collection-page/collection-page.component.html create mode 100644 src/themes/custom/app/+collection-page/collection-page.component.scss create mode 100644 src/themes/custom/app/+collection-page/collection-page.component.ts create mode 100644 src/themes/custom/app/+community-page/community-page.component.html create mode 100644 src/themes/custom/app/+community-page/community-page.component.scss create mode 100644 src/themes/custom/app/+community-page/community-page.component.ts create mode 100644 src/themes/custom/app/+lookup-by-id/objectnotfound/objectnotfound.component.html create mode 100644 src/themes/custom/app/+lookup-by-id/objectnotfound/objectnotfound.component.scss create mode 100644 src/themes/custom/app/+lookup-by-id/objectnotfound/objectnotfound.component.ts create mode 100644 src/themes/custom/app/+search-page/configuration-search-page.component.html create mode 100644 src/themes/custom/app/+search-page/configuration-search-page.component.scss create mode 100644 src/themes/custom/app/+search-page/configuration-search-page.component.ts create mode 100644 src/themes/custom/app/+search-page/search-page.component.html create mode 100644 src/themes/custom/app/+search-page/search-page.component.scss create mode 100644 src/themes/custom/app/+search-page/search-page.component.ts create mode 100644 src/themes/custom/app/community-list-page/community-list-page.component.html create mode 100644 src/themes/custom/app/community-list-page/community-list-page.component.scss create mode 100644 src/themes/custom/app/community-list-page/community-list-page.component.ts create mode 100644 src/themes/custom/app/forbidden/forbidden.component.html create mode 100644 src/themes/custom/app/forbidden/forbidden.component.scss create mode 100644 src/themes/custom/app/forbidden/forbidden.component.ts create mode 100644 src/themes/custom/app/info/end-user-agreement/end-user-agreement.component.html create mode 100644 src/themes/custom/app/info/end-user-agreement/end-user-agreement.component.scss create mode 100644 src/themes/custom/app/info/end-user-agreement/end-user-agreement.component.ts create mode 100644 src/themes/custom/app/info/privacy/privacy.component.html create mode 100644 src/themes/custom/app/info/privacy/privacy.component.scss create mode 100644 src/themes/custom/app/info/privacy/privacy.component.ts create mode 100644 src/themes/custom/app/pagenotfound/pagenotfound.component.html create mode 100644 src/themes/custom/app/pagenotfound/pagenotfound.component.scss create mode 100644 src/themes/custom/app/pagenotfound/pagenotfound.component.ts create mode 100644 src/themes/custom/app/statistics-page/collection-statistics-page/collection-statistics-page.component.html create mode 100644 src/themes/custom/app/statistics-page/collection-statistics-page/collection-statistics-page.component.scss create mode 100644 src/themes/custom/app/statistics-page/collection-statistics-page/collection-statistics-page.component.ts create mode 100644 src/themes/custom/app/statistics-page/community-statistics-page/community-statistics-page.component.html create mode 100644 src/themes/custom/app/statistics-page/community-statistics-page/community-statistics-page.component.scss create mode 100644 src/themes/custom/app/statistics-page/community-statistics-page/community-statistics-page.component.ts create mode 100644 src/themes/custom/app/statistics-page/item-statistics-page/item-statistics-page.component.html create mode 100644 src/themes/custom/app/statistics-page/item-statistics-page/item-statistics-page.component.scss create mode 100644 src/themes/custom/app/statistics-page/item-statistics-page/item-statistics-page.component.ts create mode 100644 src/themes/custom/app/statistics-page/site-statistics-page/site-statistics-page.component.html create mode 100644 src/themes/custom/app/statistics-page/site-statistics-page/site-statistics-page.component.scss create mode 100644 src/themes/custom/app/statistics-page/site-statistics-page/site-statistics-page.component.ts diff --git a/src/app/+browse-by/+browse-by-switcher/themed-browse-by-switcher.component.ts b/src/app/+browse-by/+browse-by-switcher/themed-browse-by-switcher.component.ts new file mode 100644 index 0000000000..20d27012fe --- /dev/null +++ b/src/app/+browse-by/+browse-by-switcher/themed-browse-by-switcher.component.ts @@ -0,0 +1,28 @@ +import { Component, OnInit } from '@angular/core'; + +import { ThemedComponent } from '../../shared/theme-support/themed.component'; +import { BrowseBySwitcherComponent } from './browse-by-switcher.component'; + +@Component({ + selector: 'ds-themed-browse-by-switcher', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html' +}) +/** + * Component for determining what Browse-By component to use depending on the metadata (browse ID) provided + */ +export class ThemedBrowseBySwitcherComponent extends ThemedComponent { + protected getComponentName(): string { + return 'BrowseBySwitcherComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../themes/${themeName}/app/+browse-by/+browse-by-switcher/browse-by-switcher.component`); + } + + protected importUnthemedComponent(): Promise { + return import(`./browse-by-switcher.component`); + } + + +} diff --git a/src/app/+browse-by/browse-by-routing.module.ts b/src/app/+browse-by/browse-by-routing.module.ts index a686e7007e..8cf989695a 100644 --- a/src/app/+browse-by/browse-by-routing.module.ts +++ b/src/app/+browse-by/browse-by-routing.module.ts @@ -1,9 +1,9 @@ import { RouterModule } from '@angular/router'; import { NgModule } from '@angular/core'; import { BrowseByGuard } from './browse-by-guard'; -import { BrowseBySwitcherComponent } from './+browse-by-switcher/browse-by-switcher.component'; import { BrowseByDSOBreadcrumbResolver } from './browse-by-dso-breadcrumb.resolver'; import { BrowseByI18nBreadcrumbResolver } from './browse-by-i18n-breadcrumb.resolver'; +import { ThemedBrowseBySwitcherComponent } from './+browse-by-switcher/themed-browse-by-switcher.component'; @NgModule({ imports: [ @@ -14,7 +14,7 @@ import { BrowseByI18nBreadcrumbResolver } from './browse-by-i18n-breadcrumb.reso children: [ { path: ':id', - component: BrowseBySwitcherComponent, + component: ThemedBrowseBySwitcherComponent, canActivate: [BrowseByGuard], resolve: { breadcrumb: BrowseByI18nBreadcrumbResolver }, data: { title: 'browse.title', breadcrumbKey: 'browse.metadata' } diff --git a/src/app/+browse-by/browse-by.module.ts b/src/app/+browse-by/browse-by.module.ts index 60574f4074..08b6c5739b 100644 --- a/src/app/+browse-by/browse-by.module.ts +++ b/src/app/+browse-by/browse-by.module.ts @@ -5,6 +5,7 @@ import { SharedModule } from '../shared/shared.module'; import { BrowseByMetadataPageComponent } from './+browse-by-metadata-page/browse-by-metadata-page.component'; import { BrowseByDatePageComponent } from './+browse-by-date-page/browse-by-date-page.component'; import { BrowseBySwitcherComponent } from './+browse-by-switcher/browse-by-switcher.component'; +import { ThemedBrowseBySwitcherComponent } from './+browse-by-switcher/themed-browse-by-switcher.component'; const ENTRY_COMPONENTS = [ // put only entry components that use custom decorator @@ -20,6 +21,7 @@ const ENTRY_COMPONENTS = [ ], declarations: [ BrowseBySwitcherComponent, + ThemedBrowseBySwitcherComponent, ...ENTRY_COMPONENTS ], exports: [ diff --git a/src/app/+collection-page/collection-page-routing.module.ts b/src/app/+collection-page/collection-page-routing.module.ts index 7e44883a53..5879e523af 100644 --- a/src/app/+collection-page/collection-page-routing.module.ts +++ b/src/app/+collection-page/collection-page-routing.module.ts @@ -1,7 +1,6 @@ import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; -import { CollectionPageComponent } from './collection-page.component'; import { CollectionPageResolver } from './collection-page.resolver'; import { CreateCollectionPageComponent } from './create-collection-page/create-collection-page.component'; import { AuthenticatedGuard } from '../core/auth/authenticated.guard'; @@ -21,6 +20,7 @@ import { import { CollectionPageAdministratorGuard } from './collection-page-administrator.guard'; import { MenuItemType } from '../shared/menu/initial-menus-state'; import { LinkMenuItemModel } from '../shared/menu/menu-item/models/link.model'; +import { ThemedCollectionPageComponent } from './themed-collection-page.component'; @NgModule({ imports: [ @@ -62,7 +62,7 @@ import { LinkMenuItemModel } from '../shared/menu/menu-item/models/link.model'; }, { path: '', - component: CollectionPageComponent, + component: ThemedCollectionPageComponent, pathMatch: 'full', } ], diff --git a/src/app/+collection-page/collection-page.module.ts b/src/app/+collection-page/collection-page.module.ts index 83ba12f037..7946e7a1a4 100644 --- a/src/app/+collection-page/collection-page.module.ts +++ b/src/app/+collection-page/collection-page.module.ts @@ -13,6 +13,7 @@ import { CollectionItemMapperComponent } from './collection-item-mapper/collecti import { SearchService } from '../core/shared/search/search.service'; import { StatisticsModule } from '../statistics/statistics.module'; import { CollectionFormModule } from './collection-form/collection-form.module'; +import { ThemedCollectionPageComponent } from './themed-collection-page.component'; @NgModule({ imports: [ @@ -25,6 +26,7 @@ import { CollectionFormModule } from './collection-form/collection-form.module'; ], declarations: [ CollectionPageComponent, + ThemedCollectionPageComponent, CreateCollectionPageComponent, DeleteCollectionPageComponent, EditItemTemplatePageComponent, diff --git a/src/app/+collection-page/themed-collection-page.component.ts b/src/app/+collection-page/themed-collection-page.component.ts new file mode 100644 index 0000000000..7bbc720e30 --- /dev/null +++ b/src/app/+collection-page/themed-collection-page.component.ts @@ -0,0 +1,27 @@ +import { Component } from '@angular/core'; +import { ThemedComponent } from '../shared/theme-support/themed.component'; +import { CollectionPageComponent } from './collection-page.component'; + +@Component({ + selector: 'ds-themed-community-page', + styleUrls: [], + templateUrl: '../shared/theme-support/themed.component.html', +}) + +/** + * Component to render the news section on the home page + */ +export class ThemedCollectionPageComponent extends ThemedComponent { + protected getComponentName(): string { + return 'CollectionPageComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../themes/${themeName}/app/+collection-page/collection-page.component`); + } + + protected importUnthemedComponent(): Promise { + return import(`./collection-page.component`); + } + +} diff --git a/src/app/+community-page/community-page-routing.module.ts b/src/app/+community-page/community-page-routing.module.ts index 571bff7413..ad1b1fd2f2 100644 --- a/src/app/+community-page/community-page-routing.module.ts +++ b/src/app/+community-page/community-page-routing.module.ts @@ -1,7 +1,6 @@ import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; -import { CommunityPageComponent } from './community-page.component'; import { CommunityPageResolver } from './community-page.resolver'; import { CreateCommunityPageComponent } from './create-community-page/create-community-page.component'; import { AuthenticatedGuard } from '../core/auth/authenticated.guard'; @@ -14,6 +13,7 @@ import { COMMUNITY_EDIT_PATH, COMMUNITY_CREATE_PATH } from './community-page-rou import { CommunityPageAdministratorGuard } from './community-page-administrator.guard'; import { MenuItemType } from '../shared/menu/initial-menus-state'; import { LinkMenuItemModel } from '../shared/menu/menu-item/models/link.model'; +import { ThemedCommunityPageComponent } from './themed-community-page.component'; @NgModule({ imports: [ @@ -45,7 +45,7 @@ import { LinkMenuItemModel } from '../shared/menu/menu-item/models/link.model'; }, { path: '', - component: CommunityPageComponent, + component: ThemedCommunityPageComponent, pathMatch: 'full', } ], diff --git a/src/app/+community-page/community-page.module.ts b/src/app/+community-page/community-page.module.ts index a9eaef033d..3ae75f166c 100644 --- a/src/app/+community-page/community-page.module.ts +++ b/src/app/+community-page/community-page.module.ts @@ -11,6 +11,14 @@ import { CreateCommunityPageComponent } from './create-community-page/create-com import { DeleteCommunityPageComponent } from './delete-community-page/delete-community-page.component'; import { StatisticsModule } from '../statistics/statistics.module'; import { CommunityFormModule } from './community-form/community-form.module'; +import { ThemedCommunityPageComponent } from './themed-community-page.component'; + +const DECLARATIONS = [CommunityPageComponent, + ThemedCommunityPageComponent, + CommunityPageSubCollectionListComponent, + CommunityPageSubCommunityListComponent, + CreateCommunityPageComponent, + DeleteCommunityPageComponent]; @NgModule({ imports: [ @@ -21,11 +29,10 @@ import { CommunityFormModule } from './community-form/community-form.module'; CommunityFormModule ], declarations: [ - CommunityPageComponent, - CommunityPageSubCollectionListComponent, - CommunityPageSubCommunityListComponent, - CreateCommunityPageComponent, - DeleteCommunityPageComponent + ...DECLARATIONS + ], + exports: [ + ...DECLARATIONS ] }) diff --git a/src/app/+community-page/themed-community-page.component.ts b/src/app/+community-page/themed-community-page.component.ts new file mode 100644 index 0000000000..b420789c5f --- /dev/null +++ b/src/app/+community-page/themed-community-page.component.ts @@ -0,0 +1,27 @@ +import { Component } from '@angular/core'; +import { ThemedComponent } from '../shared/theme-support/themed.component'; +import { CommunityPageComponent } from './community-page.component'; + +@Component({ + selector: 'ds-themed-community-page', + styleUrls: [], + templateUrl: '../shared/theme-support/themed.component.html', +}) + +/** + * Component to render the news section on the home page + */ +export class ThemedCommunityPageComponent extends ThemedComponent { + protected getComponentName(): string { + return 'CommunityPageComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../themes/${themeName}/app/+community-page/community-page.component`); + } + + protected importUnthemedComponent(): Promise { + return import(`./community-page.component`); + } + +} diff --git a/src/app/+lookup-by-id/lookup-by-id-routing.module.ts b/src/app/+lookup-by-id/lookup-by-id-routing.module.ts index 76c90ed6d4..52a7c8a358 100644 --- a/src/app/+lookup-by-id/lookup-by-id-routing.module.ts +++ b/src/app/+lookup-by-id/lookup-by-id-routing.module.ts @@ -1,8 +1,8 @@ import { LookupGuard } from './lookup-guard'; import { NgModule } from '@angular/core'; import { RouterModule, UrlSegment } from '@angular/router'; -import { ObjectNotFoundComponent } from './objectnotfound/objectnotfound.component'; import { isNotEmpty } from '../shared/empty.util'; +import { ThemedObjectNotFoundComponent } from './objectnotfound/themed-objectnotfound.component'; @NgModule({ imports: [ @@ -10,7 +10,7 @@ import { isNotEmpty } from '../shared/empty.util'; { matcher: urlMatcher, canActivate: [LookupGuard], - component: ObjectNotFoundComponent } + component: ThemedObjectNotFoundComponent } ]) ], providers: [ diff --git a/src/app/+lookup-by-id/lookup-by-id.module.ts b/src/app/+lookup-by-id/lookup-by-id.module.ts index 1b070c1279..0202a43033 100644 --- a/src/app/+lookup-by-id/lookup-by-id.module.ts +++ b/src/app/+lookup-by-id/lookup-by-id.module.ts @@ -4,6 +4,7 @@ import { SharedModule } from '../shared/shared.module'; import { LookupRoutingModule } from './lookup-by-id-routing.module'; import { ObjectNotFoundComponent } from './objectnotfound/objectnotfound.component'; import { DsoRedirectDataService } from '../core/data/dso-redirect-data.service'; +import { ThemedObjectNotFoundComponent } from './objectnotfound/themed-objectnotfound.component'; @NgModule({ imports: [ @@ -12,7 +13,8 @@ import { DsoRedirectDataService } from '../core/data/dso-redirect-data.service'; SharedModule, ], declarations: [ - ObjectNotFoundComponent + ObjectNotFoundComponent, + ThemedObjectNotFoundComponent ], providers: [ DsoRedirectDataService diff --git a/src/app/+lookup-by-id/objectnotfound/themed-objectnotfound.component.ts b/src/app/+lookup-by-id/objectnotfound/themed-objectnotfound.component.ts new file mode 100644 index 0000000000..947a9f4eaa --- /dev/null +++ b/src/app/+lookup-by-id/objectnotfound/themed-objectnotfound.component.ts @@ -0,0 +1,27 @@ +import { Component } from '@angular/core'; +import { ThemedComponent } from '../../shared/theme-support/themed.component'; +import { ObjectNotFoundComponent } from './objectnotfound.component'; + +@Component({ + selector: 'ds-themed-objnotfound', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', +}) + +/** + * Component to render the news section on the home page + */ +export class ThemedObjectNotFoundComponent extends ThemedComponent { + protected getComponentName(): string { + return 'ObjectNotFoundComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../themes/${themeName}/app/+lookup-by-id/objectnotfound/objectnotfound.component`); + } + + protected importUnthemedComponent(): Promise { + return import(`./objectnotfound.component`); + } + +} diff --git a/src/app/+search-page/search-page-routing.module.ts b/src/app/+search-page/search-page-routing.module.ts index f71c7b45ee..9e39ad1bc9 100644 --- a/src/app/+search-page/search-page-routing.module.ts +++ b/src/app/+search-page/search-page-routing.module.ts @@ -2,11 +2,11 @@ import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import { ConfigurationSearchPageGuard } from './configuration-search-page.guard'; -import { ConfigurationSearchPageComponent } from './configuration-search-page.component'; -import { SearchPageComponent } from './search-page.component'; import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver'; import { I18nBreadcrumbsService } from '../core/breadcrumbs/i18n-breadcrumbs.service'; import { SearchPageModule } from './search-page.module'; +import { ThemedSearchPageComponent } from './themed-search-page.component'; +import { ThemedConfigurationSearchPageComponent } from './themed-configuration-search-page.component'; @NgModule({ imports: [ @@ -15,8 +15,8 @@ import { SearchPageModule } from './search-page.module'; path: '', resolve: { breadcrumb: I18nBreadcrumbResolver }, data: { title: 'search.title', breadcrumbKey: 'search' }, children: [ - { path: '', component: SearchPageComponent }, - { path: ':configuration', component: ConfigurationSearchPageComponent, canActivate: [ConfigurationSearchPageGuard] } + { path: '', component: ThemedSearchPageComponent }, + { path: ':configuration', component: ThemedConfigurationSearchPageComponent, canActivate: [ConfigurationSearchPageGuard] } ] }] ) diff --git a/src/app/+search-page/search-page.module.ts b/src/app/+search-page/search-page.module.ts index 286f1d12be..0cf6164f8a 100644 --- a/src/app/+search-page/search-page.module.ts +++ b/src/app/+search-page/search-page.module.ts @@ -13,11 +13,13 @@ import { SearchFilterService } from '../core/shared/search/search-filter.service import { SearchConfigurationService } from '../core/shared/search/search-configuration.service'; import { JournalEntitiesModule } from '../entity-groups/journal-entities/journal-entities.module'; import { ResearchEntitiesModule } from '../entity-groups/research-entities/research-entities.module'; +import { ThemedSearchPageComponent } from './themed-search-page.component'; const components = [ SearchPageComponent, SearchComponent, - SearchTrackerComponent + SearchTrackerComponent, + ThemedSearchPageComponent ]; @NgModule({ diff --git a/src/app/+search-page/themed-configuration-search-page.component.ts b/src/app/+search-page/themed-configuration-search-page.component.ts new file mode 100644 index 0000000000..3528d3a326 --- /dev/null +++ b/src/app/+search-page/themed-configuration-search-page.component.ts @@ -0,0 +1,73 @@ +import { Component, Input } from '@angular/core'; +import { ThemedComponent } from '../shared/theme-support/themed.component'; +import { ConfigurationSearchPageComponent } from './configuration-search-page.component'; +import { Observable } from 'rxjs'; +import { Context } from '../core/shared/context.model'; + +@Component({ + selector: 'ds-themed-configuration-search-page', + styleUrls: [], + templateUrl: '../shared/theme-support/themed.component.html', +}) + +/** + * Component to render the news section on the home page + */ +export class ThemedConfigurationSearchPageComponent extends ThemedComponent { + /** + * The configuration to use for the search options + * If empty, the configuration will be determined by the route parameter called 'configuration' + */ + @Input() configuration: string; + + /** + * The actual query for the fixed filter. + * If empty, the query will be determined by the route parameter called 'filter' + */ + @Input() fixedFilterQuery: string; + + /** + * True when the search component should show results on the current page + */ + @Input() inPlaceSearch = true; + + /** + * Whether or not the search bar should be visible + */ + @Input() + searchEnabled = true; + + /** + * The width of the sidebar (bootstrap columns) + */ + @Input() + sideBarWidth = 3; + + /** + * The currently applied configuration (determines title of search) + */ + @Input() + configuration$: Observable; + + /** + * The current context + */ + @Input() + context: Context; + + protected inAndOutputNames: (keyof ConfigurationSearchPageComponent & keyof this)[] = + ['configuration', 'fixedFilterQuery', 'inPlaceSearch', 'searchEnabled', 'sideBarWidth', 'configuration$', 'context']; + + protected getComponentName(): string { + return 'ConfigurationSearchPageComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../themes/${themeName}/app/+search-page/configuration-search-page.component`); + } + + protected importUnthemedComponent(): Promise { + return import(`./configuration-search-page.component`); + } + +} diff --git a/src/app/+search-page/themed-search-page.component.ts b/src/app/+search-page/themed-search-page.component.ts new file mode 100644 index 0000000000..b23fff6289 --- /dev/null +++ b/src/app/+search-page/themed-search-page.component.ts @@ -0,0 +1,27 @@ +import { Component } from '@angular/core'; +import { ThemedComponent } from '../shared/theme-support/themed.component'; +import { SearchPageComponent } from './search-page.component'; + +@Component({ + selector: 'ds-themed-search-page', + styleUrls: [], + templateUrl: '../shared/theme-support/themed.component.html', +}) +/** + * This component represents the whole search page + * It renders search results depending on the current search options + */ +export class ThemedSearchPageComponent extends ThemedComponent { + + protected getComponentName(): string { + return 'SearchPageComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../themes/${themeName}/app/+search-page/search-page.component`); + } + + protected importUnthemedComponent(): Promise { + return import(`./search-page.component`); + } +} diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 5e5c5f5413..18ce77df07 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -2,7 +2,6 @@ import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import { AuthBlockingGuard } from './core/auth/auth-blocking.guard'; -import { PageNotFoundComponent } from './pagenotfound/pagenotfound.component'; import { AuthenticatedGuard } from './core/auth/authenticated.guard'; import { SiteAdministratorGuard } from './core/data/feature-authorization/feature-authorization-guard/site-administrator.guard'; import { @@ -23,6 +22,8 @@ import { ReloadGuard } from './core/reload/reload.guard'; import { EndUserAgreementCurrentUserGuard } from './core/end-user-agreement/end-user-agreement-current-user.guard'; import { SiteRegisterGuard } from './core/data/feature-authorization/feature-authorization-guard/site-register.guard'; import { ForbiddenComponent } from './forbidden/forbidden.component'; +import { ThemedPageNotFoundComponent } from './pagenotfound/themed-pagenotfound.component'; +import { ThemedForbiddenComponent } from './forbidden/themed-forbidden.component'; @NgModule({ imports: [ @@ -30,7 +31,7 @@ import { ForbiddenComponent } from './forbidden/forbidden.component'; path: '', canActivate: [AuthBlockingGuard], children: [ { path: '', redirectTo: '/home', pathMatch: 'full' }, - { path: 'reload/:rnd', component: PageNotFoundComponent, pathMatch: 'full', canActivate: [ReloadGuard] }, + { path: 'reload/:rnd', component: ThemedPageNotFoundComponent, pathMatch: 'full', canActivate: [ReloadGuard] }, { path: 'home', loadChildren: () => import('./+home-page/home-page.module') @@ -173,14 +174,14 @@ import { ForbiddenComponent } from './forbidden/forbidden.component'; }, { path: FORBIDDEN_PATH, - component: ForbiddenComponent + component: ThemedForbiddenComponent }, { path: 'statistics', loadChildren: () => import('./statistics-page/statistics-page-routing.module') .then((m) => m.StatisticsPageRoutingModule), }, - { path: '**', pathMatch: 'full', component: PageNotFoundComponent }, + { path: '**', pathMatch: 'full', component: ThemedPageNotFoundComponent }, ]} ],{ onSameUrlNavigation: 'reload', diff --git a/src/app/app.module.ts b/src/app/app.module.ts index cc428483c9..20aaa4ba02 100755 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -46,6 +46,8 @@ import { XsrfInterceptor } from './core/xsrf/xsrf.interceptor'; import { RootComponent } from './root/root.component'; import { ThemedRootComponent } from './root/themed-root.component'; import { ThemedEntryComponentModule } from '../themes/themed-entry-component.module'; +import { ThemedPageNotFoundComponent } from './pagenotfound/themed-pagenotfound.component'; +import { ThemedForbiddenComponent } from './forbidden/themed-forbidden.component'; export function getBase() { return environment.ui.nameSpace; @@ -133,11 +135,13 @@ const DECLARATIONS = [ ExpandableAdminSidebarSectionComponent, FooterComponent, PageNotFoundComponent, + ThemedPageNotFoundComponent, NotificationComponent, NotificationsBoardComponent, SearchNavbarComponent, BreadcrumbsComponent, ForbiddenComponent, + ThemedForbiddenComponent, ]; const EXPORTS = [ diff --git a/src/app/community-list-page/community-list-page.module.ts b/src/app/community-list-page/community-list-page.module.ts index 57b016bc6e..3b009e227c 100644 --- a/src/app/community-list-page/community-list-page.module.ts +++ b/src/app/community-list-page/community-list-page.module.ts @@ -4,7 +4,14 @@ import { SharedModule } from '../shared/shared.module'; import { CommunityListPageComponent } from './community-list-page.component'; import { CommunityListPageRoutingModule } from './community-list-page.routing.module'; import { CommunityListComponent } from './community-list/community-list.component'; +import { ThemedCommunityListPageComponent } from './themed-community-list-page.component'; + +const DECLARATIONS = [ + CommunityListPageComponent, + CommunityListComponent, + ThemedCommunityListPageComponent +]; /** * The page which houses a title and the community list, as described in community-list.component */ @@ -15,9 +22,11 @@ import { CommunityListComponent } from './community-list/community-list.componen CommunityListPageRoutingModule ], declarations: [ - CommunityListPageComponent, - CommunityListComponent - ] + ...DECLARATIONS + ], + exports: [ + ...DECLARATIONS, + ], }) export class CommunityListPageModule { diff --git a/src/app/community-list-page/community-list-page.routing.module.ts b/src/app/community-list-page/community-list-page.routing.module.ts index fe250cb96d..d618e33269 100644 --- a/src/app/community-list-page/community-list-page.routing.module.ts +++ b/src/app/community-list-page/community-list-page.routing.module.ts @@ -2,8 +2,8 @@ import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import { CdkTreeModule } from '@angular/cdk/tree'; -import { CommunityListPageComponent } from './community-list-page.component'; import { CommunityListService } from './community-list-service'; +import { ThemedCommunityListPageComponent } from './themed-community-list-page.component'; /** * RouterModule to help navigate to the page with the community list tree @@ -13,7 +13,7 @@ import { CommunityListService } from './community-list-service'; RouterModule.forChild([ { path: '', - component: CommunityListPageComponent, + component: ThemedCommunityListPageComponent, pathMatch: 'full', data: { title: 'communityList.tabTitle' } } diff --git a/src/app/community-list-page/themed-community-list-page.component.ts b/src/app/community-list-page/themed-community-list-page.component.ts new file mode 100644 index 0000000000..6b374fca90 --- /dev/null +++ b/src/app/community-list-page/themed-community-list-page.component.ts @@ -0,0 +1,27 @@ +import { Component } from '@angular/core'; +import { ThemedComponent } from '../shared/theme-support/themed.component'; +import { CommunityListPageComponent } from './community-list-page.component'; + +/** + * Page with title and the community list tree, as described in community-list.component; + * navigated to with community-list.page.routing.module + */ +@Component({ + selector: 'ds-themed-community-list-page', + styleUrls: [], + templateUrl: '../shared/theme-support/themed.component.html', +}) +export class ThemedCommunityListPageComponent extends ThemedComponent { + protected getComponentName(): string { + return 'CommunityListPageComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../themes/${themeName}/app/community-list-page/community-list-page.component`); + } + + protected importUnthemedComponent(): Promise { + return import(`./community-list-page.component`); + } + +} diff --git a/src/app/forbidden/themed-forbidden.component.ts b/src/app/forbidden/themed-forbidden.component.ts new file mode 100644 index 0000000000..bb3694cae2 --- /dev/null +++ b/src/app/forbidden/themed-forbidden.component.ts @@ -0,0 +1,27 @@ +import { Component } from '@angular/core'; +import { ThemedComponent } from '../shared/theme-support/themed.component'; +import { ForbiddenComponent } from './forbidden.component'; + +@Component({ + selector: 'ds-themed-forbidden', + styleUrls: [], + templateUrl: '../shared/theme-support/themed.component.html', +}) + +/** + * Component to render the news section on the home page + */ +export class ThemedForbiddenComponent extends ThemedComponent { + protected getComponentName(): string { + return 'ForbiddenComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../themes/${themeName}/app/forbidden/forbidden.component`); + } + + protected importUnthemedComponent(): Promise { + return import(`./forbidden.component`); + } + +} diff --git a/src/app/info/end-user-agreement/themed-end-user-agreement.component.ts b/src/app/info/end-user-agreement/themed-end-user-agreement.component.ts new file mode 100644 index 0000000000..6c76314e06 --- /dev/null +++ b/src/app/info/end-user-agreement/themed-end-user-agreement.component.ts @@ -0,0 +1,28 @@ +import { Component } from '@angular/core'; +import { ThemedComponent } from '../../shared/theme-support/themed.component'; +import { EndUserAgreementComponent } from './end-user-agreement.component'; + +@Component({ + selector: 'ds-themed-end-user-agreement', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', +}) + +/** + * Component to render the news section on the home page + */ +export class ThemedEndUserAgreementComponent extends ThemedComponent { + + protected getComponentName(): string { + return 'EndUserAgreementComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../themes/${themeName}/app/info/end-user-agreement/end-user-agreement.component`); + } + + protected importUnthemedComponent(): Promise { + return import(`./end-user-agreement.component`); + } + +} diff --git a/src/app/info/info-routing.module.ts b/src/app/info/info-routing.module.ts index 799572f9b9..f76fb47ff0 100644 --- a/src/app/info/info-routing.module.ts +++ b/src/app/info/info-routing.module.ts @@ -1,16 +1,16 @@ import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; -import { EndUserAgreementComponent } from './end-user-agreement/end-user-agreement.component'; import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver'; -import { PrivacyComponent } from './privacy/privacy.component'; import { PRIVACY_PATH, END_USER_AGREEMENT_PATH } from './info-routing-paths'; +import { ThemedEndUserAgreementComponent } from './end-user-agreement/themed-end-user-agreement.component'; +import { ThemedPrivacyComponent } from './privacy/themed-privacy.component'; @NgModule({ imports: [ RouterModule.forChild([ { path: END_USER_AGREEMENT_PATH, - component: EndUserAgreementComponent, + component: ThemedEndUserAgreementComponent, resolve: { breadcrumb: I18nBreadcrumbResolver }, data: { title: 'info.end-user-agreement.title', breadcrumbKey: 'info.end-user-agreement' } } @@ -18,7 +18,7 @@ import { PRIVACY_PATH, END_USER_AGREEMENT_PATH } from './info-routing-paths'; RouterModule.forChild([ { path: PRIVACY_PATH, - component: PrivacyComponent, + component: ThemedPrivacyComponent, resolve: { breadcrumb: I18nBreadcrumbResolver }, data: { title: 'info.privacy.title', breadcrumbKey: 'info.privacy' } } diff --git a/src/app/info/info.module.ts b/src/app/info/info.module.ts index ae8ef89b27..84ba5a62db 100644 --- a/src/app/info/info.module.ts +++ b/src/app/info/info.module.ts @@ -6,6 +6,17 @@ import { InfoRoutingModule } from './info-routing.module'; import { EndUserAgreementContentComponent } from './end-user-agreement/end-user-agreement-content/end-user-agreement-content.component'; import { PrivacyComponent } from './privacy/privacy.component'; import { PrivacyContentComponent } from './privacy/privacy-content/privacy-content.component'; +import { ThemedEndUserAgreementComponent } from './end-user-agreement/themed-end-user-agreement.component'; +import { ThemedPrivacyComponent } from './privacy/themed-privacy.component'; + +const DECLARATIONS = [ + EndUserAgreementComponent, + ThemedEndUserAgreementComponent, + EndUserAgreementContentComponent, + PrivacyComponent, + PrivacyContentComponent, + ThemedPrivacyComponent +]; @NgModule({ imports: [ @@ -14,10 +25,10 @@ import { PrivacyContentComponent } from './privacy/privacy-content/privacy-conte InfoRoutingModule ], declarations: [ - EndUserAgreementComponent, - EndUserAgreementContentComponent, - PrivacyComponent, - PrivacyContentComponent + ...DECLARATIONS + ], + exports: [ + ...DECLARATIONS ] }) export class InfoModule { diff --git a/src/app/info/privacy/themed-privacy.component.ts b/src/app/info/privacy/themed-privacy.component.ts new file mode 100644 index 0000000000..5aed8d38af --- /dev/null +++ b/src/app/info/privacy/themed-privacy.component.ts @@ -0,0 +1,27 @@ +import { Component } from '@angular/core'; +import { ThemedComponent } from '../../shared/theme-support/themed.component'; +import { PrivacyComponent } from './privacy.component'; + +@Component({ + selector: 'ds-themed-privacy', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', +}) + +/** + * Component to render the news section on the home page + */ +export class ThemedPrivacyComponent extends ThemedComponent { + protected getComponentName(): string { + return 'PrivacyComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../themes/${themeName}/app/info/privacy/privacy.component`); + } + + protected importUnthemedComponent(): Promise { + return import(`./privacy.component`); + } + +} diff --git a/src/app/pagenotfound/themed-pagenotfound.component.ts b/src/app/pagenotfound/themed-pagenotfound.component.ts new file mode 100644 index 0000000000..68b06e2ac0 --- /dev/null +++ b/src/app/pagenotfound/themed-pagenotfound.component.ts @@ -0,0 +1,27 @@ +import { Component } from '@angular/core'; +import { ThemedComponent } from '../shared/theme-support/themed.component'; +import { PageNotFoundComponent } from './pagenotfound.component'; + +@Component({ + selector: 'ds-themed-search-page', + styleUrls: [], + templateUrl: '../shared/theme-support/themed.component.html', +}) +/** + * This component represents the whole search page + * It renders search results depending on the current search options + */ +export class ThemedPageNotFoundComponent extends ThemedComponent { + + protected getComponentName(): string { + return 'PageNotFoundComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../themes/${themeName}/app/pagenotfound/pagenotfound.component`); + } + + protected importUnthemedComponent(): Promise { + return import(`./pagenotfound.component`); + } +} diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 1065d82833..406c7f92fc 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -232,6 +232,7 @@ import { ConfigurationSearchPageComponent } from '../+search-page/configuration- import { LinkMenuItemComponent } from './menu/menu-item/link-menu-item.component'; import { OnClickMenuItemComponent } from './menu/menu-item/onclick-menu-item.component'; import { TextMenuItemComponent } from './menu/menu-item/text-menu-item.component'; +import { ThemedConfigurationSearchPageComponent } from '../+search-page/themed-configuration-search-page.component'; /** * Declaration needed to make sure all decorator functions are called in time @@ -516,7 +517,8 @@ const ENTRY_COMPONENTS = [ ]; const SHARED_SEARCH_PAGE_COMPONENTS = [ - ConfigurationSearchPageComponent + ConfigurationSearchPageComponent, + ThemedConfigurationSearchPageComponent ]; const SHARED_ITEM_PAGE_COMPONENTS = [ diff --git a/src/app/statistics-page/collection-statistics-page/themed-collection-statistics-page.component.ts b/src/app/statistics-page/collection-statistics-page/themed-collection-statistics-page.component.ts new file mode 100644 index 0000000000..75cf60437f --- /dev/null +++ b/src/app/statistics-page/collection-statistics-page/themed-collection-statistics-page.component.ts @@ -0,0 +1,27 @@ +import { Component } from '@angular/core'; +import { ThemedComponent } from '../../shared/theme-support/themed.component'; +import { CollectionStatisticsPageComponent } from './collection-statistics-page.component'; + +@Component({ + selector: 'ds-themed-collection-statistics-page', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', +}) + +/** + * Component to render the news section on the home page + */ +export class ThemedCollectionStatisticsPageComponent extends ThemedComponent { + protected getComponentName(): string { + return 'CollectionStatisticsPageComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../themes/${themeName}/app/statistics-page/collection-statistics-page/collection-statistics-page.component`); + } + + protected importUnthemedComponent(): Promise { + return import(`./collection-statistics-page.component`); + } + +} diff --git a/src/app/statistics-page/community-statistics-page/themed-community-statistics-page.component.ts b/src/app/statistics-page/community-statistics-page/themed-community-statistics-page.component.ts new file mode 100644 index 0000000000..34dc17e1b3 --- /dev/null +++ b/src/app/statistics-page/community-statistics-page/themed-community-statistics-page.component.ts @@ -0,0 +1,27 @@ +import { Component } from '@angular/core'; +import { ThemedComponent } from '../../shared/theme-support/themed.component'; +import { CommunityStatisticsPageComponent } from './community-statistics-page.component'; + +@Component({ + selector: 'ds-themed-collection-statistics-page', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', +}) + +/** + * Component to render the news section on the home page + */ +export class ThemedCommunityStatisticsPageComponent extends ThemedComponent { + protected getComponentName(): string { + return 'CommunityStatisticsPageComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../themes/${themeName}/app/statistics-page/community-statistics-page/community-statistics-page.component`); + } + + protected importUnthemedComponent(): Promise { + return import(`./community-statistics-page.component`); + } + +} diff --git a/src/app/statistics-page/item-statistics-page/themed-item-statistics-page.component.ts b/src/app/statistics-page/item-statistics-page/themed-item-statistics-page.component.ts new file mode 100644 index 0000000000..4651269c54 --- /dev/null +++ b/src/app/statistics-page/item-statistics-page/themed-item-statistics-page.component.ts @@ -0,0 +1,27 @@ +import { Component } from '@angular/core'; +import { ThemedComponent } from '../../shared/theme-support/themed.component'; +import { ItemStatisticsPageComponent } from './item-statistics-page.component'; + +@Component({ + selector: 'ds-themed-item-statistics-page', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', +}) + +/** + * Component to render the news section on the home page + */ +export class ThemedItemStatisticsPageComponent extends ThemedComponent { + protected getComponentName(): string { + return 'ItemStatisticsPageComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../themes/${themeName}/app/statistics-page/item-statistics-page/item-statistics-page.component`); + } + + protected importUnthemedComponent(): Promise { + return import(`./item-statistics-page.component`); + } + +} diff --git a/src/app/statistics-page/site-statistics-page/themed-site-statistics-page.component.ts b/src/app/statistics-page/site-statistics-page/themed-site-statistics-page.component.ts new file mode 100644 index 0000000000..4238cc788a --- /dev/null +++ b/src/app/statistics-page/site-statistics-page/themed-site-statistics-page.component.ts @@ -0,0 +1,27 @@ +import { Component } from '@angular/core'; +import { ThemedComponent } from '../../shared/theme-support/themed.component'; +import { SiteStatisticsPageComponent } from './site-statistics-page.component'; + +@Component({ + selector: 'ds-themed-site-statistics-page', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', +}) + +/** + * Component to render the news section on the home page + */ +export class ThemedSiteStatisticsPageComponent extends ThemedComponent { + protected getComponentName(): string { + return 'SiteStatisticsPageComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../themes/${themeName}/app/statistics-page/site-statistics-page/site-statistics-page.component`); + } + + protected importUnthemedComponent(): Promise { + return import(`./site-statistics-page.component`); + } + +} diff --git a/src/app/statistics-page/statistics-page-routing.module.ts b/src/app/statistics-page/statistics-page-routing.module.ts index 44943b94d2..6a133fc9ac 100644 --- a/src/app/statistics-page/statistics-page-routing.module.ts +++ b/src/app/statistics-page/statistics-page-routing.module.ts @@ -3,13 +3,13 @@ import { RouterModule } from '@angular/router'; import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver'; import { I18nBreadcrumbsService } from '../core/breadcrumbs/i18n-breadcrumbs.service'; import { StatisticsPageModule } from './statistics-page.module'; -import { SiteStatisticsPageComponent } from './site-statistics-page/site-statistics-page.component'; import { ItemPageResolver } from '../+item-page/item-page.resolver'; -import { ItemStatisticsPageComponent } from './item-statistics-page/item-statistics-page.component'; import { CollectionPageResolver } from '../+collection-page/collection-page.resolver'; -import { CollectionStatisticsPageComponent } from './collection-statistics-page/collection-statistics-page.component'; import { CommunityPageResolver } from '../+community-page/community-page.resolver'; -import { CommunityStatisticsPageComponent } from './community-statistics-page/community-statistics-page.component'; +import { ThemedCollectionStatisticsPageComponent } from './collection-statistics-page/themed-collection-statistics-page.component'; +import { ThemedCommunityStatisticsPageComponent } from './community-statistics-page/themed-community-statistics-page.component'; +import { ThemedItemStatisticsPageComponent } from './item-statistics-page/themed-item-statistics-page.component'; +import { ThemedSiteStatisticsPageComponent } from './site-statistics-page/themed-site-statistics-page.component'; @NgModule({ imports: [ @@ -27,7 +27,7 @@ import { CommunityStatisticsPageComponent } from './community-statistics-page/co children: [ { path: '', - component: SiteStatisticsPageComponent, + component: ThemedSiteStatisticsPageComponent, }, ] }, @@ -41,7 +41,7 @@ import { CommunityStatisticsPageComponent } from './community-statistics-page/co title: 'statistics.title', breadcrumbKey: 'statistics' }, - component: ItemStatisticsPageComponent, + component: ThemedItemStatisticsPageComponent, }, { path: `collections/:id`, @@ -53,7 +53,7 @@ import { CommunityStatisticsPageComponent } from './community-statistics-page/co title: 'statistics.title', breadcrumbKey: 'statistics' }, - component: CollectionStatisticsPageComponent, + component: ThemedCollectionStatisticsPageComponent, }, { path: `communities/:id`, @@ -65,7 +65,7 @@ import { CommunityStatisticsPageComponent } from './community-statistics-page/co title: 'statistics.title', breadcrumbKey: 'statistics' }, - component: CommunityStatisticsPageComponent, + component: ThemedCommunityStatisticsPageComponent, }, ] ) @@ -75,6 +75,7 @@ import { CommunityStatisticsPageComponent } from './community-statistics-page/co I18nBreadcrumbsService, CollectionPageResolver, CommunityPageResolver, + ItemPageResolver ] }) export class StatisticsPageRoutingModule { diff --git a/src/app/statistics-page/statistics-page.module.ts b/src/app/statistics-page/statistics-page.module.ts index 9957d4b0d7..863e17fcb5 100644 --- a/src/app/statistics-page/statistics-page.module.ts +++ b/src/app/statistics-page/statistics-page.module.ts @@ -10,13 +10,21 @@ import { StatisticsTableComponent } from './statistics-table/statistics-table.co import { ItemStatisticsPageComponent } from './item-statistics-page/item-statistics-page.component'; import { CollectionStatisticsPageComponent } from './collection-statistics-page/collection-statistics-page.component'; import { CommunityStatisticsPageComponent } from './community-statistics-page/community-statistics-page.component'; +import { ThemedCollectionStatisticsPageComponent } from './collection-statistics-page/themed-collection-statistics-page.component'; +import { ThemedCommunityStatisticsPageComponent } from './community-statistics-page/themed-community-statistics-page.component'; +import { ThemedItemStatisticsPageComponent } from './item-statistics-page/themed-item-statistics-page.component'; +import { ThemedSiteStatisticsPageComponent } from './site-statistics-page/themed-site-statistics-page.component'; const components = [ StatisticsTableComponent, SiteStatisticsPageComponent, ItemStatisticsPageComponent, CollectionStatisticsPageComponent, - CommunityStatisticsPageComponent + CommunityStatisticsPageComponent, + ThemedCollectionStatisticsPageComponent, + ThemedCommunityStatisticsPageComponent, + ThemedItemStatisticsPageComponent, + ThemedSiteStatisticsPageComponent ]; @NgModule({ diff --git a/src/environments/environment.common.ts b/src/environments/environment.common.ts index c6ae9858e5..bc1f634e19 100644 --- a/src/environments/environment.common.ts +++ b/src/environments/environment.common.ts @@ -251,10 +251,10 @@ export const environment: GlobalConfig = { // name: 'custom', // uuid: '0958c910-2037-42a9-81c7-dca80e3892b4' // }, - // { - // // A theme with only a name will match every route - // name: 'custom' - // }, + { + // A theme with only a name will match every route + name: 'custom' + }, { // This theme will use the default bootstrap styling for DSpace components diff --git a/src/themes/custom/app/+browse-by/+browse-by-switcher/browse-by-switcher.component.html b/src/themes/custom/app/+browse-by/+browse-by-switcher/browse-by-switcher.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/+browse-by/+browse-by-switcher/browse-by-switcher.component.scss b/src/themes/custom/app/+browse-by/+browse-by-switcher/browse-by-switcher.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/+browse-by/+browse-by-switcher/browse-by-switcher.component.ts b/src/themes/custom/app/+browse-by/+browse-by-switcher/browse-by-switcher.component.ts new file mode 100644 index 0000000000..b772701ad0 --- /dev/null +++ b/src/themes/custom/app/+browse-by/+browse-by-switcher/browse-by-switcher.component.ts @@ -0,0 +1,15 @@ +import { Component } from '@angular/core'; +import { BrowseBySwitcherComponent as BaseComponent } from '../../../../../app/+browse-by/+browse-by-switcher/browse-by-switcher.component'; + +@Component({ + selector: 'ds-browse-by-switcher', + // styleUrls: ['./browse-by-switcher.component.scss'], + // templateUrl: './browse-by-switcher.component.html' + templateUrl: '../../../../../app/+browse-by/+browse-by-switcher/browse-by-switcher.component.html' +}) + +/** + * Component to render the news section on the home page + */ +export class BrowseBySwitcherComponent extends BaseComponent {} + diff --git a/src/themes/custom/app/+collection-page/collection-page.component.html b/src/themes/custom/app/+collection-page/collection-page.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/+collection-page/collection-page.component.scss b/src/themes/custom/app/+collection-page/collection-page.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/+collection-page/collection-page.component.ts b/src/themes/custom/app/+collection-page/collection-page.component.ts new file mode 100644 index 0000000000..f38a90631f --- /dev/null +++ b/src/themes/custom/app/+collection-page/collection-page.component.ts @@ -0,0 +1,17 @@ +import { Component } from '@angular/core'; +import { CollectionPageComponent as BaseComponent} from '../../../../app/+collection-page/collection-page.component'; + +/** + * This component representing the `Forbidden` DSpace page. + */ +@Component({ + selector: 'ds-collection-page', + // templateUrl: './collection-page.component.html', + templateUrl: '../../../../app/+collection-page/collection-page.component.html', + // styleUrls: ['./collection-page.component.scss'] + styleUrls: ['../../../../app/+collection-page/collection-page.component.scss'] +}) +/** + * Component to render the news section on the home page + */ +export class CollectionPageComponent extends BaseComponent {} diff --git a/src/themes/custom/app/+community-page/community-page.component.html b/src/themes/custom/app/+community-page/community-page.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/+community-page/community-page.component.scss b/src/themes/custom/app/+community-page/community-page.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/+community-page/community-page.component.ts b/src/themes/custom/app/+community-page/community-page.component.ts new file mode 100644 index 0000000000..2df33a0b9e --- /dev/null +++ b/src/themes/custom/app/+community-page/community-page.component.ts @@ -0,0 +1,17 @@ +import { Component } from '@angular/core'; +import { CommunityPageComponent as BaseComponent} from '../../../../app/+community-page/community-page.component'; + +/** + * This component representing the `Forbidden` DSpace page. + */ +@Component({ + selector: 'ds-community-page', + // templateUrl: './community-page.component.html', + templateUrl: '../../../../app/+community-page/community-page.component.html', + // styleUrls: ['./community-page.component.scss'] + styleUrls: ['../../../../app/+community-page/community-page.component.scss'] +}) +/** + * Component to render the news section on the home page + */ +export class CommunityPageComponent extends BaseComponent {} diff --git a/src/themes/custom/app/+lookup-by-id/objectnotfound/objectnotfound.component.html b/src/themes/custom/app/+lookup-by-id/objectnotfound/objectnotfound.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/+lookup-by-id/objectnotfound/objectnotfound.component.scss b/src/themes/custom/app/+lookup-by-id/objectnotfound/objectnotfound.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/+lookup-by-id/objectnotfound/objectnotfound.component.ts b/src/themes/custom/app/+lookup-by-id/objectnotfound/objectnotfound.component.ts new file mode 100644 index 0000000000..f41553ff00 --- /dev/null +++ b/src/themes/custom/app/+lookup-by-id/objectnotfound/objectnotfound.component.ts @@ -0,0 +1,16 @@ +import { Component } from '@angular/core'; +import { ObjectNotFoundComponent as BaseComponent } from '../../../../../app/+lookup-by-id/objectnotfound/objectnotfound.component'; + +@Component({ + selector: 'ds-objnotfound', + // styleUrls: ['./objectnotfound.component.scss'], + styleUrls: ['../../../../../app/+lookup-by-id/objectnotfound/objectnotfound.component.scss'], + // templateUrl: './objectnotfound.component.html', + templateUrl: '../../../../../app/+lookup-by-id/objectnotfound/objectnotfound.component.html' +}) + +/** + * Component to render the news section on the home page + */ +export class ObjectNotFoundComponent extends BaseComponent {} + diff --git a/src/themes/custom/app/+search-page/configuration-search-page.component.html b/src/themes/custom/app/+search-page/configuration-search-page.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/+search-page/configuration-search-page.component.scss b/src/themes/custom/app/+search-page/configuration-search-page.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/+search-page/configuration-search-page.component.ts b/src/themes/custom/app/+search-page/configuration-search-page.component.ts new file mode 100644 index 0000000000..96c3915d39 --- /dev/null +++ b/src/themes/custom/app/+search-page/configuration-search-page.component.ts @@ -0,0 +1,15 @@ +import { Component } from '@angular/core'; +import { SearchPageComponent as BaseComponent } from '../../../../app/+search-page/search-page.component'; + +@Component({ + selector: 'ds-configuration-search-page', + // styleUrls: ['./configuration-search-page.component.html'], + // templateUrl: './configuration-search-page.component.html' + templateUrl: '../../../../app/+search-page/search.component.html' +}) + +/** + * Component to render the news section on the home page + */ +export class ConfigurationSearchPageComponent extends BaseComponent {} + diff --git a/src/themes/custom/app/+search-page/search-page.component.html b/src/themes/custom/app/+search-page/search-page.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/+search-page/search-page.component.scss b/src/themes/custom/app/+search-page/search-page.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/+search-page/search-page.component.ts b/src/themes/custom/app/+search-page/search-page.component.ts new file mode 100644 index 0000000000..1b7c912260 --- /dev/null +++ b/src/themes/custom/app/+search-page/search-page.component.ts @@ -0,0 +1,15 @@ +import { Component } from '@angular/core'; +import { SearchPageComponent as BaseComponent } from '../../../../app/+search-page/search-page.component'; + +@Component({ + selector: 'ds-search-page', + // styleUrls: ['./search-page.component.scss'], + // templateUrl: './search-page.component.html' + templateUrl: '../../../../app/+search-page/search-page.component.html' +}) + +/** + * Component to render the news section on the home page + */ +export class SearchPageComponent extends BaseComponent {} + diff --git a/src/themes/custom/app/community-list-page/community-list-page.component.html b/src/themes/custom/app/community-list-page/community-list-page.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/community-list-page/community-list-page.component.scss b/src/themes/custom/app/community-list-page/community-list-page.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/community-list-page/community-list-page.component.ts b/src/themes/custom/app/community-list-page/community-list-page.component.ts new file mode 100644 index 0000000000..87e8be0a96 --- /dev/null +++ b/src/themes/custom/app/community-list-page/community-list-page.component.ts @@ -0,0 +1,15 @@ +import { Component } from '@angular/core'; +import { CommunityListPageComponent as BaseComponent } from '../../../../app/community-list-page/community-list-page.component'; + +@Component({ + selector: 'ds-community-list-page', + // styleUrls: ['./community-list-page.component.scss'], + // templateUrl: './community-list-page.component.html' + templateUrl: '../../../../app/community-list-page/community-list-page.component.html' +}) + +/** + * Component to render the news section on the home page + */ +export class CommunityListPageComponent extends BaseComponent {} + diff --git a/src/themes/custom/app/forbidden/forbidden.component.html b/src/themes/custom/app/forbidden/forbidden.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/forbidden/forbidden.component.scss b/src/themes/custom/app/forbidden/forbidden.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/forbidden/forbidden.component.ts b/src/themes/custom/app/forbidden/forbidden.component.ts new file mode 100644 index 0000000000..e374d67508 --- /dev/null +++ b/src/themes/custom/app/forbidden/forbidden.component.ts @@ -0,0 +1,17 @@ +import { Component } from '@angular/core'; +import { ForbiddenComponent as BaseComponent } from '../../../../app/forbidden/forbidden.component'; + +/** + * This component representing the `Forbidden` DSpace page. + */ +@Component({ + selector: 'ds-forbidden', + // templateUrl: './forbidden.component.html', + templateUrl: '../../../../app/forbidden/forbidden.component.html', + // styleUrls: ['./forbidden.component.scss'] + styleUrls: ['../../../../app/forbidden/forbidden.component.scss'] +}) +/** + * Component to render the news section on the home page + */ +export class ForbiddenComponent extends BaseComponent {} diff --git a/src/themes/custom/app/info/end-user-agreement/end-user-agreement.component.html b/src/themes/custom/app/info/end-user-agreement/end-user-agreement.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/info/end-user-agreement/end-user-agreement.component.scss b/src/themes/custom/app/info/end-user-agreement/end-user-agreement.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/info/end-user-agreement/end-user-agreement.component.ts b/src/themes/custom/app/info/end-user-agreement/end-user-agreement.component.ts new file mode 100644 index 0000000000..7e4f490023 --- /dev/null +++ b/src/themes/custom/app/info/end-user-agreement/end-user-agreement.component.ts @@ -0,0 +1,16 @@ +import { Component } from '@angular/core'; +import { EndUserAgreementComponent as BaseComponent } from '../../../../../app/info/end-user-agreement/end-user-agreement.component'; + +@Component({ + selector: 'ds-home-news', + // styleUrls: ['./end-user-agreement.component.scss'], + styleUrls: ['../../../../../app/info/end-user-agreement/end-user-agreement.component.scss'], + // templateUrl: './end-user-agreement.component.html' + templateUrl: '../../../../../app/info/end-user-agreement/end-user-agreement.component.html' +}) + +/** + * Component to render the news section on the home page + */ +export class EndUserAgreementComponent extends BaseComponent {} + diff --git a/src/themes/custom/app/info/privacy/privacy.component.html b/src/themes/custom/app/info/privacy/privacy.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/info/privacy/privacy.component.scss b/src/themes/custom/app/info/privacy/privacy.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/info/privacy/privacy.component.ts b/src/themes/custom/app/info/privacy/privacy.component.ts new file mode 100644 index 0000000000..fb7f193f4e --- /dev/null +++ b/src/themes/custom/app/info/privacy/privacy.component.ts @@ -0,0 +1,15 @@ +import { Component } from '@angular/core'; +import { PrivacyComponent as BaseComponent } from '../../../../../app/info/privacy/privacy.component'; + +@Component({ + selector: 'ds-privacy', + // styleUrls: ['./privacy.component.scss'], + styleUrls: ['../../../../../app/info/privacy/privacy.component.scss'], + // templateUrl: './privacy.component.html' + templateUrl: '../../../../../app/info/privacy/privacy.component.html' +}) + +/** + * Component to render the news section on the home page + */ +export class PrivacyComponent extends BaseComponent {} diff --git a/src/themes/custom/app/pagenotfound/pagenotfound.component.html b/src/themes/custom/app/pagenotfound/pagenotfound.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/pagenotfound/pagenotfound.component.scss b/src/themes/custom/app/pagenotfound/pagenotfound.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/pagenotfound/pagenotfound.component.ts b/src/themes/custom/app/pagenotfound/pagenotfound.component.ts new file mode 100644 index 0000000000..565b648172 --- /dev/null +++ b/src/themes/custom/app/pagenotfound/pagenotfound.component.ts @@ -0,0 +1,16 @@ +import { Component } from '@angular/core'; +import { PageNotFoundComponent as BaseComponent } from '../../../../app/pagenotfound/pagenotfound.component'; + +@Component({ + selector: 'ds-pagenotfound', + // styleUrls: ['./pagenotfound.component.scss'], + styleUrls: ['../../../../app/pagenotfound/pagenotfound.component.scss'], + // templateUrl: './pagenotfound.component.html' + templateUrl: '../../../../app/pagenotfound/pagenotfound.component.html' +}) + +/** + * Component to render the news section on the home page + */ +export class PageNotFoundComponent extends BaseComponent {} + diff --git a/src/themes/custom/app/statistics-page/collection-statistics-page/collection-statistics-page.component.html b/src/themes/custom/app/statistics-page/collection-statistics-page/collection-statistics-page.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/statistics-page/collection-statistics-page/collection-statistics-page.component.scss b/src/themes/custom/app/statistics-page/collection-statistics-page/collection-statistics-page.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/statistics-page/collection-statistics-page/collection-statistics-page.component.ts b/src/themes/custom/app/statistics-page/collection-statistics-page/collection-statistics-page.component.ts new file mode 100644 index 0000000000..0d637fa44d --- /dev/null +++ b/src/themes/custom/app/statistics-page/collection-statistics-page/collection-statistics-page.component.ts @@ -0,0 +1,16 @@ +import { Component } from '@angular/core'; +import { CollectionStatisticsPageComponent as BaseComponent } from '../../../../../app/statistics-page/collection-statistics-page/collection-statistics-page.component'; + +@Component({ + selector: 'ds-collection-statistics-page', + // styleUrls: ['./collection-statistics-page.component.scss'], + styleUrls: ['../../../../../app/statistics-page/collection-statistics-page/collection-statistics-page.component.scss'], + // templateUrl: './collection-statistics-page.component.html', + templateUrl: '../../../../../app/statistics-page/statistics-page/statistics-page.component.html' +}) + +/** + * Component to render the news section on the home page + */ +export class CollectionStatisticsPageComponent extends BaseComponent {} + diff --git a/src/themes/custom/app/statistics-page/community-statistics-page/community-statistics-page.component.html b/src/themes/custom/app/statistics-page/community-statistics-page/community-statistics-page.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/statistics-page/community-statistics-page/community-statistics-page.component.scss b/src/themes/custom/app/statistics-page/community-statistics-page/community-statistics-page.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/statistics-page/community-statistics-page/community-statistics-page.component.ts b/src/themes/custom/app/statistics-page/community-statistics-page/community-statistics-page.component.ts new file mode 100644 index 0000000000..7094d944c9 --- /dev/null +++ b/src/themes/custom/app/statistics-page/community-statistics-page/community-statistics-page.component.ts @@ -0,0 +1,16 @@ +import { Component } from '@angular/core'; +import { CommunityStatisticsPageComponent as BaseComponent } from '../../../../../app/statistics-page/community-statistics-page/community-statistics-page.component'; + +@Component({ + selector: 'ds-collection-statistics-page', + // styleUrls: ['./community-statistics-page.component.scss'], + styleUrls: ['../../../../../app/statistics-page/community-statistics-page/community-statistics-page.component.scss'], + // templateUrl: './community-statistics-page.component.html', + templateUrl: '../../../../../app/statistics-page/statistics-page/statistics-page.component.html' +}) + +/** + * Component to render the news section on the home page + */ +export class CommunityStatisticsPageComponent extends BaseComponent {} + diff --git a/src/themes/custom/app/statistics-page/item-statistics-page/item-statistics-page.component.html b/src/themes/custom/app/statistics-page/item-statistics-page/item-statistics-page.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/statistics-page/item-statistics-page/item-statistics-page.component.scss b/src/themes/custom/app/statistics-page/item-statistics-page/item-statistics-page.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/statistics-page/item-statistics-page/item-statistics-page.component.ts b/src/themes/custom/app/statistics-page/item-statistics-page/item-statistics-page.component.ts new file mode 100644 index 0000000000..f436d7ea9f --- /dev/null +++ b/src/themes/custom/app/statistics-page/item-statistics-page/item-statistics-page.component.ts @@ -0,0 +1,16 @@ +import { Component } from '@angular/core'; +import { ItemStatisticsPageComponent as BaseComponent } from '../../../../../app/statistics-page/item-statistics-page/item-statistics-page.component'; + +@Component({ + selector: 'ds-item-statistics-page', + // styleUrls: ['./item-statistics-page.component.scss'], + styleUrls: ['../../../../../app/statistics-page/item-statistics-page/item-statistics-page.component.scss'], + // templateUrl: './item-statistics-page.component.html', + templateUrl: '../../../../../app/statistics-page/statistics-page/statistics-page.component.html' +}) + +/** + * Component to render the news section on the home page + */ +export class ItemStatisticsPageComponent extends BaseComponent {} + diff --git a/src/themes/custom/app/statistics-page/site-statistics-page/site-statistics-page.component.html b/src/themes/custom/app/statistics-page/site-statistics-page/site-statistics-page.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/statistics-page/site-statistics-page/site-statistics-page.component.scss b/src/themes/custom/app/statistics-page/site-statistics-page/site-statistics-page.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/statistics-page/site-statistics-page/site-statistics-page.component.ts b/src/themes/custom/app/statistics-page/site-statistics-page/site-statistics-page.component.ts new file mode 100644 index 0000000000..3634a55ada --- /dev/null +++ b/src/themes/custom/app/statistics-page/site-statistics-page/site-statistics-page.component.ts @@ -0,0 +1,16 @@ +import { Component } from '@angular/core'; +import { SiteStatisticsPageComponent as BaseComponent } from '../../../../../app/statistics-page/site-statistics-page/site-statistics-page.component'; + +@Component({ + selector: 'ds-site-statistics-page', + // styleUrls: ['./site-statistics-page.component.scss'], + styleUrls: ['../../../../../app/statistics-page/site-statistics-page/site-statistics-page.component.scss'], + // templateUrl: './site-statistics-page.component.html', + templateUrl: '../../../../../app/statistics-page/statistics-page/statistics-page.component.html' +}) + +/** + * Component to render the news section on the home page + */ +export class SiteStatisticsPageComponent extends BaseComponent {} + diff --git a/src/themes/custom/theme.module.ts b/src/themes/custom/theme.module.ts index 1f451df1bc..18a048275a 100644 --- a/src/themes/custom/theme.module.ts +++ b/src/themes/custom/theme.module.ts @@ -37,12 +37,47 @@ import { AppModule } from '../../app/app.module'; import { PublicationComponent } from './app/+item-page/simple/item-types/publication/publication.component'; import { ItemPageModule } from '../../app/+item-page/item-page.module'; import { RouterModule } from '@angular/router'; +import { BrowseBySwitcherComponent } from './app/+browse-by/+browse-by-switcher/browse-by-switcher.component'; +import { CommunityListPageComponent } from './app/community-list-page/community-list-page.component'; +import { CommunityListPageModule } from '../../app/community-list-page/community-list-page.module'; +import { SearchPageComponent } from './app/+search-page/search-page.component'; +import { InfoModule } from '../../app/info/info.module'; +import { EndUserAgreementComponent } from './app/info/end-user-agreement/end-user-agreement.component'; +import { PageNotFoundComponent } from './app/pagenotfound/pagenotfound.component'; +import { ObjectNotFoundComponent } from './app/+lookup-by-id/objectnotfound/objectnotfound.component'; +import { ForbiddenComponent } from './app/forbidden/forbidden.component'; +import { PrivacyComponent } from './app/info/privacy/privacy.component'; +import { CollectionStatisticsPageComponent } from './app/statistics-page/collection-statistics-page/collection-statistics-page.component'; +import { CommunityStatisticsPageComponent } from './app/statistics-page/community-statistics-page/community-statistics-page.component'; +import { StatisticsPageModule } from '../../app/statistics-page/statistics-page.module'; +import { ItemStatisticsPageComponent } from './app/statistics-page/item-statistics-page/item-statistics-page.component'; +import { SiteStatisticsPageComponent } from './app/statistics-page/site-statistics-page/site-statistics-page.component'; +import { CommunityPageComponent } from './app/+community-page/community-page.component'; +import { CollectionPageComponent } from './app/+collection-page/collection-page.component'; +import { CommunityPageModule } from '../../app/+community-page/community-page.module'; +import { CollectionPageModule } from '../../app/+collection-page/collection-page.module'; +import { ConfigurationSearchPageComponent } from './app/+search-page/configuration-search-page.component'; const DECLARATIONS = [ HomePageComponent, HomeNewsComponent, RootComponent, - PublicationComponent + PublicationComponent, + BrowseBySwitcherComponent, + CommunityListPageComponent, + SearchPageComponent, + ConfigurationSearchPageComponent, + EndUserAgreementComponent, + PageNotFoundComponent, + ObjectNotFoundComponent, + ForbiddenComponent, + PrivacyComponent, + CollectionStatisticsPageComponent, + CommunityStatisticsPageComponent, + ItemStatisticsPageComponent, + SiteStatisticsPageComponent, + CommunityPageComponent, + CollectionPageComponent ]; @NgModule({ @@ -55,8 +90,11 @@ const DECLARATIONS = [ BitstreamFormatsModule, BrowseByModule, CollectionFormModule, + CollectionPageModule, CommonModule, CommunityFormModule, + CommunityListPageModule, + CommunityPageModule, CoreModule, DragDropModule, ItemPageModule, @@ -65,6 +103,7 @@ const DECLARATIONS = [ HomePageModule, HttpClientModule, IdlePreloadModule, + InfoModule, JournalEntitiesModule, MenuModule, MyDspaceSearchModule, @@ -78,6 +117,7 @@ const DECLARATIONS = [ SearchPageModule, SharedModule, StatisticsModule, + StatisticsPageModule, StoreModule, StoreRouterConnectingModule, TranslateModule,