From db674535655b7d0829299c5b690928fb182f9631 Mon Sep 17 00:00:00 2001 From: "argiro.kokogiannaki" Date: Thu, 6 Jun 2019 09:15:54 +0000 Subject: [PATCH] [Library|Trunk] Landing Page - Organization: use objIdentifier for relcan, parse it and add it in OrganizationInfo class Datasource Refine Fields: add country git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@56005 d315682c-612b-4755-9ff5-7f18f6832af3 --- landingPages/organization/organization.component.ts | 2 +- services/organization.service.ts | 2 +- utils/entities/organizationInfo.ts | 1 + utils/properties/searchFields.ts | 5 +++-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/landingPages/organization/organization.component.ts b/landingPages/organization/organization.component.ts index 281fed76..13ac9312 100644 --- a/landingPages/organization/organization.component.ts +++ b/landingPages/organization/organization.component.ts @@ -201,7 +201,7 @@ export class OrganizationComponent { this.errorMessage = 'No organization found'; } else { this.organizationInfo = data; - this.seoService.createLinkForCanonicalURL(this.properties.baseLink+this._router.url); + this.seoService.createLinkForCanonicalURL(this.properties.baseLink+this.properties.searchLinkToOrganization + this.organizationInfo.objIdentifier); this.updateTitle(this.organizationInfo.title.name); this.updateDescription("Organization, country, "+this.organizationInfo.title.name +((this.organizationInfo.title.name && this.organizationInfo.title.name != this.organizationInfo.name)?(", "+this.organizationInfo.name):"") ); if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){ diff --git a/services/organization.service.ts b/services/organization.service.ts index f236638f..54d625e9 100644 --- a/services/organization.service.ts +++ b/services/organization.service.ts @@ -50,7 +50,7 @@ export class OrganizationService { let organization; let relations; - + this.organizationInfo.objIdentifier = data["result"]["header"]["dri:objIdentifier"]; if(data != null) { organization = data['result']['metadata']['oaf:entity']['oaf:organization']; relations = data['result']['metadata']['oaf:entity']['oaf:organization']['rels']['rel']; diff --git a/utils/entities/organizationInfo.ts b/utils/entities/organizationInfo.ts index 1e72f53c..6550d91e 100644 --- a/utils/entities/organizationInfo.ts +++ b/utils/entities/organizationInfo.ts @@ -2,6 +2,7 @@ export class OrganizationInfo { title: { "name": string, "url": string }; name: string; country: string; + objIdentifier: string; projects: Map