diff --git a/explore/src/app/home/home.component.html b/explore/src/app/home/home.component.html
index e84635bf..32267eec 100644
--- a/explore/src/app/home/home.component.html
+++ b/explore/src/app/home/home.component.html
@@ -14,18 +14,7 @@
Discover open linked research.
-
-
- A comprehensive and open dataset of research information covering
- {{numbers.publicationsSize.number|number}}{{numbers.publicationsSize.size}} {{openaireEntities.PUBLICATIONS.toLowerCase()}},
- {{numbers.datasetsSize.number|number}}{{numbers.datasetsSize.size}} {{openaireEntities.DATASETS.toLowerCase()}},
- {{numbers.softwareSize.number|number}}{{numbers.softwareSize.size}} {{openaireEntities.SOFTWARE.toLowerCase()}} items, from
- {{numbers.datasourcesSize.number|number}}{{numbers.datasourcesSize.size}} {{openaireEntities.DATASOURCES.toLowerCase()}}, linked to
- {{numbers.projectsSize.number|number}}{{numbers.projectsSize.size}} grants and
- {{numbers.organizationsSize.number|number}}{{numbers.organizationsSize.size}} {{openaireEntities.ORGANIZATIONS.toLowerCase()}}.
-
-
All linked together through citations and semantics.
-
+
-
+
{{numbers.publicationsSize.number|number}}{{numbers.publicationsSize.size}}
{{openaireEntities.PUBLICATIONS}} deduplicated
+ *ngIf="type=='dataset' && numbersComponent.showDatasets && (numbers?.datasetsLinkedSize || numbers?.datasetsSize)">
{{numbers.datasetsLinkedSize.number|number}}{{numbers.datasetsLinkedSize.size}}
@@ -96,7 +85,7 @@
{{openaireEntities.DATASETS}}
+ *ngIf="type=='software' && numbersComponent.showSoftware && (numbers?.softwareSize || numbers?.softwareLinkedSize)">
{{numbers.softwareLinkedSize.number|number}}{{numbers.softwareLinkedSize.size}}
@@ -108,7 +97,7 @@
Persistent identifiers and registries
-
+
{{numbers.fundersSize.number|number}}{{numbers.fundersSize.size}}
funders and
diff --git a/explore/src/app/home/home.component.ts b/explore/src/app/home/home.component.ts
index e7ea6bd8..5881989e 100644
--- a/explore/src/app/home/home.component.ts
+++ b/explore/src/app/home/home.component.ts
@@ -9,28 +9,21 @@ import {
ViewChild,
ViewChildren
} from '@angular/core';
-import {of, Subscriber, zip} from 'rxjs';
-import {ActivatedRoute, Router} from '@angular/router';
-import {Location} from '@angular/common';
+import {Subscriber} from 'rxjs';
+import {Router} from '@angular/router';
import {Meta, Title} from '@angular/platform-browser';
import {ConfigurationService} from '../openaireLibrary/utils/configuration/configuration.service';
-import {SearchDataprovidersService} from '../openaireLibrary/services/searchDataproviders.service';
-import {SearchProjectsService} from '../openaireLibrary/services/searchProjects.service';
-import {SearchOrganizationsService} from '../openaireLibrary/services/searchOrganizations.service';
-import {RefineFieldResultsService} from '../openaireLibrary/services/refineFieldResults.service';
import {OpenaireEntities, SearchFields} from '../openaireLibrary/utils/properties/searchFields';
import {RouterHelper} from '../openaireLibrary/utils/routerHelper.class';
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
import {ErrorCodes} from '../openaireLibrary/utils/properties/errorCodes';
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
import {SEOService} from '../openaireLibrary/sharedComponents/SEO/SEO.service';
-import {SearchResearchResultsService} from "../openaireLibrary/services/searchResearchResults.service";
import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
import {Filter} from "../openaireLibrary/searchPages/searchUtils/searchHelperClasses.class";
import {properties} from "../../environments/environment";
import {Numbers, NumbersComponent} from "../openaireLibrary/sharedComponents/numbers/numbers.component";
import {StringUtils} from "../openaireLibrary/utils/string-utils.class";
-import {NumberUtils} from '../openaireLibrary/utils/number-utils.class';
import {QuickContactService} from '../openaireLibrary/sharedComponents/quick-contact/quick-contact.service';
@Component({
@@ -93,7 +86,6 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit {
"logo-dryad.png"
]
],
- //"other": [],
"persistent": [
[
"logo-re3data.png",
@@ -120,29 +112,19 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit {
]
]
};
-
public pageTitle = "OpenAIRE";
public keyword: string = "";
-
public searchFields: SearchFields = new SearchFields();
public errorCodes: ErrorCodes = new ErrorCodes();
public routerHelper: RouterHelper = new RouterHelper();
public numbers: Numbers = {};
- showPublications: boolean = false;
- showDatasets: boolean = false;
- showSoftware: boolean = false;
- showOrp: boolean = false;
- showProjects: boolean = false;
- showDataProviders: boolean = false;
- showOrganizations: boolean = false;
- properties: EnvProperties = properties;
+ public properties: EnvProperties = properties;
public openaireEntities = OpenaireEntities;
public readMore: boolean = false;
public showQuickContact: boolean;
@ViewChild('contact') contact: ElementRef;
subscriptions: any[] = [];
@ViewChildren('scrolling_element') elements: QueryList;
-
resultsQuickFilter: { filter: Filter, selected: boolean, filterId: string, value: string } = {
filter: null,
selected: true,
@@ -173,27 +155,13 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit {
{value: "lcsh:Chemistry", label: "Chemistry"},
{value: "lcsh:Engineering (General). Civil engineering (General)", label: "Civil engineering"},
{value: "lcsh:Technology", label: "Technology"},
- /* "Mathematics::Combinatorics",
- "lcsh:Medicine",
- "lcsh:Science",
- "lcsh:Biology (General)",
- "lcsh:Chemistry",
- "lcsh:Engineering (General). Civil engineering (General)",
- "lcsh:Technology"*/
];
stringUtils = new StringUtils();
disableSelect: boolean = true;
-
constructor(
- private route: ActivatedRoute,
private _router: Router,
- private searchResearchResultsService: SearchResearchResultsService,
- private searchDataprovidersService: SearchDataprovidersService,
- private searchProjectsService: SearchProjectsService,
- private searchOrganizationsService: SearchOrganizationsService,
- private refineFieldResultsService: RefineFieldResultsService,
- private location: Location, private _piwikService: PiwikService,
+ private _piwikService: PiwikService,
private config: ConfigurationService, private _meta: Meta, private _title: Title, private seoService: SEOService,
private helper: HelperService,
private cdr: ChangeDetectorRef,
@@ -248,21 +216,31 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit {
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.subscriptions.push(this._piwikService.trackView(this.properties, "OpenAIRE").subscribe());
}
- //this.config.getCommunityInformation(this.properties, this.properties.adminToolsCommunity ).subscribe(data => {
+ if(this.numbersComponent) {
+ this.numbersComponent.showPublications = false;
+ this.numbersComponent.showDatasets = false;
+ this.numbersComponent.showSoftware = false;
+ this.numbersComponent.showOrp = false;
+ this.numbersComponent.showProjects = false;
+ this.numbersComponent.showDataProviders = false;
+ this.numbersComponent.showOrganizations = false;
+ }
this.subscriptions.push(this.config.communityInformationState.subscribe(data => {
- if (data) {
+ if(data) {
var showEntity = {};
for (var i = 0; i < data['entities'].length; i++) {
showEntity["" + data['entities'][i]["pid"] + ""] = data['entities'][i]["isEnabled"];
}
- this.showPublications = !!showEntity["publication"];
- this.showDatasets = !!showEntity["dataset"];
- this.showSoftware = !!showEntity["software"];
- this.showOrp = !!showEntity["orp"];
- this.showProjects = !!showEntity["project"];
- this.showDataProviders = !!showEntity["datasource"];
- this.showOrganizations = !!showEntity["organization"];
- if (this.showPublications) {
+ if(this.numbersComponent) {
+ this.numbersComponent.showPublications = !!showEntity["publication"];
+ this.numbersComponent.showDatasets = !!showEntity["dataset"];
+ this.numbersComponent.showSoftware = !!showEntity["software"];
+ this.numbersComponent.showOrp = !!showEntity["orp"];
+ this.numbersComponent.showProjects = !!showEntity["project"];
+ this.numbersComponent.showDataProviders = !!showEntity["datasource"];
+ this.numbersComponent.showOrganizations = !!showEntity["organization"];
+ }
+ if(this.numbersComponent && this.numbersComponent.showPublications) {
this.resultTypes.values.push({
name: this.openaireEntities.PUBLICATIONS,
id: "publications",
@@ -270,7 +248,7 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit {
number: 0
});
}
- if (this.showDatasets) {
+ if(this.numbersComponent && this.numbersComponent.showDatasets) {
this.resultTypes.values.push({
name: this.openaireEntities.DATASETS,
id: "datasets",
@@ -278,7 +256,7 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit {
number: 0
});
}
- if (this.showSoftware) {
+ if(this.numbersComponent && this.numbersComponent.showSoftware) {
this.resultTypes.values.push({
name: this.openaireEntities.SOFTWARE,
id: "software",
@@ -286,10 +264,12 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit {
number: 0
});
}
- if (this.showOrp) {
+ if(this.numbersComponent && this.numbersComponent.showOrp) {
this.resultTypes.values.push({name: this.openaireEntities.OTHER, id: "other", selected: false, number: 0});
}
- this.init(this.showDatasets, this.showSoftware, this.showPublications, this.showDatasets, this.showSoftware, this.showOrp, this.showProjects, this.showDataProviders, this.showOrganizations);
+ if(this.numbersComponent) {
+ this.numbersComponent.init(this.numbersComponent.showDatasets, this.numbersComponent.showSoftware, this.numbersComponent.showPublications, this.numbersComponent.showDatasets, this.numbersComponent.showSoftware, this.numbersComponent.showOrp, this.numbersComponent.showProjects, this.numbersComponent.showDataProviders, this.numbersComponent.showOrganizations);
+ }
}
},
error => {
@@ -400,62 +380,8 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit {
return {'f0': 'resultsubject', 'fv0': '"' + (param) + '"', size: 50};
}
- init(getDatasetsLinked = false, getSoftwareLinked = false, getPublications = true, getDatasets = true,
- getSoftware = true, getOther = true, getProjects = true, getDataProviders = true, getOrganizations = true, refineValue: string = null) {
- this.subscriptions.push(zip(
- (getPublications) ? this.searchResearchResultsService.numOfSearchResults('publication', '', this.properties, null) : of(0),
- (getDatasets) ? this.searchResearchResultsService.numOfSearchResults('dataset', '', this.properties, null) : of(0),
- (getDatasetsLinked) ? this.searchResearchResultsService.numOfSearchResultsLinkedToPub("dataset", this.properties) : of(0),
- (getSoftware) ? this.searchResearchResultsService.numOfSearchResults('software', '', this.properties, null) : of(0),
- (getSoftwareLinked) ? this.searchResearchResultsService.numOfSearchResultsLinkedToPub("software", this.properties) : of(0),
- (getOther) ? this.searchResearchResultsService.numOfSearchResults('other', '', this.properties, null) : of(0),
- (getProjects) ? this.refineFieldResultsService.getRefineFieldsResultsByEntityName(['funder'], 'project', this.properties, null) : of(0),
- (getDataProviders) ? this.searchDataprovidersService.numOfSearchDataproviders('', this.properties, null) : of(0),
- (getOrganizations) ? this.searchOrganizationsService.numOfSearchOrganizations2('', this.properties, null) : of(0)
- ).subscribe((data: any[]) => {
- if (data[0] && data[0] > 0) {
- this.numbers.publicationsSize = NumberUtils.roundNumber(data[0]);
- }
- if (data[1] && data[1] > 0) {
- this.numbers.datasetsSize = NumberUtils.roundNumber(data[1]);
- }
- if (data[2] && data[2] > 0) {
- this.numbers.datasetsLinkedSize = NumberUtils.roundNumber(data[2]);
- }
- if (data[3] && data[3] > 0) {
- this.numbers.softwareSize = NumberUtils.roundNumber(data[3]);
- }
- if (data[4] && data[4] > 0) {
- this.numbers.softwareLinkedSize = NumberUtils.roundNumber(data[4]);
- }
- if (data[5] && data[5] > 0) {
- this.numbers.otherSize = NumberUtils.roundNumber(data[5]);
- }
- if (data[6][0] && data[6][0] > 0) {
- this.numbers.projectsSize = NumberUtils.roundNumber(data[6][0]);
- }
- if (data[6][1] && data[6][1].length > 0 && data[6][1][0].filterId == 'funder' && data[6][1][0].values) {
- this.numbers.fundersSize = NumberUtils.roundNumber(data[6][1][0].values.length);
- }
- if (data[7] && data[7] > 0) {
- this.numbers.datasourcesSize = NumberUtils.roundNumber(data[7]);
- }
- if (data[8] && data[8] > 0) {
- this.numbers.organizationsSize = NumberUtils.roundNumber(data[8]);
- }
- }, err => {
- this.handleError('Error getting numbers', err);
- }));
- }
-
disableSelectChange(event: boolean) {
this.disableSelect = event;
this.cdr.detectChanges();
}
-
- public get showContentWithNumbers() {
- if (this.numbers && this.numbers.publicationsSize && this.numbers.datasetsSize && this.numbers.softwareSize && this.numbers.datasourcesSize && this.numbers.projectsSize && this.numbers.organizationsSize) {
- return true;
- }
- }
}
diff --git a/explore/src/app/openaireLibrary b/explore/src/app/openaireLibrary
index 97c350df..a2fea9e3 160000
--- a/explore/src/app/openaireLibrary
+++ b/explore/src/app/openaireLibrary
@@ -1 +1 @@
-Subproject commit 97c350dfeccad759ce37b04e50306e80a4ad2f15
+Subproject commit a2fea9e32331de06ab2192e3e638662531b9f42f
diff --git a/explore/src/assets/common-assets b/explore/src/assets/common-assets
index 3ec9d00b..06e18897 160000
--- a/explore/src/assets/common-assets
+++ b/explore/src/assets/common-assets
@@ -1 +1 @@
-Subproject commit 3ec9d00bc4b794ae782b163a1a17886bd83534f4
+Subproject commit 06e1889730e456e86f728a31410bf550d16ac7d6
diff --git a/explore/src/assets/openaire-theme b/explore/src/assets/openaire-theme
index 67483e8b..e3e2a6ec 160000
--- a/explore/src/assets/openaire-theme
+++ b/explore/src/assets/openaire-theme
@@ -1 +1 @@
-Subproject commit 67483e8b95c23aa8dcb2d1203e1fe89a4d7f033f
+Subproject commit e3e2a6ec11055f4d4352d0749bb1b484ddd711ae