From 94bace40e77b021bf6f5f5ce99f8f8f582b7813b Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Mon, 23 Nov 2020 12:28:46 +0000 Subject: [PATCH] [Aggregator | Trunk]: 1. Add Deposit-Linking. 2. Get id from domain. 3. Add custom filter for searches on menu git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-aggregator-portal/trunk@59936 d315682c-612b-4755-9ff5-7f18f6832af3 --- .../aggregator/aggregator-routing.module.ts | 81 ------- src/app/aggregator/aggregator.module.ts | 22 -- src/app/app-routing.module.ts | 109 +++++++++- src/app/app.component.ts | 204 ++++++++---------- src/app/app.module.ts | 25 ++- .../claimsAdmin/claimsAdmin-routing.module.ts | 15 ++ .../claimsAdmin/claimsAdmin.component.ts | 35 +++ .../claims/claimsAdmin/claimsAdmin.module.ts | 23 ++ .../claimsByToken-routing.module.ts | 15 ++ .../claimsByToken/claimsByToken.component.ts | 11 + .../claimsByToken/claimsByToken.module.ts | 30 +++ .../directLinking-routing.module.ts | 19 ++ .../directLinking/directLinking.component.ts | 8 + .../directLinking/directLinking.module.ts | 20 ++ .../claims/linking/linking-routing.module.ts | 18 ++ .../linking/linkingGeneric.component.ts | 10 + .../claims/linking/linkingGeneric.module.ts | 21 ++ .../myClaims/myClaims-routing.module.ts | 16 ++ src/app/claims/myClaims/myClaims.component.ts | 34 +++ src/app/claims/myClaims/myClaims.module.ts | 24 +++ src/app/claims/myClaimsDemo.component.ts | 51 +++++ src/app/deposit/deposit-routing.module.ts | 16 ++ src/app/deposit/deposit.component.ts | 17 ++ src/app/deposit/deposit.module.ts | 31 +++ ...chDataprovidersToDeposit-routing.module.ts | 19 ++ .../searchDataprovidersToDeposit.component.ts | 16 ++ .../searchDataprovidersToDeposit.module.ts | 31 +++ src/app/home/home.component.html | 169 ++++++++------- src/app/home/home.module.ts | 4 +- .../landingPages/dataset/dataset.component.ts | 2 +- src/app/landingPages/orp/orp.component.ts | 2 +- .../publication/publication.component.ts | 7 +- .../software/software.component.ts | 2 +- .../advancedSearchDataProviders.component.ts | 4 +- .../advancedSearchOrganizations.component.ts | 4 +- .../advancedSearchProjects.component.ts | 4 +- .../searchResearchResults.component.ts | 4 +- src/app/searchPages/find/search.component.ts | 5 +- .../simple/searchDataproviders.component.ts | 4 +- .../simple/searchOrganizations.component.ts | 4 +- .../simple/searchProjects.component.ts | 4 +- .../simple/searchResearchResults.component.ts | 4 +- src/environments/environment.beta.ts | 2 - src/environments/environment.prod.ts | 1 - src/environments/environment.ts | 2 - 45 files changed, 806 insertions(+), 343 deletions(-) delete mode 100644 src/app/aggregator/aggregator-routing.module.ts delete mode 100755 src/app/aggregator/aggregator.module.ts create mode 100644 src/app/claims/claimsAdmin/claimsAdmin-routing.module.ts create mode 100644 src/app/claims/claimsAdmin/claimsAdmin.component.ts create mode 100644 src/app/claims/claimsAdmin/claimsAdmin.module.ts create mode 100644 src/app/claims/claimsByToken/claimsByToken-routing.module.ts create mode 100644 src/app/claims/claimsByToken/claimsByToken.component.ts create mode 100644 src/app/claims/claimsByToken/claimsByToken.module.ts create mode 100644 src/app/claims/directLinking/directLinking-routing.module.ts create mode 100644 src/app/claims/directLinking/directLinking.component.ts create mode 100644 src/app/claims/directLinking/directLinking.module.ts create mode 100644 src/app/claims/linking/linking-routing.module.ts create mode 100644 src/app/claims/linking/linkingGeneric.component.ts create mode 100644 src/app/claims/linking/linkingGeneric.module.ts create mode 100644 src/app/claims/myClaims/myClaims-routing.module.ts create mode 100644 src/app/claims/myClaims/myClaims.component.ts create mode 100644 src/app/claims/myClaims/myClaims.module.ts create mode 100644 src/app/claims/myClaimsDemo.component.ts create mode 100644 src/app/deposit/deposit-routing.module.ts create mode 100644 src/app/deposit/deposit.component.ts create mode 100644 src/app/deposit/deposit.module.ts create mode 100644 src/app/deposit/searchDataprovidersToDeposit-routing.module.ts create mode 100644 src/app/deposit/searchDataprovidersToDeposit.component.ts create mode 100644 src/app/deposit/searchDataprovidersToDeposit.module.ts diff --git a/src/app/aggregator/aggregator-routing.module.ts b/src/app/aggregator/aggregator-routing.module.ts deleted file mode 100644 index 24e4551..0000000 --- a/src/app/aggregator/aggregator-routing.module.ts +++ /dev/null @@ -1,81 +0,0 @@ -import {NgModule} from '@angular/core'; -import {RouterModule, Routes} from '@angular/router'; - -const routes: Routes = [ - {path: '', loadChildren: '../home/home.module#HomeModule'}, - { path: 'search/result', - loadChildren: '../landingPages/result/libResult.module#LibResultModule' - }, - { - path: 'search/publication', - loadChildren: '../landingPages/publication/libPublication.module#LibPublicationModule' - }, - { - path: 'search/dataset', - loadChildren: '../landingPages/dataset/libDataset.module#LibDatasetModule' - }, - { - path: 'search/software', - loadChildren: '../landingPages/software/libSoftware.module#LibSoftwareModule' - }, - { - path: 'search/other', - loadChildren: '../landingPages/orp/libOrp.module#LibOrpModule' - }, - { - path: 'search/project', - loadChildren: '../landingPages/project/libProject.module#LibProjectModule' - }, - { - path: 'search/dataprovider', - loadChildren: '../landingPages/dataProvider/libDataProvider.module#LibDataProviderModule' - }, - { - path: 'search/organization', - loadChildren: '../landingPages/organization/libOrganization.module#LibOrganizationModule' - }, - { - path: 'search/find', - loadChildren: '../searchPages/find/libSearch.module#LibMainSearchModule' - }, - { path: 'search/find/research-outcomes', loadChildren: '../searchPages/simple/searchResearchResults.module#OpenaireSearchResearchResultsModule' - }, - { - path: 'search/find/projects', - loadChildren: '../searchPages/simple/searchProjects.module#LibSearchProjectsModule' - }, - { - path: 'search/find/dataproviders', - loadChildren: '../searchPages/simple/searchDataProviders.module#LibSearchDataProvidersModule' - }, - { - path: 'search/find/organizations', - loadChildren: '../searchPages/simple/searchOrganizations.module#LibSearchOrganizationsModule' - }, - { path: 'search/advanced/research-outcomes', - loadChildren: '../searchPages/advanced/searchResearchResults.module#OpenaireAdvancedSearchResearchResultsModule' - }, - { - path: 'search/advanced/organizations', - loadChildren: '../searchPages/advanced/advancedSearchOrganizations.module#LibAdvancedSearchOrganizationsModule' - }, - { - path: 'search/advanced/dataproviders', - loadChildren: '../searchPages/advanced/advancedSearchDataProviders.module#LibAdvancedSearchDataProvidersModule' - }, - { - path: 'search/advanced/projects', - loadChildren: '../searchPages/advanced/advancedSearchProjects.module#LibAdvancedSearchProjectsModule' - }, - { - path: 'project-report', - loadChildren: '../landingPages/htmlProjectReport/libHtmlProjectReport.module#LibHtmlProjectReportModule' - }, -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule], -}) -export class AggregatorRoutingModule { -} diff --git a/src/app/aggregator/aggregator.module.ts b/src/app/aggregator/aggregator.module.ts deleted file mode 100755 index 6bec93b..0000000 --- a/src/app/aggregator/aggregator.module.ts +++ /dev/null @@ -1,22 +0,0 @@ -import {NgModule} from '@angular/core'; -import {CommonModule} from '@angular/common'; -import {HttpClientModule} from "@angular/common/http"; -import {AggregatorRoutingModule} from "./aggregator-routing.module"; -import {EnvironmentSpecificResolver} from "../openaireLibrary/utils/properties/environmentSpecificResolver"; -import {SharedModule} from "../shared/shared.module"; - -@NgModule({ - - imports: [ - SharedModule, - CommonModule, - HttpClientModule, - AggregatorRoutingModule - ], - providers: [ - EnvironmentSpecificResolver - ], -}) - -export class AggregatorModule { -} diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index c3d3c69..47bed8c 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,17 +1,105 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; +import {NgModule} from '@angular/core'; +import {Routes, RouterModule} from '@angular/router'; -import { EnvironmentSpecificResolver} from './openaireLibrary/utils/properties/environmentSpecificResolver'; -import { EnvironmentSpecificService} from './openaireLibrary/utils/properties/environment-specific.service'; +import {EnvironmentSpecificResolver} from './openaireLibrary/utils/properties/environmentSpecificResolver'; +import {EnvironmentSpecificService} from './openaireLibrary/utils/properties/environment-specific.service'; -import { OpenaireErrorPageComponent } from './error/errorPage.component'; +import {OpenaireErrorPageComponent} from './error/errorPage.component'; const routes: Routes = [ - { path: '', loadChildren: './aggregator/aggregator.module#AggregatorModule'}, - { path: ':id', loadChildren: './aggregator/aggregator.module#AggregatorModule'}, - { path: 'error', component: OpenaireErrorPageComponent}, - { path: '**',pathMatch: 'full',component: OpenaireErrorPageComponent} + {path: '', loadChildren: './home/home.module#HomeModule'}, + { + path: 'search/result', + loadChildren: './landingPages/result/libResult.module#LibResultModule' + }, + { + path: 'search/publication', + loadChildren: './landingPages/publication/libPublication.module#LibPublicationModule' + }, + { + path: 'search/dataset', + loadChildren: './landingPages/dataset/libDataset.module#LibDatasetModule' + }, + { + path: 'search/software', + loadChildren: './landingPages/software/libSoftware.module#LibSoftwareModule' + }, + { + path: 'search/other', + loadChildren: './landingPages/orp/libOrp.module#LibOrpModule' + }, + { + path: 'search/project', + loadChildren: './landingPages/project/libProject.module#LibProjectModule' + }, + { + path: 'search/dataprovider', + loadChildren: './landingPages/dataProvider/libDataProvider.module#LibDataProviderModule' + }, + { + path: 'search/organization', + loadChildren: './landingPages/organization/libOrganization.module#LibOrganizationModule' + }, + { + path: 'search/find', + loadChildren: './searchPages/find/libSearch.module#LibMainSearchModule' + }, + { + path: 'search/find/research-outcomes', + loadChildren: './searchPages/simple/searchResearchResults.module#OpenaireSearchResearchResultsModule' + }, + { + path: 'search/find/projects', + loadChildren: './searchPages/simple/searchProjects.module#LibSearchProjectsModule' + }, + { + path: 'search/find/dataproviders', + loadChildren: './searchPages/simple/searchDataProviders.module#LibSearchDataProvidersModule' + }, + { + path: 'search/find/organizations', + loadChildren: './searchPages/simple/searchOrganizations.module#LibSearchOrganizationsModule' + }, + { + path: 'search/advanced/research-outcomes', + loadChildren: './searchPages/advanced/searchResearchResults.module#OpenaireAdvancedSearchResearchResultsModule' + }, + { + path: 'search/advanced/organizations', + loadChildren: './searchPages/advanced/advancedSearchOrganizations.module#LibAdvancedSearchOrganizationsModule' + }, + { + path: 'search/advanced/dataproviders', + loadChildren: './searchPages/advanced/advancedSearchDataProviders.module#LibAdvancedSearchDataProvidersModule' + }, + { + path: 'search/advanced/projects', + loadChildren: './searchPages/advanced/advancedSearchProjects.module#LibAdvancedSearchProjectsModule' + }, + { + path: 'project-report', + loadChildren: './landingPages/htmlProjectReport/libHtmlProjectReport.module#LibHtmlProjectReportModule' + }, + // Deposit Pages + { path: 'participate/deposit-datasets', redirectTo: 'participate/deposit/learn-how', pathMatch: 'full'}, + { path: 'participate/deposit-datasets-result', redirectTo: 'participate/deposit/learn-how', pathMatch: 'full'}, + { path: 'participate/deposit-subject-result', redirectTo: 'participate/deposit/learn-how', pathMatch: 'full'}, + { path: 'participate/deposit-publications', redirectTo: 'participate/deposit/learn-how', pathMatch: 'full'}, + { path: 'participate/deposit-publications-result', redirectTo: 'participate/deposit/learn-how', pathMatch: 'full'}, + + { path: 'participate/deposit/learn-how', loadChildren: './deposit/deposit.module#LibDepositModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, + { path: 'participate/deposit/search', loadChildren: './deposit/searchDataprovidersToDeposit.module#LibSearchDataprovidersToDepositModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, + + // Linking Pages + { path: 'myclaims', loadChildren: './claims/myClaims/myClaims.module#LibMyClaimsModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, + { path: 'claims', loadChildren: './claims/claimsAdmin/claimsAdmin.module#LibClaimsAdminModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, + { path: 'participate/claim', loadChildren: './claims/linking/linkingGeneric.module#LibLinkingGenericModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, + { path: 'participate/direct-claim', loadChildren: './claims/directLinking/directLinking.module#LibDirectLinkingModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, + { path: 'claims-project-manager', loadChildren: './claims/claimsByToken/claimsByToken.module#LibClaimsByTokenModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, + {path: 'user-info', loadChildren: './login/libUser.module#LibUserModule'}, + {path: 'error', component: OpenaireErrorPageComponent}, + {path: '**', pathMatch: 'full', component: OpenaireErrorPageComponent} ]; @NgModule({ @@ -19,4 +107,5 @@ const routes: Routes = [ exports: [RouterModule], providers: [EnvironmentSpecificResolver, EnvironmentSpecificService] }) -export class AppRoutingModule { } +export class AppRoutingModule { +} diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 6b58744..d71d9bb 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -10,152 +10,122 @@ import {UserManagementService} from "./openaireLibrary/services/user-management. import {User} from "./openaireLibrary/login/utils/helper.class"; import {Header} from "./openaireLibrary/sharedComponents/navigationBar.component"; import {portalProperties} from "../environments/environment-aggregator"; +import {properties} from "../environments/environment"; +import {ConnectHelper} from "./openaireLibrary/connect/connectHelper"; @Component({ - //changeDetection: ChangeDetectionStrategy.Default, - //encapsulation: ViewEncapsulation.Emulated, selector: 'app-root', - styles: [` - `], template: ` - - -
-
- -
-
- - OpenAIRE uses cookies in order to function properly.
- Cookies are small pieces of data that websites store in your browser to allow us to give you the best browsing - experience possible. - By using the OpenAIRE portal you accept our use of cookies. Read more +
+ +
+
+ +
+
+ + OpenAIRE uses cookies in order to function properly.
+ Cookies are small pieces of data that websites store in your browser to allow us to give you the best browsing + experience possible. + By using the OpenAIRE portal you accept our use of cookies.
Read more - - - + + +
` - + }) export class AppComponent { isClient: boolean = false; - menuItems: RootMenuItem [] = [ - {rootItem: new MenuItem("home", "Home", "", "/", false, [], null, {}), items: []}, - { - rootItem: new MenuItem("search", "Search", "", "/search/find", false, [], null, {}), - items: [new MenuItem("", "Research outcomes", "", "/search/find/research-outcomes", false, [], [], {}), - new MenuItem("", "Projects", "", "/search/find/projects/", false, [], [], {}), - new MenuItem("", "Content Providers", "", "/search/find/dataproviders", false, [], [], {}), - new MenuItem("", "Organizations", "", "/search/find/organizations/", false, [], [], {}) - ] - } - ]; + menuItems: RootMenuItem [] = []; + userMenuItems: MenuItem[] = []; community = null; id: string = null; - - - properties: EnvProperties; + properties: EnvProperties = properties; user: User; loginCheck: boolean = false; - footer=portalProperties.sectionFooter; - header:Header; - constructor(private route: ActivatedRoute, private propertiesService: EnvironmentSpecificService, - private router: Router, private userManagementService: UserManagementService) { - - router.events.forEach((event) => { - - if (event instanceof NavigationStart) { - HelperFunctions.scroll(); - } else if (event instanceof NavigationEnd) { - let r = this.route; - while (r.firstChild) { - r = r.firstChild; - } - r.params.subscribe(params => { - if(!this.id) { - this.id = params['id']; - let agg: FilterInfo = PortalAggregators.getFilterInfoByMenuId(this.id); - if (agg) { - this.header = { - route: '/', - url: null, - title: agg.title, - logoUrl: agg.logoUrl, - logoSmallUrl: agg.logoUrl, - position: 'left', - badge: true - }; - - } - if (this.id) { - this.buildMenu(); - } - } else { - if(this.router.url === '/') { - this.router.navigate([this.id]); - } - } - }); + footer = portalProperties.sectionFooter; + header: Header; + agg: FilterInfo = null; + + constructor(private propertiesService: EnvironmentSpecificService, + private userManagementService: UserManagementService) { + } + + ngOnInit() { + if (typeof document !== 'undefined') { + this.isClient = true; + } + this.id = ConnectHelper.getCommunityFromDomain(this.properties.domain); + this.agg = PortalAggregators.getFilterInfoByMenuId(this.id); + if (this.agg) { + this.header = { + route: '/', + url: null, + title: this.agg.title, + logoUrl: this.agg.logoUrl, + logoSmallUrl: this.agg.logoUrl, + position: 'left', + badge: true + }; + this.buildMenu(); + } + this.userManagementService.getUserInfo().subscribe(user => { + this.user = user; + this.loginCheck = true; + this.userMenuItems = []; + if (this.user) { + this.userMenuItems.push(new MenuItem("", "User information", "", "/user-info", false, [], [], {})); } }); } - + private buildMenu() { this.menuItems = [ - {rootItem: new MenuItem("home", "Home", "", "/" + this.id, false, [], null, {}), items: []}, + {rootItem: new MenuItem("home", "Home", "", "/", false, [], null, {}), items: []}, { - rootItem: new MenuItem("search", "Search", "", "/" + this.id + "/search/find", false, [], null, {}), + rootItem: new MenuItem("search", "Search", "", "/search/find", false, [], null, {}), items: [] + }, + { + rootItem: new MenuItem("deposit", "Deposit", "", "/participate/deposit/learn-how", false, [], null, {}), + //rootItem: new MenuItem("deposit", "Deposit", "", "/participate/deposit/learn-how", false, [], ["/participate/deposit/learn-how"], {}), + items: [] + //rootItem: new MenuItem("share", "Share", "", "", false, [], null, {}), + //items: [new MenuItem("", "Publications", "", "/participate/deposit-publications", false, ["publication"], null, {}), + // new MenuItem("", "Research Data", "", "/participate/deposit-datasets", false, ["dataset"], null, {})] + }, + { + rootItem: new MenuItem("link", "Link", "", "/participate/claim", false, [], null, {}), + items: [new MenuItem("", "Start linking", "", "/participate/claim", false, [], null, {}), + new MenuItem("", "Learn more", this.properties.claimsInformationLink, "", false, [], [], {})] } ]; - if((portalProperties.entities.publication.isEnabled && portalProperties.entities.publication.simpleSearchPage) || + let params = {}; + params[this.agg.queryFieldName] = this.agg.valueId; + if ((portalProperties.entities.publication.isEnabled && portalProperties.entities.publication.simpleSearchPage) || (portalProperties.entities.dataset.isEnabled && portalProperties.entities.dataset.simpleSearchPage) || (portalProperties.entities.software.isEnabled && portalProperties.entities.software.simpleSearchPage) || - portalProperties.entities.other.isEnabled && portalProperties.entities.other.simpleSearchPage){ - - this.menuItems[1].items.push(new MenuItem("", "Research outcomes", "", "/" + this.id + "/search/find/research-outcomes", false, [], [], {})) + portalProperties.entities.other.isEnabled && portalProperties.entities.other.simpleSearchPage) { + + this.menuItems[1].items.push(new MenuItem("", "Research outcomes", "", "/search/find/research-outcomes", false, [], [], params)) } - - if(portalProperties.entities.project.isEnabled && portalProperties.entities.project.simpleSearchPage){ - this.menuItems[1].items.push(new MenuItem("", "Projects", "", "/" + this.id + "/search/find/projects/", false, [], [], {})) + + if (portalProperties.entities.project.isEnabled && portalProperties.entities.project.simpleSearchPage) { + this.menuItems[1].items.push(new MenuItem("", "Projects", "", "/search/find/projects/", false, [], [], + {cf: true})) } - if(portalProperties.entities.datasource.isEnabled && portalProperties.entities.datasource.simpleSearchPage){ - this.menuItems[1].items.push(new MenuItem("", "Content Providers", "", "/" + this.id + "/search/find/dataproviders", false, [], [], {})) + if (portalProperties.entities.datasource.isEnabled && portalProperties.entities.datasource.simpleSearchPage) { + this.menuItems[1].items.push(new MenuItem("", "Content Providers", "", "/search/find/dataproviders", false, [], [], params)) } - if(portalProperties.entities.organization.isEnabled && portalProperties.entities.organization.simpleSearchPage){ - this.menuItems[1].items.push(new MenuItem("", "Organizations", "", "/" + this.id + "/search/find/organizations/", false, [], [], {})) + if (portalProperties.entities.organization.isEnabled && portalProperties.entities.organization.simpleSearchPage) { + this.menuItems[1].items.push(new MenuItem("", "Organizations", "", "/search/find/organizations/", false, [], [], params)) } - - - - } - - ngOnInit() { - if (typeof document !== 'undefined') { - try { - this.isClient = true; - - } catch (e) { - } - - } - this.propertiesService.loadEnvironment() - .then(es => { - this.propertiesService.setEnvProperties(es); - this.properties = this.propertiesService.envSpecific; - this.userManagementService.getUserInfo().subscribe(user => { - this.user = user; - this.loginCheck = true; - }); - }, error => { - console.log("App couldn't fetch properties"); - console.log(error); - - }); } } diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 37cd50b..40de973 100755 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,9 +1,9 @@ import {NgModule} from '@angular/core'; import {SharedModule} from './shared/shared.module'; -import {BrowserModule} from '@angular/platform-browser'; -import {NoopAnimationsModule} from '@angular/platform-browser/animations'; +import {BrowserModule, BrowserTransferStateModule} from '@angular/platform-browser'; +import {BrowserAnimationsModule, NoopAnimationsModule} from '@angular/platform-browser/animations'; import {CommonModule} from '@angular/common'; -import {HttpClientModule} from '@angular/common/http'; +import {HTTP_INTERCEPTORS, HttpClientModule} from '@angular/common/http'; import {AppComponent} from './app.component'; @@ -17,6 +17,9 @@ import {ErrorModule} from './openaireLibrary/error/error.module'; import {OpenaireErrorPageComponent} from './error/errorPage.component'; import {AppRoutingModule} from './app-routing.module'; +import {HttpInterceptorService} from "./openaireLibrary/http-interceptor.service"; +import {ErrorInterceptorService} from "./openaireLibrary/error-interceptor.service"; +import {DEFAULT_TIMEOUT, TimeoutInterceptor} from "./openaireLibrary/timeout-interceptor.service"; @NgModule({ @@ -28,13 +31,27 @@ import {AppRoutingModule} from './app-routing.module'; ErrorModule, NavigationBarModule, FeedbackModule, BottomModule, CookieLawModule, + BrowserAnimationsModule, + BrowserTransferStateModule, BrowserModule.withServerTransition({appId: 'my-app'}), AppRoutingModule ], declarations: [AppComponent, OpenaireErrorPageComponent], exports: [AppComponent], providers: [ - EnvironmentSpecificResolver + EnvironmentSpecificResolver, + { + provide: HTTP_INTERCEPTORS, + useClass: HttpInterceptorService, + multi: true + }, + { + provide: HTTP_INTERCEPTORS, + useClass: ErrorInterceptorService, + multi: true + }, + [{provide: HTTP_INTERCEPTORS, useClass: TimeoutInterceptor, multi: true}], + [{provide: DEFAULT_TIMEOUT, useValue: 30000}] ], bootstrap: [AppComponent] }) diff --git a/src/app/claims/claimsAdmin/claimsAdmin-routing.module.ts b/src/app/claims/claimsAdmin/claimsAdmin-routing.module.ts new file mode 100644 index 0000000..59eadcc --- /dev/null +++ b/src/app/claims/claimsAdmin/claimsAdmin-routing.module.ts @@ -0,0 +1,15 @@ +import {NgModule} from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {OpenaireClaimsAdminComponent} from './claimsAdmin.component'; +import {ClaimsCuratorGuard} from '../../openaireLibrary/login/claimsCuratorGuard.guard'; +import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; + + +@NgModule({ + imports: [ + RouterModule.forChild([ + { path: '', component: OpenaireClaimsAdminComponent, canActivate: [ClaimsCuratorGuard], + data: {redirect: '/error', community : 'openaire'}, canDeactivate: [PreviousRouteRecorder]}]) + ] +}) +export class ClaimsAdminRoutingModule { } diff --git a/src/app/claims/claimsAdmin/claimsAdmin.component.ts b/src/app/claims/claimsAdmin/claimsAdmin.component.ts new file mode 100644 index 0000000..6aa9589 --- /dev/null +++ b/src/app/claims/claimsAdmin/claimsAdmin.component.ts @@ -0,0 +1,35 @@ +import {Component} from '@angular/core'; +import {ActivatedRoute} from '@angular/router'; +import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties'; +import {Subscriber} from "rxjs"; + +@Component({ + selector: 'openaire-claims-admin', + template: ` + + + + `, + +}) +export class OpenaireClaimsAdminComponent { + + claimsInfoURL:string; + userInfoURL: string; + sub; + constructor (private route: ActivatedRoute) { + } + ngOnDestroy() { + if (this.sub instanceof Subscriber) { + this.sub.unsubscribe(); + } + } + + public ngOnInit() { + this.sub = this.route.data + .subscribe((data: { envSpecific: EnvProperties }) => { + this.claimsInfoURL = data.envSpecific.claimsInformationLink; + this.userInfoURL = data.envSpecific.userInfoUrl; + }); + } +} diff --git a/src/app/claims/claimsAdmin/claimsAdmin.module.ts b/src/app/claims/claimsAdmin/claimsAdmin.module.ts new file mode 100644 index 0000000..e203267 --- /dev/null +++ b/src/app/claims/claimsAdmin/claimsAdmin.module.ts @@ -0,0 +1,23 @@ +import { NgModule } from '@angular/core'; + +import { SharedModule } from '../../shared/shared.module'; +import { OpenaireClaimsAdminComponent } from './claimsAdmin.component'; +import { ClaimsAdminRoutingModule } from './claimsAdmin-routing.module'; +import{ClaimsAdminModule } from '../../openaireLibrary/claims/claimsAdmin/claimsAdmin.module'; +import{ ClaimsCuratorGuard} from '../../openaireLibrary/login/claimsCuratorGuard.guard'; +import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; +import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; + + +@NgModule({ + imports: [ + SharedModule, + ClaimsAdminRoutingModule, + ClaimsAdminModule + ], + providers:[ClaimsCuratorGuard, PreviousRouteRecorder,IsRouteEnabled], + declarations: [ + OpenaireClaimsAdminComponent + ] +}) +export class LibClaimsAdminModule { } diff --git a/src/app/claims/claimsByToken/claimsByToken-routing.module.ts b/src/app/claims/claimsByToken/claimsByToken-routing.module.ts new file mode 100644 index 0000000..473f32c --- /dev/null +++ b/src/app/claims/claimsByToken/claimsByToken-routing.module.ts @@ -0,0 +1,15 @@ +import {NgModule} from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {OpenaireClaimsByTokenComponent} from './claimsByToken.component'; +import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard'; +import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; + + +@NgModule({ + imports: [ + RouterModule.forChild([ + { path: '', component: OpenaireClaimsByTokenComponent, canActivate: [LoginGuard], + data: {redirect: '/error', community : 'openaire'}, canDeactivate: [PreviousRouteRecorder]}]) + ] +}) +export class ClaimsByTokenRoutingModule { } diff --git a/src/app/claims/claimsByToken/claimsByToken.component.ts b/src/app/claims/claimsByToken/claimsByToken.component.ts new file mode 100644 index 0000000..79040aa --- /dev/null +++ b/src/app/claims/claimsByToken/claimsByToken.component.ts @@ -0,0 +1,11 @@ +import {Component} from '@angular/core'; + +@Component({ + selector: 'openaire-claims-project-manager', + template: ` + + `, + +}) +export class OpenaireClaimsByTokenComponent { +} diff --git a/src/app/claims/claimsByToken/claimsByToken.module.ts b/src/app/claims/claimsByToken/claimsByToken.module.ts new file mode 100644 index 0000000..10e6f86 --- /dev/null +++ b/src/app/claims/claimsByToken/claimsByToken.module.ts @@ -0,0 +1,30 @@ +import { NgModule } from '@angular/core'; +import { RouterModule } from '@angular/router'; +import { SharedModule } from '../../shared/shared.module'; +import { OpenaireClaimsByTokenComponent } from './claimsByToken.component'; +import {ClaimsByTokenModule} from '../../openaireLibrary/claims/claimsByToken/claimsByToken.module'; +import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard'; +import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; +import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; +import { ClaimsByTokenRoutingModule } from './claimsByToken-routing.module'; + + + +@NgModule({ + imports: [ + RouterModule, + SharedModule, + ClaimsByTokenModule, + ClaimsByTokenRoutingModule + ], + providers:[ + LoginGuard, PreviousRouteRecorder, IsRouteEnabled + ], + declarations: [ + OpenaireClaimsByTokenComponent + ], + exports: [ + OpenaireClaimsByTokenComponent + ] +}) +export class LibClaimsByTokenModule { } diff --git a/src/app/claims/directLinking/directLinking-routing.module.ts b/src/app/claims/directLinking/directLinking-routing.module.ts new file mode 100644 index 0000000..9fb88f1 --- /dev/null +++ b/src/app/claims/directLinking/directLinking-routing.module.ts @@ -0,0 +1,19 @@ +import {NgModule} from '@angular/core'; +import {RouterModule} from '@angular/router'; + +import {OpenaireDirectLinkingComponent} from './directLinking.component'; +import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard'; +import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; + + +@NgModule({ + imports: [ + RouterModule.forChild([ + { path: '', component: OpenaireDirectLinkingComponent, canActivate: [LoginGuard], data: { + redirect: '/error', community : 'openaire' + }, canDeactivate: [PreviousRouteRecorder]}, + + ]) + ] +}) +export class DirectLinkingRoutingModule { } diff --git a/src/app/claims/directLinking/directLinking.component.ts b/src/app/claims/directLinking/directLinking.component.ts new file mode 100644 index 0000000..afabe0a --- /dev/null +++ b/src/app/claims/directLinking/directLinking.component.ts @@ -0,0 +1,8 @@ +import {Component, Input} from '@angular/core'; + +@Component({ + selector: 'openaire-directLinking', + template: `` +}) +export class OpenaireDirectLinkingComponent { +} diff --git a/src/app/claims/directLinking/directLinking.module.ts b/src/app/claims/directLinking/directLinking.module.ts new file mode 100644 index 0000000..34e279d --- /dev/null +++ b/src/app/claims/directLinking/directLinking.module.ts @@ -0,0 +1,20 @@ +import { NgModule } from '@angular/core'; + +import { SharedModule } from '../../shared/shared.module'; +import { OpenaireDirectLinkingComponent } from './directLinking.component'; +import{ DirectLinkingModule} from '../../openaireLibrary/claims/directLinking/directLinking.module'; +import {DirectLinkingRoutingModule} from './directLinking-routing.module'; +import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard'; +import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; +import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; + +@NgModule({ + imports: [ + SharedModule, DirectLinkingModule, DirectLinkingRoutingModule + ], + providers:[LoginGuard, PreviousRouteRecorder, IsRouteEnabled], + declarations: [ + OpenaireDirectLinkingComponent + ], exports:[OpenaireDirectLinkingComponent] +}) +export class LibDirectLinkingModule { } diff --git a/src/app/claims/linking/linking-routing.module.ts b/src/app/claims/linking/linking-routing.module.ts new file mode 100644 index 0000000..cea4356 --- /dev/null +++ b/src/app/claims/linking/linking-routing.module.ts @@ -0,0 +1,18 @@ +import {NgModule} from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {OpenaireLinkingComponent} from './linkingGeneric.component'; +import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard'; +import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; + + +@NgModule({ + imports: [ + RouterModule.forChild([ + { path: '', component: OpenaireLinkingComponent, canActivate: [LoginGuard], data: { + redirect: '/error', community : 'openaire' + }, canDeactivate: [PreviousRouteRecorder]}, + + ]) + ] +}) +export class LinkingRoutingModule { } diff --git a/src/app/claims/linking/linkingGeneric.component.ts b/src/app/claims/linking/linkingGeneric.component.ts new file mode 100644 index 0000000..edfeb87 --- /dev/null +++ b/src/app/claims/linking/linkingGeneric.component.ts @@ -0,0 +1,10 @@ +import {Component} from '@angular/core'; + +@Component({ + selector: 'openaire-linking-generic', + template: `` + +}) +export class OpenaireLinkingComponent { + +} diff --git a/src/app/claims/linking/linkingGeneric.module.ts b/src/app/claims/linking/linkingGeneric.module.ts new file mode 100644 index 0000000..95ae3ed --- /dev/null +++ b/src/app/claims/linking/linkingGeneric.module.ts @@ -0,0 +1,21 @@ +import { NgModule } from '@angular/core'; + +import { SharedModule } from '../../shared/shared.module'; +import {OpenaireLinkingComponent} from './linkingGeneric.component'; +import {LinkingRoutingModule} from './linking-routing.module'; +import{ LinkingGenericModule} from '../../openaireLibrary/claims/linking/linkingGeneric.module'; +import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard'; +import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; +import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; + +@NgModule({ + imports: [ + SharedModule, LinkingRoutingModule, LinkingGenericModule + ], + providers:[LoginGuard, PreviousRouteRecorder, IsRouteEnabled], + declarations: [ + OpenaireLinkingComponent + ], exports:[ + OpenaireLinkingComponent ] +}) +export class LibLinkingGenericModule { } diff --git a/src/app/claims/myClaims/myClaims-routing.module.ts b/src/app/claims/myClaims/myClaims-routing.module.ts new file mode 100644 index 0000000..0908b57 --- /dev/null +++ b/src/app/claims/myClaims/myClaims-routing.module.ts @@ -0,0 +1,16 @@ +import {NgModule} from '@angular/core'; +import {RouterModule} from '@angular/router'; + +import {OpenaireMyClaimsComponent} from './myClaims.component'; +import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard'; +import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; + + +@NgModule({ + imports: [ + RouterModule.forChild([ + { path: '', component: OpenaireMyClaimsComponent, canActivate: [LoginGuard], + data: {redirect: '/error', community : 'openaire'}, canDeactivate: [PreviousRouteRecorder]}]) + ] +}) +export class MyClaimsRoutingModule { } diff --git a/src/app/claims/myClaims/myClaims.component.ts b/src/app/claims/myClaims/myClaims.component.ts new file mode 100644 index 0000000..ec94692 --- /dev/null +++ b/src/app/claims/myClaims/myClaims.component.ts @@ -0,0 +1,34 @@ +import {Component} from '@angular/core'; +import {ActivatedRoute} from '@angular/router'; +import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties'; +import {Subscriber} from "rxjs"; + + + +@Component({ + selector: 'openaire-my-claims', + template: ` + + +` + +}) + export class OpenaireMyClaimsComponent { + claimsInfoURL:string; + userInfoURL: string; + sub; + constructor (private route: ActivatedRoute) { + } + ngOnDestroy() { + if (this.sub instanceof Subscriber) { + this.sub.unsubscribe(); + } + } + public ngOnInit() { + this.sub = this.route.data + .subscribe((data: { envSpecific: EnvProperties }) => { + this.claimsInfoURL = data.envSpecific.claimsInformationLink; + this.userInfoURL = data.envSpecific.userInfoUrl; + }); + } +} diff --git a/src/app/claims/myClaims/myClaims.module.ts b/src/app/claims/myClaims/myClaims.module.ts new file mode 100644 index 0000000..8402be1 --- /dev/null +++ b/src/app/claims/myClaims/myClaims.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; + +import { SharedModule } from '../../shared/shared.module'; +import { OpenaireMyClaimsComponent } from './myClaims.component'; +import { MyClaimsRoutingModule } from './myClaims-routing.module'; +import{ MyClaimsModule} from '../../openaireLibrary/claims/myClaims/myClaims.module'; +import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard'; +import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; +import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; + + +@NgModule({ + imports: [ + SharedModule, + MyClaimsRoutingModule, + MyClaimsModule + + ], + providers:[LoginGuard, PreviousRouteRecorder, IsRouteEnabled], + declarations: [ + OpenaireMyClaimsComponent + ] +}) +export class LibMyClaimsModule { } diff --git a/src/app/claims/myClaimsDemo.component.ts b/src/app/claims/myClaimsDemo.component.ts new file mode 100644 index 0000000..6490a59 --- /dev/null +++ b/src/app/claims/myClaimsDemo.component.ts @@ -0,0 +1,51 @@ +// import {Component, Input} from '@angular/core'; +// import {Observable} from 'rxjs/Observable'; +// import { Router } from '@angular/router'; +// +// +// +// @Component({ +// selector: 'my-claims-demo', +// template: ` +//
+// +//
+//
Linking
+//
MyClaims
+//
Claims Admin
+//

Extra parameters for claims admin

+//
Claims By user
+//
Claims By project
+//
Claims By context
+// +// +//
Publication od_______908::3a5b2885656a91307156325644e73b92
+// +//
+//
+// +// +// +// ` +// //(click)="changeOrderby('target')" +// //od_______908::3a5b2885656a91307156325644e73b92 +// +// }) +// export class MyClaimsDemoComponent { +// constructor ( private _router: Router ) { +// } +// user:string="argirok@di.uoa.gr"; +// ngOnInit() { +// +// } +// goToPub(id: number){ +// this._router.navigate( ['Publication', { articleId: id}] ); +// } +// } diff --git a/src/app/deposit/deposit-routing.module.ts b/src/app/deposit/deposit-routing.module.ts new file mode 100644 index 0000000..9eba569 --- /dev/null +++ b/src/app/deposit/deposit-routing.module.ts @@ -0,0 +1,16 @@ +import {NgModule} from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {OpenaireDepositComponent} from './deposit.component'; +import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; + +@NgModule({ + imports: [ + RouterModule.forChild([ + { path: '', component: OpenaireDepositComponent, data: { + redirect: '/error' + }, canDeactivate: [PreviousRouteRecorder] } + + ]) + ] +}) +export class DepositRoutingModule { } diff --git a/src/app/deposit/deposit.component.ts b/src/app/deposit/deposit.component.ts new file mode 100644 index 0000000..2d4ff8b --- /dev/null +++ b/src/app/deposit/deposit.component.ts @@ -0,0 +1,17 @@ +import {Component} from '@angular/core'; + +@Component({ + selector: 'openaire-deposit', + template: ` + + ` +}) + +export class OpenaireDepositComponent { + + constructor() { + } + + public ngOnInit() {} +} + diff --git a/src/app/deposit/deposit.module.ts b/src/app/deposit/deposit.module.ts new file mode 100644 index 0000000..e32cbaa --- /dev/null +++ b/src/app/deposit/deposit.module.ts @@ -0,0 +1,31 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; + + +import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; +import {IsRouteEnabled} from '../openaireLibrary/error/isRouteEnabled.guard'; + +import {OpenaireDepositComponent} from "./deposit.component"; +import {DepositRoutingModule} from "./deposit-routing.module"; +import {DepositFirstPageModule} from "../openaireLibrary/deposit/depositFirstPage.module"; + +import {ZenodoCommunitiesService} from "../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service"; +import {CommunityService} from "../openaireLibrary/connect/community/community.service"; +import {SearchZenodoCommunitiesService} from "../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunities.service"; + +@NgModule({ + imports: [ + CommonModule, FormsModule, + DepositRoutingModule, DepositFirstPageModule + ], + declarations: [ + OpenaireDepositComponent + ], + exports: [ + OpenaireDepositComponent, + ], + providers: [PreviousRouteRecorder, IsRouteEnabled, + ZenodoCommunitiesService, CommunityService, SearchZenodoCommunitiesService] +}) +export class LibDepositModule { } diff --git a/src/app/deposit/searchDataprovidersToDeposit-routing.module.ts b/src/app/deposit/searchDataprovidersToDeposit-routing.module.ts new file mode 100644 index 0000000..df568c6 --- /dev/null +++ b/src/app/deposit/searchDataprovidersToDeposit-routing.module.ts @@ -0,0 +1,19 @@ +import {NgModule} from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {OpenaireSearchDataprovidersToDepositComponent} from './searchDataprovidersToDeposit.component'; +import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; + +@NgModule({ + imports: [ + RouterModule.forChild([ + { + path: '', component: OpenaireSearchDataprovidersToDepositComponent, data: { + redirect: '/error' + }, canDeactivate: [PreviousRouteRecorder] + } + + ]) + ] +}) +export class SearchDataprovidersToDepositRoutingModule { +} diff --git a/src/app/deposit/searchDataprovidersToDeposit.component.ts b/src/app/deposit/searchDataprovidersToDeposit.component.ts new file mode 100644 index 0000000..51ae338 --- /dev/null +++ b/src/app/deposit/searchDataprovidersToDeposit.component.ts @@ -0,0 +1,16 @@ +import {Component} from '@angular/core'; + +@Component({ + selector: 'openaire-search-deposit', + template: ` + + ` +}) + +export class OpenaireSearchDataprovidersToDepositComponent { + + constructor() {} + + public ngOnInit() {} +} + diff --git a/src/app/deposit/searchDataprovidersToDeposit.module.ts b/src/app/deposit/searchDataprovidersToDeposit.module.ts new file mode 100644 index 0000000..2e76ce7 --- /dev/null +++ b/src/app/deposit/searchDataprovidersToDeposit.module.ts @@ -0,0 +1,31 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; + +import { OpenaireSearchDataprovidersToDepositComponent } from './searchDataprovidersToDeposit.component'; + +import {SearchDataprovidersToDepositRoutingModule} from './searchDataprovidersToDeposit-routing.module'; +import {SearchDataprovidersToDepositModule} from '../openaireLibrary/deposit/searchDataprovidersToDeposit.module'; +import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; +import {IsRouteEnabled} from '../openaireLibrary/error/isRouteEnabled.guard'; +import {ZenodoCommunitiesServiceModule} from '../openaireLibrary/connect/zenodoCommunities/zenodo-communitiesService.module'; +import {SearchZenodoCommunitiesServiceModule} from '../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunitiesService.module'; + +import {CommunityService} from '../openaireLibrary/connect/community/community.service'; + +@NgModule({ + imports: [ + CommonModule, FormsModule, + SearchDataprovidersToDepositModule, + SearchDataprovidersToDepositRoutingModule, + ZenodoCommunitiesServiceModule, SearchZenodoCommunitiesServiceModule + ], + declarations: [ + OpenaireSearchDataprovidersToDepositComponent + ], + exports: [ + OpenaireSearchDataprovidersToDepositComponent, + ], + providers: [PreviousRouteRecorder, IsRouteEnabled, CommunityService] +}) +export class LibSearchDataprovidersToDepositModule { } diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html index f055a32..6c1adca 100644 --- a/src/app/home/home.component.html +++ b/src/app/home/home.component.html @@ -1,4 +1,3 @@ -
@@ -238,107 +237,107 @@
-
-
+
+

Our growing Community

-
+
-

- - {{fundersSize.number|number}} - {{fundersSize.size}} - -
+

+

+ {{fundersSize.number|number}}{{fundersSize.size}} +

Funders -

-

- - {{datasourcesSize.number|number}} - {{datasourcesSize.size}} - -
+

+
+

+ {{datasourcesSize.number|number}}{{datasourcesSize.size}} +

Content providers -

-

- - {{projectsSize.number|number}} - {{projectsSize.size}} - -
+

+
+

+ {{projectsSize.number|number}}{{projectsSize.size}} +

Projects -

+
-
-
-
-
-
-
-

- {{publicationsSize.count|number}}
- - - publications - -

+
+
+
+
+
+
+
{{publicationsSize.count|number}}
+
+ + publications +
+
+
+
{{softwareSize.count|number}}
+
+ + software +
+
+
+
{{otherSize.count|number}}
+
+ + other research
products
+ other research products +
+
+
+
{{datasetsSize.count|number}}
+
+ + research data +
+
+
-
-

- {{softwareSize.count|number}}
- - - software - -

-
-
-
-
-

- {{datasetsSize.count|number}}
- - - research data - -

-
-
-

- {{otherSize.count|number}}
- - - other research products - -

+
+
+
+
{{softwareSize.count|number}}
+
+ + software +
+
+
+
{{datasetsSize.count|number}}
+
+ + research data +
+
+
+
{{otherSize.count|number}}
+
+ + other research
products
+ other research products +
+
+
diff --git a/src/app/home/home.module.ts b/src/app/home/home.module.ts index 90b37b1..51adce1 100644 --- a/src/app/home/home.module.ts +++ b/src/app/home/home.module.ts @@ -24,7 +24,7 @@ import {EntitiesSelectionModule} from "../openaireLibrary/searchPages/searchUtil import {QuickSelectionsModule} from "../openaireLibrary/searchPages/searchUtils/quick-selections.module"; import {IconsModule} from "../openaireLibrary/utils/icons/icons.module"; import {IconsService} from "../openaireLibrary/utils/icons/icons.service"; -import {arrow_right} from "../openaireLibrary/utils/icons/icons"; +import {arrow_right, book, cog, database, earth} from "../openaireLibrary/utils/icons/icons"; @NgModule({ imports: [ @@ -51,6 +51,6 @@ import {arrow_right} from "../openaireLibrary/utils/icons/icons"; }) export class HomeModule { constructor(private iconsService: IconsService) { - this.iconsService.registerIcons([arrow_right]); + this.iconsService.registerIcons([arrow_right, book, earth, cog, database]); } } diff --git a/src/app/landingPages/dataset/dataset.component.ts b/src/app/landingPages/dataset/dataset.component.ts index b6428ce..dfb6bbb 100644 --- a/src/app/landingPages/dataset/dataset.component.ts +++ b/src/app/landingPages/dataset/dataset.component.ts @@ -2,7 +2,7 @@ import {Component} from '@angular/core'; @Component({ selector: 'openaire-dataset', - template: ``, + template: ``, }) export class OpenaireDatasetComponent{ constructor ( ) { diff --git a/src/app/landingPages/orp/orp.component.ts b/src/app/landingPages/orp/orp.component.ts index 30e454f..f1dea70 100644 --- a/src/app/landingPages/orp/orp.component.ts +++ b/src/app/landingPages/orp/orp.component.ts @@ -2,7 +2,7 @@ import {Component} from '@angular/core'; @Component({ selector: 'openaire-orp', - template: ``, + template: ``, }) export class OpenaireOrpComponent{ constructor ( ) { diff --git a/src/app/landingPages/publication/publication.component.ts b/src/app/landingPages/publication/publication.component.ts index 343c5e9..ca8a2cf 100644 --- a/src/app/landingPages/publication/publication.component.ts +++ b/src/app/landingPages/publication/publication.component.ts @@ -3,12 +3,11 @@ import {Component} from '@angular/core'; @Component({ selector: 'openaire-publication', template: ` - `, + `, }) export class OpenairePublicationComponent { - constructor() { - - } + + constructor() {} ngOnInit() { } diff --git a/src/app/landingPages/software/software.component.ts b/src/app/landingPages/software/software.component.ts index 1dbdad9..3e445b3 100644 --- a/src/app/landingPages/software/software.component.ts +++ b/src/app/landingPages/software/software.component.ts @@ -2,7 +2,7 @@ import {Component} from '@angular/core'; @Component({ selector: 'openaire-software', - template: ``, + template: ``, }) export class OpenaireSoftwareComponent{ constructor ( ) { diff --git a/src/app/searchPages/advanced/advancedSearchDataProviders.component.ts b/src/app/searchPages/advanced/advancedSearchDataProviders.component.ts index 1a56713..1a04219 100644 --- a/src/app/searchPages/advanced/advancedSearchDataProviders.component.ts +++ b/src/app/searchPages/advanced/advancedSearchDataProviders.component.ts @@ -2,6 +2,8 @@ import {Component} from '@angular/core'; import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {ActivatedRoute} from "@angular/router"; import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; +import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper"; +import {properties} from "../../../environments/environment"; @Component({ @@ -22,7 +24,7 @@ export class OpenaireAdvancedSearchDataProvidersComponent { } ngOnInit() { - let id = this.route.snapshot.paramMap.get('id'); + let id = ConnectHelper.getCommunityFromDomain(properties.domain); let agg: FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg); } diff --git a/src/app/searchPages/advanced/advancedSearchOrganizations.component.ts b/src/app/searchPages/advanced/advancedSearchOrganizations.component.ts index 202eb8a..bc4f011 100644 --- a/src/app/searchPages/advanced/advancedSearchOrganizations.component.ts +++ b/src/app/searchPages/advanced/advancedSearchOrganizations.component.ts @@ -2,6 +2,8 @@ import {Component} from '@angular/core'; import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {ActivatedRoute} from "@angular/router"; import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; +import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper"; +import {properties} from "../../../environments/environment"; @Component({ @@ -21,7 +23,7 @@ export class OpenaireAdvancedSearchOrganizationsComponent { } ngOnInit() { - let id = this.route.snapshot.paramMap.get('id'); + let id = ConnectHelper.getCommunityFromDomain(properties.domain); let agg: FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg); } diff --git a/src/app/searchPages/advanced/advancedSearchProjects.component.ts b/src/app/searchPages/advanced/advancedSearchProjects.component.ts index 71cdb5e..45a14a4 100644 --- a/src/app/searchPages/advanced/advancedSearchProjects.component.ts +++ b/src/app/searchPages/advanced/advancedSearchProjects.component.ts @@ -2,6 +2,8 @@ import {Component} from '@angular/core'; import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {ActivatedRoute} from "@angular/router"; import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; +import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper"; +import {properties} from "../../../environments/environment"; @Component({ selector: 'openaire-advanced-search-projects', @@ -20,7 +22,7 @@ export class OpenaireAdvancedSearchProjectsComponent { } ngOnInit() { - let id = this.route.snapshot.paramMap.get('id'); + let id = ConnectHelper.getCommunityFromDomain(properties.domain); let agg: FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg); } diff --git a/src/app/searchPages/advanced/searchResearchResults.component.ts b/src/app/searchPages/advanced/searchResearchResults.component.ts index 694155e..3e29634 100644 --- a/src/app/searchPages/advanced/searchResearchResults.component.ts +++ b/src/app/searchPages/advanced/searchResearchResults.component.ts @@ -2,6 +2,8 @@ import {Component, Input} from '@angular/core'; import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {ActivatedRoute} from "@angular/router"; +import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper"; +import {properties} from "../../../environments/environment"; @Component({ selector: 'openaire-search-results', @@ -16,7 +18,7 @@ export class OpenaireSearchResearchResultsComponent { constructor(private route: ActivatedRoute) { } ngOnInit() { - let id = this.route.snapshot.paramMap.get('id'); + let id = ConnectHelper.getCommunityFromDomain(properties.domain); let agg: FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg); } diff --git a/src/app/searchPages/find/search.component.ts b/src/app/searchPages/find/search.component.ts index 696176d..4920fe6 100644 --- a/src/app/searchPages/find/search.component.ts +++ b/src/app/searchPages/find/search.component.ts @@ -2,12 +2,13 @@ import {Component} from '@angular/core'; import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {ActivatedRoute} from "@angular/router"; import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; +import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper"; +import {properties} from "../../../environments/environment"; @Component({ selector: 'openaire-search-find', template: ` - `, }) export class OpenaireSearchComponent{ @@ -18,7 +19,7 @@ export class OpenaireSearchComponent{ } ngOnInit() { - let id = this.route.snapshot.paramMap.get('id'); + let id = ConnectHelper.getCommunityFromDomain(properties.domain); let agg:FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg); diff --git a/src/app/searchPages/simple/searchDataproviders.component.ts b/src/app/searchPages/simple/searchDataproviders.component.ts index 8e2bd61..87024b5 100644 --- a/src/app/searchPages/simple/searchDataproviders.component.ts +++ b/src/app/searchPages/simple/searchDataproviders.component.ts @@ -2,6 +2,8 @@ import {Component} from '@angular/core'; import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {ActivatedRoute} from "@angular/router"; import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; +import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper"; +import {properties} from "../../../environments/environment"; @Component({ selector: 'openaire-search-dataproviders', @@ -20,7 +22,7 @@ export class OpenaireSearchDataprovidersComponent { } ngOnInit() { - let id = this.route.snapshot.paramMap.get('id'); + let id = ConnectHelper.getCommunityFromDomain(properties.domain); let agg: FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg); } diff --git a/src/app/searchPages/simple/searchOrganizations.component.ts b/src/app/searchPages/simple/searchOrganizations.component.ts index bb4607d..03002ab 100644 --- a/src/app/searchPages/simple/searchOrganizations.component.ts +++ b/src/app/searchPages/simple/searchOrganizations.component.ts @@ -2,6 +2,8 @@ import {Component} from '@angular/core'; import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {ActivatedRoute} from "@angular/router"; import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; +import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper"; +import {properties} from "../../../environments/environment"; @Component({ selector: 'openaire-search-organizations', @@ -19,7 +21,7 @@ export class OpenaireSearchOrganizationsComponent { } ngOnInit() { - let id = this.route.snapshot.paramMap.get('id'); + let id = ConnectHelper.getCommunityFromDomain(properties.domain); let agg:FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg); } diff --git a/src/app/searchPages/simple/searchProjects.component.ts b/src/app/searchPages/simple/searchProjects.component.ts index 1a719cd..d1e05bc 100644 --- a/src/app/searchPages/simple/searchProjects.component.ts +++ b/src/app/searchPages/simple/searchProjects.component.ts @@ -2,6 +2,8 @@ import {Component} from '@angular/core'; import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {ActivatedRoute} from "@angular/router"; import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; +import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper"; +import {properties} from "../../../environments/environment"; @Component({ selector: 'openaire-search-projects', @@ -20,7 +22,7 @@ export class OpenaireSearchProjectsComponent { } ngOnInit() { - let id = this.route.snapshot.paramMap.get('id'); + let id = ConnectHelper.getCommunityFromDomain(properties.domain); let agg: FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg); } diff --git a/src/app/searchPages/simple/searchResearchResults.component.ts b/src/app/searchPages/simple/searchResearchResults.component.ts index 95ac0a9..b1fd218 100644 --- a/src/app/searchPages/simple/searchResearchResults.component.ts +++ b/src/app/searchPages/simple/searchResearchResults.component.ts @@ -2,6 +2,8 @@ import {Component, Input} from '@angular/core'; import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {ActivatedRoute} from "@angular/router"; import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; +import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper"; +import {properties} from "../../../environments/environment"; @Component({ selector: 'openaire-search-results', @@ -17,7 +19,7 @@ export class OpenaireSearchResearchResultsComponent { } ngOnInit() { - let id = this.route.snapshot.paramMap.get('id'); + let id = ConnectHelper.getCommunityFromDomain(properties.domain); let agg:FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg); } diff --git a/src/environments/environment.beta.ts b/src/environments/environment.beta.ts index 74b7b14..7337371 100644 --- a/src/environments/environment.beta.ts +++ b/src/environments/environment.beta.ts @@ -61,8 +61,6 @@ export let properties: EnvProperties = { datasourcesAPI: "https://beta.services.openaire.eu/openaire/ds/search/", adminToolsAPIURL: "https://beta.services.openaire.eu/uoa-admin-tools/", - - adminToolsCommunity: "openaire", contextsAPI: "https://beta.services.openaire.eu/openaire/context", communityAPI: "https://beta.services.openaire.eu/openaire/community/", diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 6320911..073df31 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -62,7 +62,6 @@ export let properties: EnvProperties = { adminToolsAPIURL: "https://services.openaire.eu/uoa-admin-tools/", - adminToolsCommunity: "openaire", contextsAPI: "https://services.openaire.eu/openaire/context", communityAPI: "https://services.openaire.eu/openaire/community/", diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 6eafdff..0afc4ca 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -64,8 +64,6 @@ export let properties: EnvProperties = { cacheUrl: "http://dl170.madgik.di.uoa.gr:3000/get?url=", adminToolsAPIURL: "http://duffy.di.uoa.gr:8080/uoa-admin-tools/", - - adminToolsCommunity: "openaire", datasourcesAPI: "https://beta.services.openaire.eu/openaire/ds/search/", contextsAPI: "https://dev-openaire.d4science.org/openaire/context", communityAPI: "https://dev-openaire.d4science.org/openaire/community/",