diff --git a/landingPages/dataProvider/dataProvider.component.html b/landingPages/dataProvider/dataProvider.component.html index c7864c13..ea408f67 100644 --- a/landingPages/dataProvider/dataProvider.component.html +++ b/landingPages/dataProvider/dataProvider.component.html @@ -60,77 +60,7 @@
  • Countries: {{dataProviderInfo.countries.join(", ")}}
  • -
    - -
  • - Research Data + Research Data + + {{fetchDatasets.searchUtils.totalResults | number}} + +

    + [paramsForSearchLink]="paramsForSearchLink" + [fetchDatasets]="fetchDatasets" [(properties)]=properties>

  • - Software + Software + + {{fetchSoftware.searchUtils.totalResults | number}} + +
  • - Projects + Projects + + {{fetchProjects.searchUtils.totalResults | number}} + +
  • - Content Providers + Content Providers + + {{fetchDataproviders.searchUtils.totalResults | number}} + +
  • - Organizations + Organizations + + {{dataProviderInfo.organizations.length | number}} + +
    @@ -210,7 +160,7 @@
    - +

    Latest Research Result Timeline

    @@ -259,85 +209,7 @@
  • - - +
    @@ -346,9 +218,9 @@ Share - Bookmark
    - + [id]="datasourceId" [entityType]="'datasources'" [entity]="'Content Provider'" + (metricsResults)="metricsResults($event)" [(properties)] = properties> + diff --git a/landingPages/dataProvider/datasetsTab.component.ts b/landingPages/dataProvider/datasetsTab.component.ts index d48eb521..4ea12491 100644 --- a/landingPages/dataProvider/datasetsTab.component.ts +++ b/landingPages/dataProvider/datasetsTab.component.ts @@ -7,16 +7,7 @@ import{EnvProperties} from '../../utils/properties/env-properties'; @Component({ selector: 'datasetsTab', template: ` - - - - +
    @@ -25,9 +16,9 @@ import{EnvProperties} from '../../utils/properties/env-properties'; View all {{fetchDatasets.searchUtils.totalResults | number}} results
    - +
    ` diff --git a/landingPages/dataProvider/datasourcesTab.component.ts b/landingPages/dataProvider/datasourcesTab.component.ts index e6d7d996..650965ea 100644 --- a/landingPages/dataProvider/datasourcesTab.component.ts +++ b/landingPages/dataProvider/datasourcesTab.component.ts @@ -7,16 +7,7 @@ import{EnvProperties} from '../../utils/properties/env-properties'; @Component({ selector: 'datasourcesTab', template: ` - - - - +
    diff --git a/landingPages/dataProvider/organizationsTab.component.ts b/landingPages/dataProvider/organizationsTab.component.ts index c2581474..c17c4a6c 100644 --- a/landingPages/dataProvider/organizationsTab.component.ts +++ b/landingPages/dataProvider/organizationsTab.component.ts @@ -13,16 +13,16 @@ import {Component, Input} from '@angular/core';
    -
    -

    +

    +

    - {{item['name']}} +

    {{item['name']}}

    -

    -

    - {{item['name']}} -

    +

    +

    +

    {{item['name']}}

    +

    ` diff --git a/landingPages/dataProvider/projectsTab.component.ts b/landingPages/dataProvider/projectsTab.component.ts index f6832c70..054acfdf 100644 --- a/landingPages/dataProvider/projectsTab.component.ts +++ b/landingPages/dataProvider/projectsTab.component.ts @@ -8,15 +8,7 @@ import{EnvProperties} from '../../utils/properties/env-properties'; @Component({ selector: 'projectsTab', template: ` - - - - +
    diff --git a/landingPages/dataProvider/publicationsTab.component.ts b/landingPages/dataProvider/publicationsTab.component.ts index e290b682..b7c18fa4 100644 --- a/landingPages/dataProvider/publicationsTab.component.ts +++ b/landingPages/dataProvider/publicationsTab.component.ts @@ -7,21 +7,10 @@ import{EnvProperties} from '../../utils/properties/env-properties'; @Component({ selector: 'publicationsTab', template: ` - - - - - - +
    - View all {{fetchPublications.searchUtils.totalResults | number}} results diff --git a/landingPages/dataProvider/relatedDatasourcesTab.component.ts b/landingPages/dataProvider/relatedDatasourcesTab.component.ts index 3189433c..ecf62c46 100644 --- a/landingPages/dataProvider/relatedDatasourcesTab.component.ts +++ b/landingPages/dataProvider/relatedDatasourcesTab.component.ts @@ -11,23 +11,7 @@ import{EnvProperties} from '../../utils/properties/env-properties'; @Component({ selector: 'relatedDatasourcesTab', template: ` - - - - - +
    -->
    @@ -224,6 +286,13 @@ +
  • + + +
  • +
    • diff --git a/landingPages/landing-utils/metrics.component.ts b/landingPages/landing-utils/metrics.component.ts index 9a4ccf6c..5df3bdbb 100644 --- a/landingPages/landing-utils/metrics.component.ts +++ b/landingPages/landing-utils/metrics.component.ts @@ -10,68 +10,68 @@ import{EnvProperties} from '../../utils/properties/env-properties'; selector: 'metrics', template: `
      - -
      -
      Project metrics are derived from aggregating individual research results metrics.
      -
      -
      -
      {{pageViews | number}}
      -
      views in OpenAIRE
      + +
      +
      Project metrics are derived from aggregating individual research results metrics.
      +
      +
      +
      {{pageViews | number}}
      +
      views in OpenAIRE
      +
      -
      -
      -
      -
      {{metrics.totalViews | number}} - - ( {{metrics.totalOpenaireViews | number}} from OpenAIRE ) -
      -
      views in local repository
      +
      +
      +
      {{metrics.totalViews | number}} + + ( {{metrics.totalOpenaireViews | number}} from OpenAIRE ) +
      +
      views in local repository
      +
      -
      -
      -
      -
      {{metrics.totalDownloads | number}} - - ( {{metrics.totalOpenaireDownloads | number}} from OpenAIRE ) -
      -
      downloads in local repository
      +
      +
      +
      {{metrics.totalDownloads | number}} + + ( {{metrics.totalOpenaireDownloads | number}} from OpenAIRE ) +
      +
      downloads in local repository
      +
      +
      -
      - -

      The information is available from the following content providers:

      - - - - - - - - - - - - - - - -
      FromNumber Of ViewsNumber Of Downloads
      - - {{metrics.infos.get(key).name}} - - - {{metrics.infos.get(key).numOfViews | number}} - - ( {{metrics.infos.get(key).openaireViews | number}} from OpenAIRE ) - - - {{metrics.infos.get(key).numOfDownloads | number}} - - ( {{metrics.infos.get(key).openaireDownloads | number}} from OpenAIRE ) - -
      +

      The information is available from the following content providers:

      + + + + + + + + + + + + + + + +
      FromNumber Of ViewsNumber Of Downloads
      + + {{metrics.infos.get(key).name}} + + + {{metrics.infos.get(key).numOfViews | number}} + + ( {{metrics.infos.get(key).openaireViews | number}} from OpenAIRE ) + + + {{metrics.infos.get(key).numOfDownloads | number}} + + ( {{metrics.infos.get(key).openaireDownloads | number}} from OpenAIRE ) + +
      @@ -159,4 +159,8 @@ export class MetricsComponent { } ); } + + public getKeys( map) { + return Array.from(map.keys()); + } } diff --git a/landingPages/landing-utils/searchingProjectsInTab.component.ts b/landingPages/landing-utils/searchingProjectsInTab.component.ts index a08d169a..fa830249 100644 --- a/landingPages/landing-utils/searchingProjectsInTab.component.ts +++ b/landingPages/landing-utils/searchingProjectsInTab.component.ts @@ -12,14 +12,7 @@ import{EnvProperties} from '../../utils/properties/env-properties'; @Component({ selector: 'searchingProjectsTab', template: ` - - - +
      diff --git a/landingPages/organization/organization.component.html b/landingPages/organization/organization.component.html index 892facee..ac50a3a0 100644 --- a/landingPages/organization/organization.component.html +++ b/landingPages/organization/organization.component.html @@ -14,6 +14,73 @@ Organization {{organizationInfo.country}} + + + {{fetchProjects.searchUtils.totalResultsNoFilters | number}} @@ -37,18 +103,14 @@ [class]="activeTab == 'Content Providers'?'uk-active':''"> Content Providers - {{fetchDataproviders.searchUtils.totalResults | number}}
    • -
    + --> -
    diff --git a/landingPages/organization/organization.component.ts b/landingPages/organization/organization.component.ts index 3fa0b6ba..9d15c055 100644 --- a/landingPages/organization/organization.component.ts +++ b/landingPages/organization/organization.component.ts @@ -74,7 +74,8 @@ export class OrganizationComponent { //private fundersSet: Set; //private emptyFundersSet: boolean = true; - // Request results for content providers only the one time (first time tab is clicked) + // Request results for publications and content providers only the one time (first time tab is clicked) + private reloadPublications: boolean = true; private reloadDataproviders: boolean = true; // Helper variables to specify funder in downloadPublicationsFile function @@ -197,8 +198,8 @@ export class OrganizationComponent { } var refineFields:string [] = ["funder"]; - this.searchPublications(); - + //this.searchPublications(); + this.fetchPublications.getNumForEntity("organization", this.organizationId, this.properties); this.fetchProjects.getResultsForOrganizations(this.organizationId, "", 1, 0,refineFields,this.properties); this.fetchDataproviders.getNumForEntity("organization", this.organizationId,this.properties); @@ -257,23 +258,30 @@ export class OrganizationComponent { private searchPublications() { this.fetchPublications.getResultsForEntity("organization", this.organizationId, 1, 10,this.properties); this.linkToSearchPublications = this.properties.searchLinkToAdvancedPublications; - if(this.fetchPublications.searchUtils.totalResults > 0) { + //if(this.fetchPublications.searchUtils.totalResults > 0) { + this.reloadPublications = false; //this.activeTab = "Publications"; - } else { + //} else { //this.projectsClicked = true; - } + //} } private searchDataproviders() { this.fetchDataproviders.getResultsForEntity("organization", this.organizationId, 1, 10,this.properties); this.linkToSearchDataproviders = this.properties.searchLinkToAdvancedDataProviders; - if(this.fetchDataproviders.searchUtils.totalResults > 0) { + //if(this.fetchDataproviders.searchUtils.totalResults > 0) { this.reloadDataproviders = false; //this.activeTab = "Content Providers"; - } else { + //} else { - } + //} + } + + public searchPublicationsInit() { + if(this.reloadPublications && this.fetchPublications.searchUtils.totalResults > 0) { + this.searchPublications(); + } } public searchDataprovidersInit() { diff --git a/landingPages/project/project.component.html b/landingPages/project/project.component.html index 9f6b27d7..0d51cc3e 100644 --- a/landingPages/project/project.component.html +++ b/landingPages/project/project.component.html @@ -78,7 +78,127 @@
  • --> - + --> -
    @@ -388,7 +473,10 @@
    - + +
    diff --git a/landingPages/project/project.component.ts b/landingPages/project/project.component.ts index 88678a2f..cff38756 100644 --- a/landingPages/project/project.component.ts +++ b/landingPages/project/project.component.ts @@ -71,7 +71,8 @@ export class ProjectComponent{ // Active tab variable for responsiveness public activeTab: string = "Publications"; - // Request results for research data and software only the one time (first time tab is clicked) + // Request results for publications, research data and software only the one time (first time tab is clicked) + private reloadPublications: boolean = true; private reloadDatasets: boolean = true; private reloadSoftware: boolean = true; @@ -186,7 +187,8 @@ actionsAfterLoadId(){ + "\n"; this.getProjectInfo(this.projectId); - this.searchPublications(); + //this.searchPublications(); + this.fetchPublications.getNumForEntity("project", this.projectId, this.properties); this.fetchDatasets.getNumForEntity("project", this.projectId, this.properties); this.fetchSoftware.getNumForEntity("project", this.projectId, this.properties); } @@ -218,11 +220,12 @@ actionsAfterLoadId(){ private searchPublications() { this.fetchPublications.getResultsForEntity("project", this.projectId, 1, 10, this.properties); this.linkToSearchPublications = this.properties.searchLinkToAdvancedPublications;// + "?project=" + this.projectId+"&pr=and"; - if(this.fetchPublications.searchUtils.totalResults > 0) { + //if(this.fetchPublications.searchUtils.totalResults > 0) { //this.activeTab = "Publications"; - } else { + //} else { //this.searchDatasetsInit(); - } + //} + this.reloadPublications = false; } private searchDatasets() { @@ -239,6 +242,16 @@ actionsAfterLoadId(){ this.reloadSoftware = false; } + public searchPublicationsInit() { + console.info("searchPublicationsInit"); + if(this.reloadPublications && this.fetchPublications.searchUtils.totalResults > 0) { + this.searchPublications(); + } else if(this.fetchPublications.searchUtils.totalResults == 0) { + //this.statsClicked=true; + //this.activeTab = "Statistics"; + } + } + public searchDatasetsInit() { console.info("searchDatasetsInit"); if(this.reloadDatasets && this.fetchDatasets.searchUtils.totalResults > 0) { diff --git a/landingPages/publication/publication.component.html b/landingPages/publication/publication.component.html index afaa40b3..63b323af 100644 --- a/landingPages/publication/publication.component.html +++ b/landingPages/publication/publication.component.html @@ -104,15 +104,253 @@ + + + - + --> - -