Compare commits

..

2 Commits

5 changed files with 3 additions and 75 deletions

View File

@ -47,11 +47,7 @@ const routes: Routes = [
loadChildren: () => import('./sdg/sdg.module').then(m => m.LibSdgModule), loadChildren: () => import('./sdg/sdg.module').then(m => m.LibSdgModule),
data: {hasQuickContact: false} data: {hasQuickContact: false}
}, },
{ {path: 'fields-of-science', loadChildren: () => import('./openaireLibrary/fos/fos.module').then(m => m.FosModule), data: {extraOffset: 100, hasQuickContact: false}},
path: 'fields-of-science',
loadChildren: () => import('./fos/fos.module').then(m => m.LibFosModule),
data: {extraOffset: 100, hasQuickContact: false}
},
{ {
path: 'organizations', path: 'organizations',
loadChildren: () => import('./htmlPages/organizations/organizationsPage.module').then(m => m.OrganizationsPageModule), loadChildren: () => import('./htmlPages/organizations/organizationsPage.module').then(m => m.OrganizationsPageModule),

View File

@ -100,11 +100,11 @@ export class CommunityComponent {
getPagePlugins() { getPagePlugins() {
this.showLoading = true; this.showLoading = true;
this.subscriptions.push(this._pluginsService.getPluginTemplatesByPageRoute(this.properties.adminToolsAPIURL, this.community.communityId, this._router.url ).subscribe( this.subscriptions.push(this._pluginsService.getPluginTemplatesByPageRoute(this.properties.adminToolsAPIURL, this.community.communityId, this._router.url.split('?')[0] ).subscribe(
templates => { templates => {
this.pluginTemplates = templates; this.pluginTemplates = templates;
this.subscriptions.push(this._pluginsService.getPluginsByPageRoute(this.properties.adminToolsAPIURL, this.community.communityId, this._router.url).subscribe( this.subscriptions.push(this._pluginsService.getPluginsByPageRoute(this.properties.adminToolsAPIURL, this.community.communityId, this._router.url.split('?')[0]).subscribe(
plugins => { plugins => {
this.plugins = plugins; this.plugins = plugins;
this.pluginsByPlacement = new Map(); this.pluginsByPlacement = new Map();

View File

@ -1,20 +0,0 @@
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 {
}

View File

@ -1,21 +0,0 @@
import {Component} from "@angular/core";
import {properties} from "../../environments/environment";
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
@Component({
selector: 'community-fos',
template: `
<fos></fos>
`
})
export class CommunityFosComponent {
communityId;
constructor() {
}
ngOnInit() {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
}
}

View File

@ -1,27 +0,0 @@
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 {
}