Featured Page: Add breadcrumbs if data.breadcrumbs exists. Add new pages /faqs and /roadmap for Community Gateway
This commit is contained in:
parent
e3f88bdfd9
commit
4d87865c43
|
@ -51,6 +51,14 @@ const routes: Routes = [
|
|||
loadChildren: () => import('./htmlPages/nationalBulletins/nationalBulletinsPage.module').then(m => m.NaionalBulletinPageModule),
|
||||
canActivate: [IsCommunity]
|
||||
},
|
||||
{
|
||||
path: 'faqs',
|
||||
loadChildren: () => import('./htmlPages/featured/featuredPage.module').then(m => m.FeaturedPageModule),
|
||||
},
|
||||
{
|
||||
path: 'roadmap',
|
||||
loadChildren: () => import('./htmlPages/featured/featuredPage.module').then(m => m.FeaturedPageModule),
|
||||
},
|
||||
// {
|
||||
// path: 'featured',
|
||||
// children: [
|
||||
|
|
|
@ -405,6 +405,8 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
new MenuItem("", "Projects and funding Opportunities", "", "/projects", false, [], ["/projects"], {}),
|
||||
new MenuItem("", "Fields of Science", "", "/fields-of-science", false, [], ["/fields-of-science"], {}),
|
||||
new MenuItem("", "Sustainable Development Goals", "", "/sdgs", false, [], ["/sdgs"], {}),
|
||||
new MenuItem("", "FAQs", "", "/faqs", false, [], ["/faqs"], {}),
|
||||
new MenuItem("", "Roadmap", "", "/roadmap", false, [], ["/roadmap"], {}),
|
||||
]
|
||||
));
|
||||
this.menuItems.push(
|
||||
|
|
|
@ -1,30 +1,36 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {Router} from "@angular/router";
|
||||
import {ActivatedRoute, Router} from "@angular/router";
|
||||
import {Subscription} from "rxjs";
|
||||
import {ConfigurationService} from "../../openaireLibrary/utils/configuration/configuration.service";
|
||||
import {Portal} from "../../openaireLibrary/utils/entities/adminTool/portal";
|
||||
import {Page} from "../../openaireLibrary/utils/entities/adminTool/page";
|
||||
import {Breadcrumb} from "../../openaireLibrary/utils/breadcrumbs/breadcrumbs.component";
|
||||
|
||||
@Component({
|
||||
selector: 'featured',
|
||||
template: `
|
||||
<div class="uk-container uk-container-large uk-section uk-section-small uk-padding-remove-bottom">
|
||||
<!-- <div class="uk-padding-small uk-padding-remove-horizontal">-->
|
||||
<!-- <breadcrumbs [breadcrumbs]="breadcrumbs"></breadcrumbs>-->
|
||||
<!-- </div>-->
|
||||
<div *ngIf="breadcrumbs" class="uk-padding-small uk-padding-remove-horizontal">
|
||||
<breadcrumbs [breadcrumbs]="breadcrumbs"></breadcrumbs>
|
||||
</div>
|
||||
<html-page [description]="page ? page.name : 'Featured'" [pageTitle]="page ? page.name : 'Featured'"></html-page>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
export class FeaturedPageComponent {
|
||||
// public breadcrumbs: Breadcrumb[] = [{name: 'home', route: '/'}, {name: 'about - National Bulletins'}];
|
||||
public breadcrumbs: Breadcrumb[];
|
||||
public page: Page;
|
||||
subs: Subscription[] = [];
|
||||
|
||||
constructor(private config: ConfigurationService, private _router: Router) {
|
||||
constructor(private config: ConfigurationService, private _router: Router, private route: ActivatedRoute) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.subs.push(this.route.data.subscribe(data => {
|
||||
if(data?.breadcrumbs) {
|
||||
this.breadcrumbs = data.breadcrumbs;
|
||||
}
|
||||
}))
|
||||
this.subs.push(this.config.communityInformationState.subscribe((portal: Portal) => {
|
||||
if (portal) {
|
||||
let pages: Page[] = <Page[]>portal.pages;
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit db55273b685a7f0fc6ca7e79cd20d7cf68d6747a
|
||||
Subproject commit 2ef5d069dd55b3ae366fbf8723975c98e6a8c140
|
|
@ -1 +1 @@
|
|||
Subproject commit f15bbfa7265f170e06b256f086f2acedfa3f72e0
|
||||
Subproject commit 39cb4e56d0320975fbd08fb5e9c68b87b0c82a10
|
|
@ -1 +1 @@
|
|||
Subproject commit 468b2b008f474c88dacc52991a5231693833f1f9
|
||||
Subproject commit 1e06310b8b2b56f131754eaded615b6cf32c5848
|
Loading…
Reference in New Issue