From 2c543ad570e7e20d287060e41d9f1e8ac721fea7 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Sun, 19 Nov 2023 18:29:27 +0100 Subject: [PATCH] 108588: Updated CommunityPageRoutingModule to use custom sections --- .../browse-by-metadata-page.component.html | 83 ++++------------ .../community-page-routing.module.ts | 17 +++- .../community-page.component.html | 7 +- .../community-page.component.ts | 8 -- .../community-page/community-page.module.ts | 5 +- .../community-browse-section.component.html | 0 .../comcol-page-browse-by.component.html | 14 ++- .../comcol-page-browse-by.component.ts | 99 ++++++++++++------- 8 files changed, 113 insertions(+), 120 deletions(-) create mode 100644 src/app/community-page/sections/community-browse-section/community-browse-section.component.html diff --git a/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.html b/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.html index 8d062d739f..bac74736cf 100644 --- a/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.html +++ b/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.html @@ -1,67 +1,24 @@
- - -
- -
- - - - - - - - - - - - - - - -
- -
- - -
- -
+
-
- - -
-
- - - - + + +
-
-
-
+
diff --git a/src/app/community-page/community-page-routing.module.ts b/src/app/community-page/community-page-routing.module.ts index a2d727218e..f84fa1c9f7 100644 --- a/src/app/community-page/community-page-routing.module.ts +++ b/src/app/community-page/community-page-routing.module.ts @@ -16,6 +16,9 @@ import { ThemedCommunityPageComponent } from './themed-community-page.component' import { MenuItemType } from '../shared/menu/menu-item-type.model'; import { DSOEditMenuResolver } from '../shared/dso-page/dso-edit-menu.resolver'; import { SubComColSectionComponent } from './sections/sub-com-col-section/sub-com-col-section.component'; +import { BrowseByI18nBreadcrumbResolver } from '../browse-by/browse-by-i18n-breadcrumb.resolver'; +import { BrowseByGuard } from '../browse-by/browse-by-guard'; +import { BrowseBySwitcherComponent } from '../browse-by/browse-by-switcher/browse-by-switcher.component'; @NgModule({ imports: [ @@ -47,14 +50,24 @@ import { SubComColSectionComponent } from './sections/sub-com-col-section/sub-co canActivate: [AuthenticatedGuard], }, { - path: '**', + path: '', component: ThemedCommunityPageComponent, - pathMatch: 'full', children: [ { path: '', + pathMatch: 'full', component: SubComColSectionComponent, }, + { + path: 'browse/:id', + pathMatch: 'full', + component: BrowseBySwitcherComponent, + canActivate: [BrowseByGuard], + resolve: { + breadcrumb: BrowseByI18nBreadcrumbResolver, + }, + data: { breadcrumbKey: 'browse.metadata' }, + }, ], } ], diff --git a/src/app/community-page/community-page.component.html b/src/app/community-page/community-page.component.html index 6d5262d933..fdefccdd51 100644 --- a/src/app/community-page/community-page.component.html +++ b/src/app/community-page/community-page.component.html @@ -17,7 +17,7 @@ + [title]="'community.page.news'"> @@ -31,10 +31,9 @@ - - + -