From 3d296f32348572778614f1721ac1e877672301e0 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Mon, 20 Feb 2023 18:17:30 +0200 Subject: [PATCH] Add organizations in entity-metadata --- .../entity-metadata.component.ts | 66 ++++++++++--------- .../result-preview.component.html | 12 +--- 2 files changed, 37 insertions(+), 41 deletions(-) diff --git a/landingPages/landing-utils/entity-metadata.component.ts b/landingPages/landing-utils/entity-metadata.component.ts index c098253d..0a50f46c 100644 --- a/landingPages/landing-utils/entity-metadata.component.ts +++ b/landingPages/landing-utils/entity-metadata.component.ts @@ -2,7 +2,7 @@ import {Component, Input} from "@angular/core"; import {EnvProperties} from "../../utils/properties/env-properties"; import {properties} from "../../../../environments/environment"; import {OpenaireEntities} from "../../utils/properties/searchFields"; -import {Project} from "../../utils/result-preview/result-preview"; +import {Organization, Project} from "../../utils/result-preview/result-preview"; @Component({ selector: 'entity-metadata', @@ -132,35 +132,6 @@ import {Project} from "../../utils/result-preview/result-preview"; {{programmingLanguage}} - - - - - - - {{project.funderShortname ? project.funderShortname : project.funderName}} - - - | {{ project.acronym ? project.acronym : (project.title.length > 25 ? - project.title.substring(0, 25) + '...' : project.title)}} - - ({{project.code}}) - , - - ... - - - - - - - - {{subject}} - {{(i < (subjects.slice(0, 10).length - 1)) ? ", " : ""}} - {{(i == subjects.slice(0, 10).length - 1 && subjects.length > 10) ? "..." : ""}} - - - @@ -198,6 +169,40 @@ import {Project} from "../../utils/result-preview/result-preview"; Thematic + + + + + + {{project.funderShortname ? project.funderShortname : project.funderName}} + + + | {{ project.acronym ? project.acronym : (project.title.length > 25 ? + project.title.substring(0, 25) + '...' : project.title)}} + + ({{project.code}}) + , + + ... + + + + + + {{organization.name}} + , + + ... + + + + + + {{subject}} + {{(i < (subjects.slice(0, 10).length - 1)) ? "," : ""}} + + ... + {{provenanceAction}} @@ -237,6 +242,7 @@ export class EntityMetadataComponent { @Input() provenanceAction: string; // search result @Input() relationName: string; // search result @Input() projects: Project[]; + @Input() organizations: Organization[]; @Input() subjects: string[]; properties: EnvProperties = properties; diff --git a/utils/result-preview/result-preview.component.html b/utils/result-preview/result-preview.component.html index 125b772e..9e4e1132 100644 --- a/utils/result-preview/result-preview.component.html +++ b/utils/result-preview/result-preview.component.html @@ -76,7 +76,7 @@ [publisher]="result.publisher" [countries]="result.countries" [languages]="result.languages" [programmingLanguages]="result.programmingLanguages" [compatibilityString]="result.compatibility" [type]="type" [projects]="result.projects" - [subjects]="result.subjects" + [subjects]="showSubjects?result.subjects:null" [organizations]="showOrganizations?result.organizations:null" > @@ -120,16 +120,6 @@
- -
- Partners: - - {{organization.name}} - , - - ... -