diff --git a/explore/package.json b/explore/package.json index 8ca99eba..cd0a248b 100644 --- a/explore/package.json +++ b/explore/package.json @@ -45,7 +45,7 @@ "rxjs": "^6.5.1", "ts-md5": "^1.2.0", "tslib": "^2.0.0", - "uikit": "3.12.0", + "uikit": "3.13.10", "zone.js": "~0.11.4" }, "devDependencies": { @@ -71,4 +71,4 @@ "ts-node": "~7.0.0", "typescript": "~4.6.4" } -} \ No newline at end of file +} diff --git a/explore/src/app/app-routing.module.ts b/explore/src/app/app-routing.module.ts index d3c30a25..a24b2e53 100644 --- a/explore/src/app/app-routing.module.ts +++ b/explore/src/app/app-routing.module.ts @@ -10,50 +10,45 @@ const routes: Routes = [ {path: 'mail-preferences', loadChildren: () => import('./userEmailPreferences/mailPrefs.module').then(m => m.LibMailPrefsModule)}, {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: 'funders', loadChildren: () => import('./funders/funders.module').then(m => m.FundersModule)}, {path: 'contact-us', loadChildren: () => import('./contact/contact.module').then(m => m.ContactModule), data: {hasQuickContact: false}}, // ORCID Pages {path: 'orcid', loadChildren: () => import('./orcid/orcid.module').then(m => m.LibOrcidModule)}, {path: 'my-orcid-links', loadChildren: () => import('./orcid/my-orcid-links/myOrcidLinks.module').then(m => m.LibMyOrcidLinksModule)}, // Landing Pages - {path: 'search/result', loadChildren: () => import('./landingPages/result/libResult.module').then(m => m.LibResultModule), data: {hasQuickContact: false}}, - {path: 'search/publication', loadChildren: () => import('./landingPages/publication/libPublication.module').then(m => m.LibPublicationModule), data: {hasQuickContact: false}}, - {path: 'search/dataset', loadChildren: () => import('./landingPages/dataset/libDataset.module').then(m => m.LibDatasetModule), data: {hasQuickContact: false}}, - {path: 'search/software', loadChildren: () => import('./landingPages/software/libSoftware.module').then(m => m.LibSoftwareModule), data: {hasQuickContact: false}}, - {path: 'search/other', loadChildren: () => import('./landingPages/orp/libOrp.module').then(m => m.LibOrpModule), data: {hasQuickContact: false}}, - {path: 'search/project', loadChildren: () => import('./landingPages/project/libProject.module').then(m => m.LibProjectModule), data: {hasQuickContact: false}}, + {path: 'search/result', loadChildren: () => import('./landingPages/result/libResult.module').then(m => m.LibResultModule), data: {hasQuickContact: false, hasMenuSearchBar: true}}, + {path: 'search/publication', loadChildren: () => import('./landingPages/publication/libPublication.module').then(m => m.LibPublicationModule), data: {hasQuickContact: false, hasMenuSearchBar: true}}, + {path: 'search/dataset', loadChildren: () => import('./landingPages/dataset/libDataset.module').then(m => m.LibDatasetModule), data: {hasQuickContact: false, hasMenuSearchBar: true}}, + {path: 'search/software', loadChildren: () => import('./landingPages/software/libSoftware.module').then(m => m.LibSoftwareModule), data: {hasQuickContact: false, hasMenuSearchBar: true}}, + {path: 'search/other', loadChildren: () => import('./landingPages/orp/libOrp.module').then(m => m.LibOrpModule), data: {hasQuickContact: false, hasMenuSearchBar: true}}, + {path: 'search/project', loadChildren: () => import('./landingPages/project/libProject.module').then(m => m.LibProjectModule), data: {hasQuickContact: false, hasMenuSearchBar: true}}, { path: 'search/dataprovider', loadChildren: () => import('././landingPages/dataProvider/libDataProvider.module').then(m => m.LibDataProviderModule), - data: {hasQuickContact: false} + data: {hasQuickContact: false, hasMenuSearchBar: true} }, { path: 'search/organization', loadChildren: () => import('./landingPages/organization/libOrganization.module').then(m => m.LibOrganizationModule), - data: {hasQuickContact: false} + data: {hasQuickContact: false, hasMenuSearchBar: true} }, { path: 'project-report', loadChildren: () => import('./landingPages/htmlProjectReport/libHtmlProjectReport.module').then(m => m.LibHtmlProjectReportModule) }, + // Search Pages - {path: 'search/find', loadChildren: () => import('./searchPages/find/libSearch.module').then(m => m.LibMainSearchModule)}, { - path: 'search/find/research-outcomes', - loadChildren: () => import('./searchPages/simple/searchResearchResults.module').then(m => m.OpenaireSearchResearchResultsModule) + path: 'search/find', loadChildren: () => import('./searchPages/find/libSearch.module').then(m => m.LibMainSearchModule) + }, + { + path: 'search/find/:entity', loadChildren: () => import('./searchPages/find/libSearch.module').then(m => m.LibMainSearchModule) }, {path: 'search/find/publications', component: PageURLResolverComponent}, {path: 'search/find/datasets', component: PageURLResolverComponent}, {path: 'search/find/software', component: PageURLResolverComponent}, {path: 'search/find/other', component: PageURLResolverComponent}, - {path: 'search/find/projects', loadChildren: () => import('./searchPages/simple/searchProjects.module').then(m => m.LibSearchProjectsModule)}, - { - path: 'search/find/dataproviders', - loadChildren: () => import('./searchPages/simple/searchDataProviders.module').then(m => m.LibSearchDataProvidersModule) - }, - { - path: 'search/find/organizations', - loadChildren: () => import('./searchPages/simple/searchOrganizations.module').then(m => m.LibSearchOrganizationsModule) - }, + // Advanced Search Pages { path: 'search/advanced/research-outcomes', diff --git a/explore/src/app/app.component.ts b/explore/src/app/app.component.ts index d8b467ae..5292ea5c 100644 --- a/explore/src/app/app.component.ts +++ b/explore/src/app/app.component.ts @@ -53,7 +53,7 @@ import {LayoutService} from './openaireLibrary/dashboard/sharedComponents/sideba + [contactForm]="contactForm" [sending]="sending" [contact]="'Help'" class="uk-visible@m"> ` }) @@ -168,7 +168,7 @@ export class AppComponent { new MenuItem("", OpenaireEntities.OTHER, "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], {type: '"' + encodeURIComponent("other") + '"'})]; //TODO add check for research results route this.menuItems = [ - new MenuItem("search", "Search", "", "/search/find", false, [], ["/search/find"], {qf: true}, + new MenuItem("search", "Search", "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], {resultbestaccessright: '"' + encodeURIComponent("Open Access") + '"'}, null, null, null, null, "_blank", "internal", false, [ researchOutcomesMenu, @@ -191,6 +191,7 @@ export class AppComponent { new MenuItem("", "Registries", "", "/search/entity-registries", false, ["datasource"], ["/search/entity-registries"], {}), new MenuItem("", "Browse all", "", "/search/find/dataproviders", false, ["datasource"], ["/search/find/dataproviders"], {})] ), + // new MenuItem("funders", "Funders", "", "/funders", false, [], ["/funders"], {}), ]; if (Session.isPortalAdministrator(this.user)) { this.userMenuItems.push(new MenuItem("", "Manage all links", "", "/claims", false, [], ["/claims"], {})); diff --git a/explore/src/app/funders/funders-routing.module.ts b/explore/src/app/funders/funders-routing.module.ts new file mode 100644 index 00000000..5359a285 --- /dev/null +++ b/explore/src/app/funders/funders-routing.module.ts @@ -0,0 +1,19 @@ +import {NgModule} from '@angular/core'; +import {RouterModule} from '@angular/router'; + +import {FundersComponent} from './funders.component'; +import {IsRouteEnabled} from "../openaireLibrary/error/isRouteEnabled.guard"; +import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard"; + +@NgModule({ + imports: [ + RouterModule.forChild([ + { + path: '', component: FundersComponent, + canActivate: [IsRouteEnabled], + canDeactivate: [PreviousRouteRecorder] + } + ]) + ] +}) +export class FundersRoutingModule { } diff --git a/explore/src/app/funders/funders.component.html b/explore/src/app/funders/funders.component.html new file mode 100644 index 00000000..2844f376 --- /dev/null +++ b/explore/src/app/funders/funders.component.html @@ -0,0 +1,150 @@ + +
+
+
+ +
+
+
+
+
+ + + Funders + +
+

+ Be an integral part of the open R&I ecosystem +

+
+ Lorem ipsum dolor sit amet, consetetur sadipscing + {{formatNumber(projectsNumber)}} grants from + {{formatNumber(fundersNumber)}} funders, linked to + {{formatNumber(researchProductsNumber)}} funded research outputs. +
+ +
+
+
+ +
+
+
+ +
+ +
+
+ +
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+ + + +
{{(funder.openAccessResearchProducts / funder.researchProducts) * 100 | number : '1.0-0'}}%
+
+ Open Access +
+
+ +
+ + + OpenAIRE placeholder logo + +
+ +
+ + {{funder.alias}} + +
+ +
+ + {{funder.name}} + +
+ +
+
+
+
+ + +
+
+
+
\ No newline at end of file diff --git a/explore/src/app/funders/funders.component.less b/explore/src/app/funders/funders.component.less new file mode 100644 index 00000000..32d0b5d5 --- /dev/null +++ b/explore/src/app/funders/funders.component.less @@ -0,0 +1,36 @@ +@import (reference) "~src/assets/openaire-theme/less/color.less"; + + +.custom-coins-dot:after { + content: ""; + background-image: url("~src/assets/explore-assets/funders/coins.svg"); + display: inline-block; + background-size: 100% 100%; + height: 35px; + width: 35px; + margin-right: 10px; +} + +.custom-handshake-dot:after { + content: ""; + background-image: url("~src/assets/explore-assets/funders/handshake.svg"); + display: inline-block; + background-size: 100% 100%; + height: 30px; + width: 30px; + margin-left: 10px; +} + +.setType(@color) { + border-bottom: 4px solid fade(@color, 30%); + + & .type { + color: @color; + } +} + +.uk-card { + &.funder { + .setType(@funder-color); + } +} \ No newline at end of file diff --git a/explore/src/app/funders/funders.component.ts b/explore/src/app/funders/funders.component.ts new file mode 100644 index 00000000..b3b44da3 --- /dev/null +++ b/explore/src/app/funders/funders.component.ts @@ -0,0 +1,260 @@ +import {Component, OnInit} from '@angular/core'; +import {Router} from '@angular/router'; +import {Subscriber, Subscription, zip} from "rxjs"; +import {Meta, Title} from "@angular/platform-browser"; + +import {EnvProperties} from "../openaireLibrary/utils/properties/env-properties"; +import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service"; +import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service"; +import {Breadcrumb} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.component"; +import {properties} from "../../environments/environment"; +import {RefineFieldResultsService} from '../openaireLibrary/services/refineFieldResults.service'; +import {StakeholderService} from '../openaireLibrary/monitor/services/stakeholder.service'; +import {Option} from '../openaireLibrary/sharedComponents/input/input.component'; +import {StringUtils} from '../openaireLibrary/utils/string-utils.class'; +import {HelperFunctions} from '../openaireLibrary/utils/HelperFunctions.class'; +import {NumberUtils} from '../openaireLibrary/utils/number-utils.class'; + +@Component({ + selector: 'funders', + templateUrl: './funders.component.html', + styleUrls: ['funders.component.less'] +}) + +export class FundersComponent implements OnInit { + private subscriptions: Subscription[] = []; + url: string = null; + pageTitle: string = "OpenAIRE - Explore | Funders"; + pageDescription: string = "Funders | Be an integral part of the open R&I ecosystem"; + properties: EnvProperties = properties; + breadcrumbs: Breadcrumb[] = [{name: 'home', route: '/'}, {name: 'funders'}]; + showLoading: boolean = true; + index: number = 0; + funders: any[] = []; + groupedFunders: any[] = []; + options: Option[]; + sortBy: string = 'all'; + currentPage: number = 1; + pageSize: number = 6; + fundersNumber: number = 0; + researchProductsNumber: number = 0; + projectsNumber: number = 0; + fundersMap = new Map(); + + constructor(private router: Router, + private meta: Meta, + private title: Title, + private seoService: SEOService, + private piwikService: PiwikService, + private refineFieldResultsService: RefineFieldResultsService, + private stakeholderService: StakeholderService) { + } + + ngOnInit() { + this.title.setTitle('OpenAIRE - Explore | Funders'); + this.properties = properties; + if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { + this.subscriptions.push( this.piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe()); + } + this.url = this.properties.domain + this.router.url; + this.seoService.createLinkForCanonicalURL(this.url); + this.updateUrl(this.url); + this.updateTitle(this.pageTitle); + this.updateDescription(this.pageDescription); + this.options = [ + {value: 'all', label: 'All funders'}, + {value: 'dashboard', label: 'Funders with dashboard'} + ]; + this.getFunders(); + } + + ngOnDestroy() { + this.subscriptions.forEach(subscription => { + if (subscription instanceof Subscriber) { + subscription.unsubscribe(); + } + }); + } + + private updateDescription(description: string) { + this.meta.updateTag({content: description}, "name='description'"); + this.meta.updateTag({content: description}, "property='og:description'"); + } + + private updateTitle(title: string) { + var title = ((title.length > 50) ? title.substring(0, 50) : title); + this.title.setTitle(title); + this.meta.updateTag({content: title}, "property='og:title'"); + } + + private updateUrl(url: string) { + this.meta.updateTag({content: url}, "property='og:url'"); + } + + private getFunders() { + let refineParams = '&fq=resultbestaccessright%20exact%20%22Open%20Access%22'; + this.subscriptions.push( + zip( + this.refineFieldResultsService.getRefineFieldsResultsByEntityName(['relfunder'], 'result', this.properties), + this.refineFieldResultsService.getRefineFieldsResultsByEntityName(['relfunder'], 'result', this.properties, refineParams), + this.refineFieldResultsService.getRefineFieldsResultsByEntityName(['funder'], 'project', this.properties), + this.stakeholderService.getStakeholders(this.properties.monitorServiceAPIURL, 'funder') + ).subscribe((data: any[]) => { + // storing all needed data to a map + // 1st call + let queriedFunders1 = data[0][1][0].values; + queriedFunders1.forEach(queriedFunder => { + this.fundersMap.set(queriedFunder.id, { + "id": queriedFunder.id, + "name": queriedFunder.name, + "alias": '', + "researchProducts": +queriedFunder.number, + "openAccessResearchProducts": 0, + "projects": 0, + "monitorDashboard": '', + "monitorDashboardStatus": '', + "logoUrl": '' + }); + }); + + // 2nd call + let queriedFunders2 = data[1][1][0].values; + queriedFunders2.forEach(queriedFunder => { + if(this.fundersMap.has(queriedFunder.id)) { + this.fundersMap.get(queriedFunder.id).openAccessResearchProducts = +queriedFunder.number; + } + }); + + // 3rd call + let queriedFunders3 = data[2][1][0].values; + queriedFunders3.forEach(queriedFunder => { + if(this.fundersMap.has(queriedFunder.id)) { + this.fundersMap.get(queriedFunder.id).projects = +queriedFunder.number; + } else { + this.fundersMap.set(queriedFunder.id, { + "id": queriedFunder.id, + "name": queriedFunder.name, + "alias": '', + "researchProducts": 0, + "openAccessResearchProducts": 0, + "projects": +queriedFunder.number, + "monitorDashboard": '', + "monitorDashboardStatus": '', + "logoUrl": '' + }); + } + }); + + // 4th call + let queriedFunders4 = data[3]; + queriedFunders4.forEach(queriedFunder => { + let id = queriedFunder.index_id + '||' + queriedFunder.index_name + '||' + queriedFunder.index_shortName; + if(this.fundersMap.has(id)) { + this.fundersMap.get(id).alias = queriedFunder.alias; + this.fundersMap.get(id).monitorDashboard = queriedFunder.alias; + this.fundersMap.get(id).monitorDashboardStatus = queriedFunder.visibility; + this.fundersMap.get(id).logoUrl = queriedFunder.logoUrl; + } else { + this.fundersMap.set(id, { + "id": queriedFunder.id, + "name": queriedFunder.name, + "alias": queriedFunder.alias, + "researchProducts": 0, + "openAccessResearchProducts": 0, + "projects": 0, + "monitorDashboard": queriedFunder.alias, + "monitorDashboardStatus": queriedFunder.visibility, + "logoUrl": queriedFunder.logoUrl + }); + } + }); + // convert funders map into an array + this.funders = Array.from(this.fundersMap.values()); + // group funders based on their initial letter + this.groupFunders(this.funders); + // calculate total numbers for intro content + this.calculateNumbers(); + + this.showLoading = false; + }) + ); + } + + private groupFunders(funders) { + if(funders.length === 0) { + return []; + } + funders.sort((a, b) => a['name'].localeCompare(b['name'])); + this.index = 0; + this.groupedFunders = Object.values( + funders.reduce((acc, funder) => { + let firstLetter = funder['name'][0].toLocaleUpperCase(); + if(!acc[firstLetter]) { + acc[firstLetter] = {group: firstLetter, data: [funder]}; + } else { + acc[firstLetter].data.push(funder); + } + return acc; + },{}) + ) + if(funders.length > 1) { + this.groupedFunders.unshift({group: 'All', data: funders}); + } + } + + private calculateSum(array, property) { + let sum = 0; + array.forEach(element => { + sum += element[property]; + }); + return sum; + } + + private calculateNumbers() { + this.fundersNumber = this.funders.length; + this.researchProductsNumber = this.calculateSum(this.funders, 'researchProducts'); + this.projectsNumber = this.calculateSum(this.funders, 'projects'); + } + + get showContentWithNumbers() { + return this.fundersNumber && this.researchProductsNumber && this.projectsNumber; + } + + formatNumber(num: number | string) { + let formatted = NumberUtils.roundNumber(+num); + return formatted.number + formatted.size; + } + + changeDisplayedFunders(i) { + this.currentPage = 1; + this.index = i; + } + + urlEncodeAndQuote(str: string): string { + return StringUtils.quote(StringUtils.URIEncode(str)); + } + + sortByChanged() { + let displayedFunders = this.funders; + if(this.sortBy == 'dashboard') { + displayedFunders = this.funders.filter(funder => funder.monitorDashboard && funder.monitorDashboard?.length > 0 && funder.monitorDashboardStatus != 'PRIVATE'); + } + this.currentPage = 1; + this.groupFunders(displayedFunders); + } + + public updateCurrentPage($event) { + this.currentPage = $event.value; + HelperFunctions.scrollToId('target'); + } +} diff --git a/explore/src/app/funders/funders.module.ts b/explore/src/app/funders/funders.module.ts new file mode 100644 index 00000000..dbaa3bbf --- /dev/null +++ b/explore/src/app/funders/funders.module.ts @@ -0,0 +1,46 @@ +import {NgModule} from '@angular/core'; +import {CommonModule} from '@angular/common'; +import {RouterModule} from '@angular/router'; + +import {FundersComponent} from './funders.component'; +import {FundersRoutingModule} from "./funders-routing.module"; +import {AlertModalModule} from "../openaireLibrary/utils/modal/alertModal.module"; +import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service"; +import {IsRouteEnabled} from "../openaireLibrary/error/isRouteEnabled.guard"; +import {Schema2jsonldModule} from "../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module"; +import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module"; +import {BreadcrumbsModule} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.module"; +import {LoadingModule} from "../openaireLibrary/utils/loading/loading.module"; +import {RefineFieldResultsServiceModule} from '../openaireLibrary/services/refineFieldResultsService.module'; +import {LogoUrlPipeModule} from '../openaireLibrary/utils/pipes/logoUrlPipe.module'; +import {IconsModule} from '../openaireLibrary/utils/icons/icons.module'; +import {IconsService} from '../openaireLibrary/utils/icons/icons.service'; +import {open_access} from '../openaireLibrary/utils/icons/icons'; +import {closed_access} from '../openaireLibrary/utils/icons/icons'; +import {InputModule} from '../openaireLibrary/sharedComponents/input/input.module'; +import {PagingModule} from '../openaireLibrary/utils/paging.module'; + + +@NgModule({ + imports: [ + FundersRoutingModule, CommonModule, RouterModule, AlertModalModule, + Schema2jsonldModule, SEOServiceModule, BreadcrumbsModule, LoadingModule, + RefineFieldResultsServiceModule, LogoUrlPipeModule, IconsModule, InputModule, + PagingModule + ], + declarations: [ + FundersComponent + ], + providers: [ + PiwikService, IsRouteEnabled + ], + exports: [ + FundersComponent + ] +}) + +export class FundersModule { + constructor(private iconsService: IconsService) { + this.iconsService.registerIcons([open_access, closed_access]); + } +} diff --git a/explore/src/app/home/home.component.html b/explore/src/app/home/home.component.html index 32267eec..70963c48 100644 --- a/explore/src/app/home/home.component.html +++ b/explore/src/app/home/home.component.html @@ -15,18 +15,27 @@ Discover open linked research. -
- - +
+ + + + + +
+ +
@@ -251,16 +260,16 @@

Linked Open Research.

- EXPLORE is built on the OpenAIRE Research Graph, one of the largest + EXPLORE is built on the OpenAIRE Graph, one of the largest open scholarly record collections worldwide. Conceived as a public and transparent good, populated out of data sources trusted by scientists, the - OpenAIRE Research Graph brings discovery, monitoring, and assessment of science + OpenAIRE Graph brings discovery, monitoring, and assessment of science back in the hands of the scientific community.
- ipad + ipad
@@ -269,10 +278,10 @@
- Within a constantly emerging scholarly communication environment, the OpenAIRE Research Graph is a moving target, continuously integrating new sources, new types or research objects, and embedding access measures. We therefore welcome the community to work with us to improve all its aspects: its coverage (geographic and thematic), quality (disambiguation and semantics) and access (APIs). + Within a constantly emerging scholarly communication environment, the OpenAIRE Graph is a moving target, continuously integrating new sources, new types or research objects, and embedding access measures. We therefore welcome the community to work with us to improve all its aspects: its coverage (geographic and thematic), quality (disambiguation and semantics) and access (APIs).
- Find information about the OpenAIRE Research Graph, how to test it and contribute to improving it. + Find information about the OpenAIRE Graph, how to test it and contribute to improving it.
diff --git a/explore/src/app/home/home.component.ts b/explore/src/app/home/home.component.ts index 5881989e..c05576ed 100644 --- a/explore/src/app/home/home.component.ts +++ b/explore/src/app/home/home.component.ts @@ -157,7 +157,7 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit { {value: "lcsh:Technology", label: "Technology"}, ]; stringUtils = new StringUtils(); - disableSelect: boolean = true; + // disableSelect: boolean = true; constructor( private _router: Router, @@ -340,48 +340,48 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit { this.selectedEntityAdvancedUrl = $event.advancedUrl; } - goTo(simple: boolean) { - let url = (simple) ? this.selectedEntitySimpleUrl : this.selectedEntityAdvancedUrl; + goTo() { + console.log('goto()'); let parameterNames = []; let parameterValues = []; - if (this.selectedEntity == "result") { - if (this.resultTypes) { - let values = []; - for (let value of this.resultTypes.values) { - if (value.selected) { - values.push(value.id); - } - } - if (values.length > 0 && values.length != 4) { - parameterNames.push("type"); - parameterValues.push(values.join(",")); - } - if (this.resultsQuickFilter && this.resultsQuickFilter.selected) { - parameterNames.push(this.resultsQuickFilter.filterId); - parameterValues.push('"' + encodeURIComponent(this.resultsQuickFilter.value) + '"'); - } - } - } else if (this.selectedEntity == "all") { - if (this.resultsQuickFilter && this.resultsQuickFilter.selected) { - parameterNames.push(this.resultsQuickFilter.filterId); - parameterValues.push('"' + encodeURIComponent(this.resultsQuickFilter.value) + '"'); - } + // if (this.selectedEntity == "result") { + // if (this.resultTypes) { + // let values = []; + // for (let value of this.resultTypes.values) { + // if (value.selected) { + // values.push(value.id); + // } + // } + // if (values.length > 0 && values.length != 4) { + // parameterNames.push("type"); + // parameterValues.push(values.join(",")); + // } + // if (this.resultsQuickFilter && this.resultsQuickFilter.selected) { + // parameterNames.push(this.resultsQuickFilter.filterId); + // parameterValues.push('"' + encodeURIComponent(this.resultsQuickFilter.value) + '"'); + // } + // } + // } else if (this.selectedEntity == "all") { + if (this.resultsQuickFilter && this.resultsQuickFilter.selected) { + parameterNames.push(this.resultsQuickFilter.filterId); + parameterValues.push('"' + encodeURIComponent(this.resultsQuickFilter.value) + '"'); } + // } if (this.keyword.length > 0) { parameterNames.push("fv0"); parameterValues.push(this.keyword); parameterNames.push("f0"); parameterValues.push("q"); } - this._router.navigate([url], {queryParams: this.routerHelper.createQueryParams(parameterNames, parameterValues)}); + this._router.navigate([this.properties.searchLinkToAll], {queryParams: this.routerHelper.createQueryParams(parameterNames, parameterValues)}); } getSubjectParameter(param) { return {'f0': 'resultsubject', 'fv0': '"' + (param) + '"', size: 50}; } - disableSelectChange(event: boolean) { - this.disableSelect = event; - this.cdr.detectChanges(); - } + // disableSelectChange(event: boolean) { + // this.disableSelect = event; + // this.cdr.detectChanges(); + // } } diff --git a/explore/src/app/home/home.module.ts b/explore/src/app/home/home.module.ts index 6749b66b..a51ac75b 100644 --- a/explore/src/app/home/home.module.ts +++ b/explore/src/app/home/home.module.ts @@ -27,6 +27,7 @@ import {book, cog, database, earth} from "../openaireLibrary/utils/icons/icons"; import {NumbersModule} from "../openaireLibrary/sharedComponents/numbers/numbers.module"; import {AdvancedSearchInputModule} from "../openaireLibrary/sharedComponents/advanced-search-input/advanced-search-input.module"; import {InputModule} from "../openaireLibrary/sharedComponents/input/input.module"; +import {SearchInputModule} from "../openaireLibrary/sharedComponents/search-input/search-input.module"; @NgModule({ imports: [ @@ -37,7 +38,7 @@ import {InputModule} from "../openaireLibrary/sharedComponents/input/input.modul PiwikServiceModule, HomeRoutingModule, HelperModule, - SEOServiceModule, OtherPortalsModule, EntitiesSelectionModule, QuickSelectionsModule, IconsModule, NumbersModule, AdvancedSearchInputModule, InputModule + SEOServiceModule, OtherPortalsModule, EntitiesSelectionModule, QuickSelectionsModule, IconsModule, NumbersModule, AdvancedSearchInputModule, InputModule, SearchInputModule ], declarations: [ HomeComponent diff --git a/explore/src/app/openaireLibrary b/explore/src/app/openaireLibrary index da144c1c..13b7f907 160000 --- a/explore/src/app/openaireLibrary +++ b/explore/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit da144c1c77012fa4489dd84f013d499f9df8f72a +Subproject commit 13b7f90707e39e18bfb0dd2bdd19fccc59468490 diff --git a/explore/src/assets/common-assets b/explore/src/assets/common-assets index cd44ace5..4906712f 160000 --- a/explore/src/assets/common-assets +++ b/explore/src/assets/common-assets @@ -1 +1 @@ -Subproject commit cd44ace5d067999ed6d852f20204d5a05385580b +Subproject commit 4906712fb9b0abcdc61cceecd8e6b01910222211 diff --git a/explore/src/assets/explore-assets/funders/coins.svg b/explore/src/assets/explore-assets/funders/coins.svg new file mode 100644 index 00000000..6b3d73fb --- /dev/null +++ b/explore/src/assets/explore-assets/funders/coins.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/explore/src/assets/explore-assets/funders/funders.png b/explore/src/assets/explore-assets/funders/funders.png new file mode 100644 index 00000000..0ff764f5 Binary files /dev/null and b/explore/src/assets/explore-assets/funders/funders.png differ diff --git a/explore/src/assets/explore-assets/funders/handshake.svg b/explore/src/assets/explore-assets/funders/handshake.svg new file mode 100644 index 00000000..03470325 --- /dev/null +++ b/explore/src/assets/explore-assets/funders/handshake.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/explore/src/assets/explore-assets/home/graph.svg b/explore/src/assets/explore-assets/home/graph.svg deleted file mode 100644 index a86312f3..00000000 --- a/explore/src/assets/explore-assets/home/graph.svg +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/explore/src/assets/explore-custom.less b/explore/src/assets/explore-custom.less index e5899a09..3109db9f 100644 --- a/explore/src/assets/explore-custom.less +++ b/explore/src/assets/explore-custom.less @@ -23,12 +23,24 @@ /* Label */ @label-secondary-color: @explore-color; +/* Subnav */ +@subnav-pill-alt-item-active-background: @explore-color; +@subnav-pill-alt-item-active-background-gradient: none; + /* General */ @general-tab-featured-tab: @explore-color; /* Landing */ @landing-portal-color: @explore-color; -.deposit { +.deposit, .funders { @import (multiple) "~src/assets/openaire-theme/less/_import"; } + +.monitor-dashboard-link { + color: @monitor-color; +} + +.funders-title { + color: @primary-color; +} diff --git a/explore/src/assets/openaire-theme b/explore/src/assets/openaire-theme index 99ecab0b..7ce16ab4 160000 --- a/explore/src/assets/openaire-theme +++ b/explore/src/assets/openaire-theme @@ -1 +1 @@ -Subproject commit 99ecab0b4e9ceed21424c8fa26ef270b4695b11e +Subproject commit 7ce16ab4b2129da7dc7a30dbc7c8f501ade0fc3b diff --git a/explore/src/environments/environment.beta.ts b/explore/src/environments/environment.beta.ts index 1754c11e..9f183019 100644 --- a/explore/src/environments/environment.beta.ts +++ b/explore/src/environments/environment.beta.ts @@ -12,6 +12,7 @@ export let properties: EnvProperties = { statisticsAPIURL: "https://beta.services.openaire.eu/stats-api/", statisticsFrameAPIURL: "https://beta.openaire.eu/stats/", statisticsFrameNewAPIURL: "https://beta.services.openaire.eu/stats-tool/", + bipFrameAPIURL: "https://bip.imsi.athenarc.gr/api/impact-chart?id=", useNewStatistisTool: true, claimsAPIURL: "https://beta.services.openaire.eu/claims/rest/claimsService/", searchAPIURLLAst: "https://beta.services.openaire.eu/search/v2/api/", @@ -60,6 +61,7 @@ export let properties: EnvProperties = { datasourcesAPI: "https://beta.services.openaire.eu/openaire/ds/api/", + monitorServiceAPIURL: "https://beta.services.openaire.eu/uoa-monitor-service", adminToolsAPIURL: "https://beta.services.openaire.eu/uoa-admin-tools/", adminToolsCommunity: "openaire", @@ -82,6 +84,7 @@ export let properties: EnvProperties = { searchLinkToOrp: "/search/other?orpId=", searchLinkToOrganization: "/search/organization?organizationId=", + searchLinkToAll: "/search/find/", searchLinkToPublications: "/search/find/publications", searchLinkToDataProviders: "/search/find/dataproviders", searchLinkToProjects: "/search/find/projects", diff --git a/explore/src/environments/environment.prod.ts b/explore/src/environments/environment.prod.ts index ae4ab27e..084c6848 100644 --- a/explore/src/environments/environment.prod.ts +++ b/explore/src/environments/environment.prod.ts @@ -12,6 +12,7 @@ export let properties: EnvProperties = { statisticsAPIURL: "https://beta.services.openaire.eu/stats-api/", statisticsFrameAPIURL: "https://www.openaire.eu/stats/", statisticsFrameNewAPIURL: "https://services.openaire.eu/stats-tool/", + bipFrameAPIURL: "https://bip.imsi.athenarc.gr/api/impact-chart?id=", useNewStatistisTool: true, claimsAPIURL: "https://services.openaire.eu/claims/rest/claimsService/", searchAPIURLLAst: "https://services.openaire.eu/search/v2/api/", @@ -64,6 +65,7 @@ export let properties: EnvProperties = { datasourcesAPI: "https://services.openaire.eu/openaire/ds/api/", + monitorServiceAPIURL: "https://services.openaire.eu/uoa-monitor-service", adminToolsAPIURL: "https://services.openaire.eu/uoa-admin-tools/", adminToolsCommunity: "openaire", @@ -87,6 +89,7 @@ export let properties: EnvProperties = { searchLinkToOrp: "/search/other?orpId=", searchLinkToOrganization: "/search/organization?organizationId=", + searchLinkToAll: "/search/find/", searchLinkToPublications: "/search/find/publications", searchLinkToDataProviders: "/search/find/dataproviders", searchLinkToProjects: "/search/find/projects", diff --git a/explore/src/environments/environment.test.ts b/explore/src/environments/environment.test.ts index 0af87fef..39cd12d1 100644 --- a/explore/src/environments/environment.test.ts +++ b/explore/src/environments/environment.test.ts @@ -86,6 +86,7 @@ export let properties: EnvProperties = { searchLinkToOrp: "/search/other?orpId=", searchLinkToOrganization: "/search/organization?organizationId=", + searchLinkToAll: "/search/find/", searchLinkToPublications: "/search/find/publications", searchLinkToDataProviders: "/search/find/dataproviders", searchLinkToProjects: "/search/find/projects", diff --git a/explore/src/environments/environment.ts b/explore/src/environments/environment.ts index b8789608..4ebf0dca 100644 --- a/explore/src/environments/environment.ts +++ b/explore/src/environments/environment.ts @@ -17,6 +17,7 @@ export let properties: EnvProperties = { statisticsAPIURL: "http://vatopedi.di.uoa.gr:8080/stats/", statisticsFrameAPIURL: "https://beta.openaire.eu/stats/", statisticsFrameNewAPIURL: "https://stats.madgik.di.uoa.gr/stats-api/", + bipFrameAPIURL: "https://bip.imsi.athenarc.gr/api/impact-chart?id=", useNewStatistisTool: true, claimsAPIURL: "http://rudie.di.uoa.gr:8980/dnet-claims-service-2.0.0-SNAPSHOT/rest/claimsService/", // claimsAPIURL: "http://dl170.madgik.di.uoa.gr:8180/dnet-claims-service-2.0.0-SNAPSHOT/rest/claimsService/", @@ -65,6 +66,7 @@ export let properties: EnvProperties = { cacheUrl: "http://dl170.madgik.di.uoa.gr:3000/get?url=", + monitorServiceAPIURL: "http://duffy.di.uoa.gr:19380/uoa-monitor-service", adminToolsAPIURL: "http://duffy.di.uoa.gr:19280/uoa-admin-tools/", adminToolsCommunity: "openaire", @@ -88,6 +90,7 @@ export let properties: EnvProperties = { searchLinkToOrp: "/search/other?orpId=", searchLinkToOrganization: "/search/organization?organizationId=", + searchLinkToAll: "/search/find/", searchLinkToPublications: "/search/find/publications", searchLinkToDataProviders: "/search/find/dataproviders", searchLinkToProjects: "/search/find/projects", diff --git a/explore/tsconfig.json b/explore/tsconfig.json index fc8b4c1a..f7c5a9bf 100644 --- a/explore/tsconfig.json +++ b/explore/tsconfig.json @@ -18,5 +18,8 @@ "es2018", "dom" ] - } + }, +// "angularCompilerOptions": { +// "strictTemplates": true +// } }