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),
|
loadChildren: () => import('./htmlPages/nationalBulletins/nationalBulletinsPage.module').then(m => m.NaionalBulletinPageModule),
|
||||||
canActivate: [IsCommunity]
|
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',
|
// path: 'featured',
|
||||||
// children: [
|
// children: [
|
||||||
|
|
|
@ -405,6 +405,8 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||||
new MenuItem("", "Projects and funding Opportunities", "", "/projects", false, [], ["/projects"], {}),
|
new MenuItem("", "Projects and funding Opportunities", "", "/projects", false, [], ["/projects"], {}),
|
||||||
new MenuItem("", "Fields of Science", "", "/fields-of-science", false, [], ["/fields-of-science"], {}),
|
new MenuItem("", "Fields of Science", "", "/fields-of-science", false, [], ["/fields-of-science"], {}),
|
||||||
new MenuItem("", "Sustainable Development Goals", "", "/sdgs", false, [], ["/sdgs"], {}),
|
new MenuItem("", "Sustainable Development Goals", "", "/sdgs", false, [], ["/sdgs"], {}),
|
||||||
|
new MenuItem("", "FAQs", "", "/faqs", false, [], ["/faqs"], {}),
|
||||||
|
new MenuItem("", "Roadmap", "", "/roadmap", false, [], ["/roadmap"], {}),
|
||||||
]
|
]
|
||||||
));
|
));
|
||||||
this.menuItems.push(
|
this.menuItems.push(
|
||||||
|
|
|
@ -1,30 +1,36 @@
|
||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
import {Router} from "@angular/router";
|
import {ActivatedRoute, Router} from "@angular/router";
|
||||||
import {Subscription} from "rxjs";
|
import {Subscription} from "rxjs";
|
||||||
import {ConfigurationService} from "../../openaireLibrary/utils/configuration/configuration.service";
|
import {ConfigurationService} from "../../openaireLibrary/utils/configuration/configuration.service";
|
||||||
import {Portal} from "../../openaireLibrary/utils/entities/adminTool/portal";
|
import {Portal} from "../../openaireLibrary/utils/entities/adminTool/portal";
|
||||||
import {Page} from "../../openaireLibrary/utils/entities/adminTool/page";
|
import {Page} from "../../openaireLibrary/utils/entities/adminTool/page";
|
||||||
|
import {Breadcrumb} from "../../openaireLibrary/utils/breadcrumbs/breadcrumbs.component";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'featured',
|
selector: 'featured',
|
||||||
template: `
|
template: `
|
||||||
<div class="uk-container uk-container-large uk-section uk-section-small uk-padding-remove-bottom">
|
<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">-->
|
<div *ngIf="breadcrumbs" class="uk-padding-small uk-padding-remove-horizontal">
|
||||||
<!-- <breadcrumbs [breadcrumbs]="breadcrumbs"></breadcrumbs>-->
|
<breadcrumbs [breadcrumbs]="breadcrumbs"></breadcrumbs>
|
||||||
<!-- </div>-->
|
</div>
|
||||||
<html-page [description]="page ? page.name : 'Featured'" [pageTitle]="page ? page.name : 'Featured'"></html-page>
|
<html-page [description]="page ? page.name : 'Featured'" [pageTitle]="page ? page.name : 'Featured'"></html-page>
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
export class FeaturedPageComponent {
|
export class FeaturedPageComponent {
|
||||||
// public breadcrumbs: Breadcrumb[] = [{name: 'home', route: '/'}, {name: 'about - National Bulletins'}];
|
public breadcrumbs: Breadcrumb[];
|
||||||
public page: Page;
|
public page: Page;
|
||||||
subs: Subscription[] = [];
|
subs: Subscription[] = [];
|
||||||
|
|
||||||
constructor(private config: ConfigurationService, private _router: Router) {
|
constructor(private config: ConfigurationService, private _router: Router, private route: ActivatedRoute) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
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) => {
|
this.subs.push(this.config.communityInformationState.subscribe((portal: Portal) => {
|
||||||
if (portal) {
|
if (portal) {
|
||||||
let pages: Page[] = <Page[]>portal.pages;
|
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