Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
commit
4571812fe6
|
@ -53,7 +53,7 @@ export class AffiliationsComponent {
|
|||
this.properties = properties;
|
||||
if(this.longView) {
|
||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, PiwikHelper.getSiteId(this.communityId)).subscribe());
|
||||
// this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, PiwikHelper.getSiteId(this.communityId)).subscribe());
|
||||
}
|
||||
this.url = this.properties.domain + this._router.url;
|
||||
this.seoService.createLinkForCanonicalURL(this.url);
|
||||
|
|
|
@ -10,14 +10,27 @@ const routes: Routes = [
|
|||
{path: 'my-orcid-links', loadChildren: () => import('./orcid/my-orcid-links/myOrcidLinks.module').then(m => m.LibMyOrcidLinksModule)},
|
||||
|
||||
/** Other Pages */
|
||||
{path: '', loadChildren: () => import('./communitywrapper/communityWrapper.module').then(m => m.CommunityWrapperModule)},
|
||||
{
|
||||
path: '',
|
||||
loadChildren: () => import('./communitywrapper/communityWrapper.module').then(m => m.CommunityWrapperModule)
|
||||
},
|
||||
{path: 'about', redirectTo: 'about/learn-how', pathMatch: 'full'},
|
||||
{path: 'about/learn-how', loadChildren: () => import('./learn-how/learn-how.module').then(m => m.LearnHowModule)},
|
||||
{path: 'about/faq', loadChildren: () => import('./learn-how/faqs/faqs.module').then(m => m.FaqsModule)},
|
||||
{path: 'get-started', loadChildren: () => import('./get-started/get-started.module').then(m => m.GetStartedModule)},
|
||||
{path: 'contact-us', loadChildren: () => import('./contact/contact.module').then(m => m.ContactModule)},
|
||||
{path: 'invite', loadChildren: () => import('./utils/subscribe/invite/invite.module').then(m => m.InviteModule)},
|
||||
{path: 'content', loadChildren: () => import('./content/contentPage.module').then(m => m.ContentPageModule), canActivate: [IsCommunity]},
|
||||
{
|
||||
path: 'content',
|
||||
loadChildren: () => import('./content/contentPage.module').then(m => m.ContentPageModule),
|
||||
canActivate: [IsCommunity]
|
||||
},
|
||||
{path: 'sdgs', loadChildren: () => import('./sdg/sdg.module').then(m => m.LibSdgModule)},
|
||||
{
|
||||
path: 'fields-of-science',
|
||||
loadChildren: () => import('./fos/fos.module').then(m => m.LibFosModule),
|
||||
data: {extraOffset: 100}
|
||||
},
|
||||
{
|
||||
path: 'organizations',
|
||||
loadChildren: () => import('./htmlPages/organizations/organizationsPage.module').then(m => m.OrganizationsPageModule),
|
||||
|
|
|
@ -403,6 +403,8 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
new MenuItem("", "National Bulletins", "", "/national-bulletins", false, [], ["/national-bulletins"], {}),
|
||||
new MenuItem("", "Subjects", "", "/subjects", false, [], ["/subjects"], {}),
|
||||
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"], {}),
|
||||
]
|
||||
));
|
||||
this.menuItems.push(
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
import {NgModule} from "@angular/core";
|
||||
import {RouterModule} from "@angular/router";
|
||||
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
|
||||
import {CommunityFosComponent} from "./fos.component";
|
||||
import {IsRouteEnabled} from "../openaireLibrary/error/isRouteEnabled.guard";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{
|
||||
path: '',
|
||||
component: CommunityFosComponent,
|
||||
canActivate: [IsRouteEnabled],
|
||||
canDeactivate: [PreviousRouteRecorder]
|
||||
}
|
||||
])
|
||||
]
|
||||
})
|
||||
export class LibFosRoutingModule {
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
import {Component} from "@angular/core";
|
||||
import {properties} from "../../environments/environment";
|
||||
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
|
||||
import {PiwikHelper} from "../utils/piwikHelper";
|
||||
|
||||
@Component({
|
||||
selector: 'community-fos',
|
||||
template: `
|
||||
<fos [piwikSiteId]="piwikSiteId"></fos>
|
||||
`
|
||||
})
|
||||
|
||||
export class CommunityFosComponent {
|
||||
piwikSiteId;
|
||||
communityId;
|
||||
|
||||
constructor() {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
import {CommonModule} from "@angular/common";
|
||||
import {NgModule} from "@angular/core";
|
||||
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
|
||||
import {LibFosRoutingModule} from "./fos-routing.module";
|
||||
import {FosRoutingModule} from "../openaireLibrary/fos/fos-routing.module";
|
||||
import {FosModule} from "../openaireLibrary/fos/fos.module";
|
||||
import {CommunityFosComponent} from "./fos.component";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
LibFosRoutingModule,
|
||||
FosRoutingModule,
|
||||
FosModule
|
||||
],
|
||||
declarations: [
|
||||
CommunityFosComponent
|
||||
],
|
||||
exports: [
|
||||
CommunityFosComponent
|
||||
],
|
||||
providers: [
|
||||
PreviousRouteRecorder
|
||||
]
|
||||
})
|
||||
export class LibFosModule {
|
||||
}
|
|
@ -8,6 +8,7 @@ import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
|
|||
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
|
||||
import {Subscriber} from "rxjs";
|
||||
import {properties} from "../../environments/environment";
|
||||
import {PiwikHelper} from "../utils/piwikHelper";
|
||||
|
||||
@Component({
|
||||
selector: 'html-page',
|
||||
|
@ -21,26 +22,28 @@ export class HtmlPageComponent {
|
|||
properties: EnvProperties = properties;
|
||||
public pageContents = null;
|
||||
public divContents = null;
|
||||
|
||||
|
||||
@Input() url: string = null;
|
||||
@Input() pageTitle: string;
|
||||
@Input() description: string;
|
||||
private subscriptions = [];
|
||||
communityId;
|
||||
|
||||
constructor(private route: ActivatedRoute, private _router: Router,
|
||||
piwikSiteId;
|
||||
|
||||
constructor(private route: ActivatedRoute, private _router: Router,
|
||||
private _meta: Meta,
|
||||
private _title: Title,
|
||||
private seoService: SEOService,
|
||||
private _piwikService: PiwikService,
|
||||
private helper: HelperService) {
|
||||
}
|
||||
|
||||
|
||||
public ngOnInit() {
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
|
||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe());
|
||||
}
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain);
|
||||
//TODO set the proper URL
|
||||
this.url = this.properties.domain + this._router.url;
|
||||
this.seoService.createLinkForCanonicalURL(this.url);
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 39a7ed58be27513c05598edc18cf095eb5b044c5
|
||||
Subproject commit d4103354aa0254475df4aa29382999bc2f25bf29
|
|
@ -0,0 +1,20 @@
|
|||
import {NgModule} from "@angular/core";
|
||||
import {RouterModule} from "@angular/router";
|
||||
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
|
||||
import {CommunitySdgComponent} from "./sdg.component";
|
||||
import {IsRouteEnabled} from "../openaireLibrary/error/isRouteEnabled.guard";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{
|
||||
path: '',
|
||||
component: CommunitySdgComponent,
|
||||
canActivate: [IsRouteEnabled],
|
||||
canDeactivate: [PreviousRouteRecorder]
|
||||
}
|
||||
])
|
||||
]
|
||||
})
|
||||
export class LibSdgRoutingModule {
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
import {Component} from "@angular/core";
|
||||
import {properties} from "../../environments/environment";
|
||||
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
|
||||
import {PiwikHelper} from "../utils/piwikHelper";
|
||||
|
||||
@Component({
|
||||
selector: 'community-sdg',
|
||||
template: `
|
||||
<sdg [piwikSiteId]="piwikSiteId"></sdg>
|
||||
`
|
||||
})
|
||||
export class CommunitySdgComponent {
|
||||
piwikSiteId;
|
||||
communityId;
|
||||
|
||||
constructor() {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
import {CommonModule} from "@angular/common";
|
||||
import {NgModule} from "@angular/core";
|
||||
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
|
||||
import {LibSdgRoutingModule} from "./sdg-routing.module";
|
||||
import {SdgRoutingModule} from "../openaireLibrary/sdg/sdg-routing.module";
|
||||
import {SdgModule} from "../openaireLibrary/sdg/sdg.module";
|
||||
import {CommunitySdgComponent} from "./sdg.component";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
LibSdgRoutingModule,
|
||||
SdgRoutingModule,
|
||||
SdgModule
|
||||
],
|
||||
declarations: [
|
||||
CommunitySdgComponent
|
||||
],
|
||||
exports: [
|
||||
CommunitySdgComponent
|
||||
],
|
||||
providers: [
|
||||
PreviousRouteRecorder
|
||||
]
|
||||
})
|
||||
export class LibSdgModule {
|
||||
}
|
|
@ -27,20 +27,22 @@ export class PiwikHelper{
|
|||
"inspired-ris":530,
|
||||
"citizen-science":538,
|
||||
"eut":558,
|
||||
"aurora":560,
|
||||
"aurora": 560,
|
||||
"ebrains": 592,
|
||||
"neanias-space":604,
|
||||
"heritage-science":607,
|
||||
"eutopia":608,
|
||||
"neanias-space": 604,
|
||||
"heritage-science": 607,
|
||||
"eutopia": 608,
|
||||
"north-america-studies": 609,
|
||||
"iperionhs":610,
|
||||
"iperionhs": 610,
|
||||
"neanias-atmospheric": 613,
|
||||
"forthem": 625,
|
||||
"argo-france": 634,
|
||||
"knowmad": 640
|
||||
"knowmad": 640,
|
||||
"egrise": 710,
|
||||
"euconexus": 707,
|
||||
"dth": 719
|
||||
};
|
||||
public static getSiteId(communityId:string){
|
||||
return this.siteIDs[communityId];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit f15bbfa7265f170e06b256f086f2acedfa3f72e0
|
||||
Subproject commit d8e7e5439fbd606301b51fdd5ed5115d9ad75c22
|
|
@ -1 +1 @@
|
|||
Subproject commit 468b2b008f474c88dacc52991a5231693833f1f9
|
||||
Subproject commit a5b03a914c98c4478d758f58a8ceacc8f3c0611a
|
Loading…
Reference in New Issue