[Library | new-theme]: Organizations: Use openorgs identifier when available | In social sharing button and modal (landing) use OpenaireEntities.
1. organization.service.ts & searchOrganizations.service.ts: When "objIdentifier" starts with "openorgs____", set canonicalId and id to openorgs id. 2. dataProvider.component & organization.component & project.component: In button and modal for social media sharing, use name of entity by OpenaireEntities.
This commit is contained in:
parent
ccd220b68a
commit
14bd18c9d8
|
@ -22,7 +22,7 @@
|
||||||
<!-- Share -->
|
<!-- Share -->
|
||||||
<li class="uk-text-center">
|
<li class="uk-text-center">
|
||||||
<a (click)="openAddThisModal()"
|
<a (click)="openAddThisModal()"
|
||||||
[title]="'Share this '+openaireEntities.PROJECT+' in your social networks'"
|
[title]="'Share this '+openaireEntities.DATASOURCE+' in your social networks'"
|
||||||
[attr.uk-tooltip]="'pos: right; cls: uk-active landing-action-tooltip landing-action-tooltip-portal uk-text-small uk-padding-small'">
|
[attr.uk-tooltip]="'pos: right; cls: uk-active landing-action-tooltip landing-action-tooltip-portal uk-text-small uk-padding-small'">
|
||||||
<span class="uk-icon-button uk-icon landing-action-button landing-action-button-portal">
|
<span class="uk-icon-button uk-icon landing-action-button landing-action-button-portal">
|
||||||
<icon name="share" visuallyHidden="share"></icon>
|
<icon name="share" visuallyHidden="share"></icon>
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
<div class="uk-flex uk-flex-right uk-margin-medium-bottom uk-hidden@s">
|
<div class="uk-flex uk-flex-right uk-margin-medium-bottom uk-hidden@s">
|
||||||
<div>
|
<div>
|
||||||
<a (click)="openAddThisModal()"
|
<a (click)="openAddThisModal()"
|
||||||
[title]="'Share this '+openaireEntities.PROJECT+' in your social networks'"
|
[title]="'Share this '+openaireEntities.DATASOURCE+' in your social networks'"
|
||||||
[attr.uk-tooltip]="'pos: right; cls: uk-active landing-action-tooltip landing-action-tooltip-portal uk-text-small uk-padding-small'">
|
[attr.uk-tooltip]="'pos: right; cls: uk-active landing-action-tooltip landing-action-tooltip-portal uk-text-small uk-padding-small'">
|
||||||
<span class="uk-icon-button uk-icon landing-action-button landing-action-button-portal">
|
<span class="uk-icon-button uk-icon landing-action-button landing-action-button-portal">
|
||||||
<icon name="share" visuallyHidden="share"></icon>
|
<icon name="share" visuallyHidden="share"></icon>
|
||||||
|
|
|
@ -683,7 +683,7 @@ export class DataProviderComponent {
|
||||||
public openAddThisModal() {
|
public openAddThisModal() {
|
||||||
this.addThisModal.cancelButton = false;
|
this.addThisModal.cancelButton = false;
|
||||||
this.addThisModal.okButton = false;
|
this.addThisModal.okButton = false;
|
||||||
this.addThisModal.alertTitle = "Share this project in your social networks";
|
this.addThisModal.alertTitle = "Share this "+OpenaireEntities.DATASOURCE+" in your social networks";
|
||||||
this.addThisModal.open();
|
this.addThisModal.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<ul class="uk-list">
|
<ul class="uk-list">
|
||||||
<!-- Share -->
|
<!-- Share -->
|
||||||
<li class="uk-text-center">
|
<li class="uk-text-center">
|
||||||
<a (click)="openAddThisModal()" [title]="'Share this organization in your social networks'"
|
<a (click)="openAddThisModal()" [title]="'Share this '+openaireEntities.ORGANIZATION+' in your social networks'"
|
||||||
[attr.uk-tooltip]="'pos: right; cls: uk-active landing-action-tooltip landing-action-tooltip-portal uk-text-small uk-padding-small'">
|
[attr.uk-tooltip]="'pos: right; cls: uk-active landing-action-tooltip landing-action-tooltip-portal uk-text-small uk-padding-small'">
|
||||||
<span class="uk-icon-button uk-icon landing-action-button landing-action-button-portal">
|
<span class="uk-icon-button uk-icon landing-action-button landing-action-button-portal">
|
||||||
<icon name="share" visuallyHidden="share"></icon>
|
<icon name="share" visuallyHidden="share"></icon>
|
||||||
|
@ -80,7 +80,7 @@
|
||||||
<!-- Actions for mobile viewport -->
|
<!-- Actions for mobile viewport -->
|
||||||
<div class="uk-flex uk-flex-right uk-margin-medium-bottom uk-hidden@s">
|
<div class="uk-flex uk-flex-right uk-margin-medium-bottom uk-hidden@s">
|
||||||
<div class="uk-margin-small-right">
|
<div class="uk-margin-small-right">
|
||||||
<a (click)="openAddThisModal()" [title]="'Share this organization in your social networks'"
|
<a (click)="openAddThisModal()" [title]="'Share this '+openaireEntities.ORGANIZATION+' in your social networks'"
|
||||||
[attr.uk-tooltip]="'pos: right; cls: uk-active landing-action-tooltip landing-action-tooltip-portal uk-text-small uk-padding-small'">
|
[attr.uk-tooltip]="'pos: right; cls: uk-active landing-action-tooltip landing-action-tooltip-portal uk-text-small uk-padding-small'">
|
||||||
<span class="uk-icon-button uk-icon landing-action-button landing-action-button-portal">
|
<span class="uk-icon-button uk-icon landing-action-button landing-action-button-portal">
|
||||||
<icon name="share" visuallyHidden="share"></icon>
|
<icon name="share" visuallyHidden="share"></icon>
|
||||||
|
|
|
@ -686,7 +686,7 @@ export class OrganizationComponent {
|
||||||
public openAddThisModal() {
|
public openAddThisModal() {
|
||||||
this.addThisModal.cancelButton = false;
|
this.addThisModal.cancelButton = false;
|
||||||
this.addThisModal.okButton = false;
|
this.addThisModal.okButton = false;
|
||||||
this.addThisModal.alertTitle = "Share this organization in your social networks";
|
this.addThisModal.alertTitle = "Share this "+OpenaireEntities.ORGANIZATION+" in your social networks";
|
||||||
this.addThisModal.open();
|
this.addThisModal.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<!-- Share -->
|
<!-- Share -->
|
||||||
<li class="uk-text-center">
|
<li class="uk-text-center">
|
||||||
<a (click)="openAddThisModal()"
|
<a (click)="openAddThisModal()"
|
||||||
[title]="'Share this project in your social networks'"
|
[title]="'Share this '+openaireEntities.PROJECT+' in your social networks'"
|
||||||
[attr.uk-tooltip]="'pos: right; cls: uk-active landing-action-tooltip landing-action-tooltip-portal uk-text-small uk-padding-small'">
|
[attr.uk-tooltip]="'pos: right; cls: uk-active landing-action-tooltip landing-action-tooltip-portal uk-text-small uk-padding-small'">
|
||||||
<span class="uk-icon-button uk-icon landing-action-button landing-action-button-portal">
|
<span class="uk-icon-button uk-icon landing-action-button landing-action-button-portal">
|
||||||
<icon name="share" visuallyHidden="share"></icon>
|
<icon name="share" visuallyHidden="share"></icon>
|
||||||
|
@ -120,7 +120,7 @@
|
||||||
<div class="uk-flex uk-flex-right uk-margin-medium-bottom uk-hidden@s">
|
<div class="uk-flex uk-flex-right uk-margin-medium-bottom uk-hidden@s">
|
||||||
<div class="uk-margin-small-right">
|
<div class="uk-margin-small-right">
|
||||||
<a (click)="openAddThisModal()"
|
<a (click)="openAddThisModal()"
|
||||||
[title]="'Share this project in your social networks'"
|
[title]="'Share this '+openaireEntities.PROJECT+' in your social networks'"
|
||||||
[attr.uk-tooltip]="'pos: right; cls: uk-active landing-action-tooltip landing-action-tooltip-portal uk-text-small uk-padding-small'">
|
[attr.uk-tooltip]="'pos: right; cls: uk-active landing-action-tooltip landing-action-tooltip-portal uk-text-small uk-padding-small'">
|
||||||
<span class="uk-icon-button uk-icon landing-action-button landing-action-button-portal">
|
<span class="uk-icon-button uk-icon landing-action-button landing-action-button-portal">
|
||||||
<icon name="share" visuallyHidden="share"></icon>
|
<icon name="share" visuallyHidden="share"></icon>
|
||||||
|
|
|
@ -571,7 +571,7 @@ export class ProjectComponent {
|
||||||
public openAddThisModal() {
|
public openAddThisModal() {
|
||||||
this.addThisModal.cancelButton = false;
|
this.addThisModal.cancelButton = false;
|
||||||
this.addThisModal.okButton = false;
|
this.addThisModal.okButton = false;
|
||||||
this.addThisModal.alertTitle = "Share this project in your social networks";
|
this.addThisModal.alertTitle = "Share this "+OpenaireEntities.PROJECT+" in your social networks";
|
||||||
this.addThisModal.open();
|
this.addThisModal.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,9 @@ export class OrganizationService {
|
||||||
if(data != null) {
|
if(data != null) {
|
||||||
organization = data['result']['metadata']['oaf:entity']['oaf:organization'];
|
organization = data['result']['metadata']['oaf:entity']['oaf:organization'];
|
||||||
this.organizationInfo.objIdentifier = data["result"]["header"]["dri:objIdentifier"];
|
this.organizationInfo.objIdentifier = data["result"]["header"]["dri:objIdentifier"];
|
||||||
|
if(this.organizationInfo.objIdentifier.startsWith("openorgs____::")) {
|
||||||
|
this.organizationInfo.relcanId = this.organizationInfo.objIdentifier;
|
||||||
|
}
|
||||||
relations = data['result']['metadata']['oaf:entity']['oaf:organization']['rels']['rel'];
|
relations = data['result']['metadata']['oaf:entity']['oaf:organization']['rels']['rel'];
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -102,10 +102,12 @@ export class SearchOrganizationsService {
|
||||||
//result['title'].url = OpenaireProperties.getsearchLinkToOrganization();
|
//result['title'].url = OpenaireProperties.getsearchLinkToOrganization();
|
||||||
//result['title'].url += Array.isArray(data) ? data[i]['result']['header']['dri:objIdentifier'] : data['result']['header']['dri:objIdentifier'];
|
//result['title'].url += Array.isArray(data) ? data[i]['result']['header']['dri:objIdentifier'] : data['result']['header']['dri:objIdentifier'];
|
||||||
result['id'] = Array.isArray(data) ? data[i]['result']['header']['dri:objIdentifier'] : data['result']['header']['dri:objIdentifier'];
|
result['id'] = Array.isArray(data) ? data[i]['result']['header']['dri:objIdentifier'] : data['result']['header']['dri:objIdentifier'];
|
||||||
|
if(!result['id'].startsWith("openorgs____::")) {
|
||||||
let canId = ParsingFunctions.parseRelCanonicalId(Array.isArray(data) ? data[i] : data, "organization");
|
let canId = ParsingFunctions.parseRelCanonicalId(Array.isArray(data) ? data[i] : data, "organization");
|
||||||
if(canId){
|
if(canId){
|
||||||
result['id'] = canId;
|
result['id'] = canId;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(resData['rels'].hasOwnProperty("rel")) {
|
if(resData['rels'].hasOwnProperty("rel")) {
|
||||||
let relLength = Array.isArray(resData['rels']['rel']) ? resData['rels']['rel'].length : 1;
|
let relLength = Array.isArray(resData['rels']['rel']) ? resData['rels']['rel'].length : 1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue