diff --git a/connect/connectHelper.ts b/connect/connectHelper.ts index 5cd2f403..18c60846 100644 --- a/connect/connectHelper.ts +++ b/connect/connectHelper.ts @@ -12,7 +12,7 @@ export class ConnectHelper { if(properties.environment == "development" && (properties.adminToolsPortalType == "connect" || properties.adminToolsPortalType == "community" || properties.adminToolsPortalType == "aggregator" || properties.adminToolsPortalType == "eosc")) { - domain = "enermaps.openaire.eu"; //for testing + domain = "covid-19.openaire.eu"; //for testing } domain = domain.indexOf("//") != -1? domain.split("//")[1]:domain; //remove https:// prefix if (domain.indexOf('eosc-portal.eu') != -1) { diff --git a/deposit/depositFirstPage.component.ts b/deposit/depositFirstPage.component.ts index 57009d7a..278bc4df 100644 --- a/deposit/depositFirstPage.component.ts +++ b/deposit/depositFirstPage.component.ts @@ -105,7 +105,7 @@ import {FullScreenModalComponent} from '../utils/modal/full-screen-modal/full-sc Find the appropriate repository.
-
+
OpenAIRE logo @@ -120,7 +120,7 @@ import {FullScreenModalComponent} from '../utils/modal/full-screen-modal/full-sc
-
+
Zenodo logo @@ -141,7 +141,7 @@ import {FullScreenModalComponent} from '../utils/modal/full-screen-modal/full-sc
-
+
Suggested Repositories diff --git a/deposit/depositFirstPage.module.ts b/deposit/depositFirstPage.module.ts index 197b0ff3..d33ac8f4 100644 --- a/deposit/depositFirstPage.module.ts +++ b/deposit/depositFirstPage.module.ts @@ -12,6 +12,7 @@ import {DepositFirstPageComponent} from "./depositFirstPage.component"; import {BreadcrumbsModule} from "../utils/breadcrumbs/breadcrumbs.module"; import {SearchInputModule} from "../sharedComponents/search-input/search-input.module"; import {FullScreenModalModule} from '../utils/modal/full-screen-modal/full-screen-modal.module'; +import {IsPageEnabledModule} from "../utils/isPageEnabled/isPageEnabled.module"; @NgModule({ imports: [ @@ -19,7 +20,7 @@ import {FullScreenModalModule} from '../utils/modal/full-screen-modal/full-scree RouterModule, HelperModule, Schema2jsonldModule, SEOServiceModule, BreadcrumbsModule, SearchInputModule, - FullScreenModalModule + FullScreenModalModule, IsPageEnabledModule ], declarations: [ DepositFirstPageComponent diff --git a/deposit/searchDataprovidersToDeposit.component.ts b/deposit/searchDataprovidersToDeposit.component.ts index 0e66351d..a3178244 100644 --- a/deposit/searchDataprovidersToDeposit.component.ts +++ b/deposit/searchDataprovidersToDeposit.component.ts @@ -32,18 +32,18 @@ import {SearchForm} from "../searchPages/searchUtils/newSearchPage.component";
diff --git a/deposit/searchDataprovidersToDeposit.module.ts b/deposit/searchDataprovidersToDeposit.module.ts index d7959e48..75b153fc 100644 --- a/deposit/searchDataprovidersToDeposit.module.ts +++ b/deposit/searchDataprovidersToDeposit.module.ts @@ -12,14 +12,15 @@ import {SearchFormModule} from '../searchPages/searchUtils/searchForm.module'; import {SearchDataProvidersModule} from "../searchPages/searchDataProviders.module"; import {BreadcrumbsModule} from "../utils/breadcrumbs/breadcrumbs.module"; import {SearchInputModule} from "../sharedComponents/search-input/search-input.module"; +import {IsPageEnabledModule} from "../utils/isPageEnabled/isPageEnabled.module"; @NgModule({ imports: [ CommonModule, FormsModule, RouterModule, DataProvidersServiceModule, - SearchFormModule, SearchResultsModule, SearchDataProvidersModule, BreadcrumbsModule, SearchInputModule - + SearchFormModule, SearchResultsModule, SearchDataProvidersModule, BreadcrumbsModule, SearchInputModule, IsPageEnabledModule + ], declarations: [ SearchDataprovidersToDepositComponent diff --git a/deposit/searchResultsInDeposit.component.html b/deposit/searchResultsInDeposit.component.html index d622be32..6a01fbdb 100644 --- a/deposit/searchResultsInDeposit.component.html +++ b/deposit/searchResultsInDeposit.component.html @@ -5,7 +5,7 @@

The OpenAIRE Catch-all repository hosted at CERN cloud infrastructure. Whatever your field of research is, you can deposit any type of research product, select the proper license, ask for a DOI and link it to the funding projects for easy reporting.

- Related zenodo communities diff --git a/deposit/searchResultsInDeposit.module.ts b/deposit/searchResultsInDeposit.module.ts index 846219cb..987dc40d 100644 --- a/deposit/searchResultsInDeposit.module.ts +++ b/deposit/searchResultsInDeposit.module.ts @@ -7,12 +7,13 @@ import {ErrorMessagesModule} from '../utils/errorMessages.module'; import {SearchResultsInDepositComponent} from './searchResultsInDeposit.component'; import {ApprovedByCommunityModule} from '../connect/approvedByCommunity/approved.module'; import {ResultPreviewModule} from "../utils/result-preview/result-preview.module"; +import {IsPageEnabledModule} from "../utils/isPageEnabled/isPageEnabled.module"; @NgModule({ imports: [ CommonModule, FormsModule, RouterModule, ErrorMessagesModule, - ApprovedByCommunityModule, ResultPreviewModule + ApprovedByCommunityModule, ResultPreviewModule, IsPageEnabledModule ], declarations: [ SearchResultsInDepositComponent diff --git a/sdg/sdg.component.html b/sdg/sdg.component.html index 8cb3da17..5cb7f807 100644 --- a/sdg/sdg.component.html +++ b/sdg/sdg.component.html @@ -17,8 +17,7 @@ Laying the foundation for new approaches and solutions.
- We have developed a classification scheme for UN Sustainable Development Goals, to view contributions of research towards complex challenges for humanity such as climate change, biodiversity loss, pollution and poverty reduction. - + The classification scheme is developed for UN Sustainable Development Goals, to view contributions of research towards complex challenges for humanity such as climate change, biodiversity loss, pollution and poverty reduction. diff --git a/utils/configuration/configuration.service.ts b/utils/configuration/configuration.service.ts index 43f804bb..8d95d170 100644 --- a/utils/configuration/configuration.service.ts +++ b/utils/configuration/configuration.service.ts @@ -67,10 +67,12 @@ export class ConfigurationService { isPageEnabled(properties: EnvProperties, portal: string, router: string): Observable { let page_route: string = router.split('?')[0].substring(1); + console.log(portal, router, page_route) return from(this.isPageEnabledAsync(properties, portal, page_route)); } filtering(page_route: string) { + console.log(page_route) let community: Portal = this.portal.getValue(); let pages: Page[] = community.pages; if (pages) { diff --git a/utils/isPageEnabled/isPageEnabled.component.ts b/utils/isPageEnabled/isPageEnabled.component.ts new file mode 100644 index 00000000..6c9c083a --- /dev/null +++ b/utils/isPageEnabled/isPageEnabled.component.ts @@ -0,0 +1,60 @@ +import {properties} from "src/environments/environment"; +import {Component, Input, OnDestroy, OnInit} from "@angular/core"; +import {EnvProperties} from "../properties/env-properties"; +import {CommunityInfo} from "../../connect/community/communityInfo"; +import {ActivatedRoute, Router} from "@angular/router"; +import {CommunityService} from "../../connect/community/community.service"; +import {ConfigurationService} from "../configuration/configuration.service"; +import {Subscription} from "rxjs"; + +@Component({ + selector: '[page-enabled]', + template: ` + + + + + ` +}) +export class IsPageEnabledComponent implements OnInit, OnDestroy { + @Input() pageRoute:string; + public properties: EnvProperties = properties; + pageEnabled = false; + + public community: CommunityInfo; + loading; + private subs: any[] = []; + + constructor(private route: ActivatedRoute, + private router: Router, + private communityService: CommunityService, + private configurationService: ConfigurationService) { + } + + + ngOnInit() { + this.subs.push(this.communityService.getCommunityAsObservable().subscribe( community => { + this.community = community; + this.getPageStatus(); + })); + } + + ngOnDestroy() { + this.subs.forEach(sub => { + if (sub instanceof Subscription) { + sub.unsubscribe(); + } + }) + } + + + + + private getPageStatus() { + this.configurationService.isPageEnabled(this.properties, this.community.communityId, '/' + this.pageRoute).subscribe((page) => { + this.pageEnabled = page; + }) + } + + +} diff --git a/utils/isPageEnabled/isPageEnabled.module.ts b/utils/isPageEnabled/isPageEnabled.module.ts new file mode 100644 index 00000000..574c7b9d --- /dev/null +++ b/utils/isPageEnabled/isPageEnabled.module.ts @@ -0,0 +1,15 @@ +import {NgModule} from '@angular/core'; +import {CommonModule} from '@angular/common'; +import {RouterModule} from "@angular/router"; +import {IsPageEnabledComponent} from "./isPageEnabled.component"; + +@NgModule({ + declarations: [IsPageEnabledComponent], + imports: [ + CommonModule, RouterModule + ], + exports:[IsPageEnabledComponent], + providers:[] +}) +export class IsPageEnabledModule { +}