[Trunk | Library]:
1. myOrcidLinks.component.ts: a. Added title "My ORCID links". b. Set page metadata (_meta, _title). 2. orcid.component.ts: Set page metadata (_meta, _title). 3. orcid-work.component.ts: move ORCID icon (iD), after word "ORCID". 4. orcidWork.ts: a. Do not map OpenAIRE type "Film" to ORCID type "artistic-performance". b. For each result, map first OpenAIRE type, which is not "other" (if exists). git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60466 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
ea56eda20d
commit
889a58cb37
|
@ -15,6 +15,7 @@ import {LoginErrorCodes} from "../../login/utils/guardHelper.class";
|
||||||
import {SearchResult} from "../../utils/entities/searchResult";
|
import {SearchResult} from "../../utils/entities/searchResult";
|
||||||
import {ResultPreview} from "../../utils/result-preview/result-preview";
|
import {ResultPreview} from "../../utils/result-preview/result-preview";
|
||||||
import {HttpClient} from "@angular/common/http";
|
import {HttpClient} from "@angular/common/http";
|
||||||
|
import {Meta, Title} from "@angular/platform-browser";
|
||||||
|
|
||||||
declare var UIkit: any;
|
declare var UIkit: any;
|
||||||
|
|
||||||
|
@ -31,6 +32,9 @@ declare var UIkit: any;
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<div class="">
|
<div class="">
|
||||||
<div class="uk-container uk-container-large uk-margin-top">
|
<div class="uk-container uk-container-large uk-margin-top">
|
||||||
|
<div class="uk-article-title custom-article-title">
|
||||||
|
My ORCID links
|
||||||
|
</div>
|
||||||
<div *ngIf="showErrorMessage" class="uk-animation-fade uk-alert uk-alert-warning" role="alert">
|
<div *ngIf="showErrorMessage" class="uk-animation-fade uk-alert uk-alert-warning" role="alert">
|
||||||
An Error Occurred
|
An Error Occurred
|
||||||
</div>
|
</div>
|
||||||
|
@ -166,7 +170,8 @@ export class MyOrcidLinksComponent {
|
||||||
|
|
||||||
constructor (private route: ActivatedRoute, private router: Router,
|
constructor (private route: ActivatedRoute, private router: Router,
|
||||||
private _orcidService: OrcidService,
|
private _orcidService: OrcidService,
|
||||||
private _searchResearchResultsService: SearchResearchResultsService
|
private _searchResearchResultsService: SearchResearchResultsService,
|
||||||
|
private _meta: Meta, private _title: Title
|
||||||
// ,private http: HttpClient/*ATHENA CODE*/
|
// ,private http: HttpClient/*ATHENA CODE*/
|
||||||
) {
|
) {
|
||||||
this.errorCodes = new ErrorCodes();
|
this.errorCodes = new ErrorCodes();
|
||||||
|
@ -222,9 +227,14 @@ export class MyOrcidLinksComponent {
|
||||||
// this.typeQuery += "&type=results";
|
// this.typeQuery += "&type=results";
|
||||||
// }
|
// }
|
||||||
|
|
||||||
this.typeQuery = "&type=results";
|
// this.typeQuery = "&type=results";
|
||||||
// this.getLocalWorks(this.currentPage, this.resultsPerPage);
|
// this.getLocalWorks(this.currentPage, this.resultsPerPage);
|
||||||
// }));
|
// }));
|
||||||
|
var description = "Openaire, ORCID linking, publication, research data, software, other research product";
|
||||||
|
this.updateTitle("My ORCID Links");
|
||||||
|
this.updateDescription(description);
|
||||||
|
this.updateUrl( properties.domain + properties.baseLink + this.route.url);
|
||||||
|
|
||||||
this.typeQuery = "&type=results";
|
this.typeQuery = "&type=results";
|
||||||
this.getLocalWorks();
|
this.getLocalWorks();
|
||||||
}
|
}
|
||||||
|
@ -535,4 +545,23 @@ export class MyOrcidLinksComponent {
|
||||||
}
|
}
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private updateTitle(title: string) {
|
||||||
|
var _prefix = "";
|
||||||
|
// if(!this.communityId) {
|
||||||
|
// _prefix = "OpenAIRE | ";
|
||||||
|
// }
|
||||||
|
// var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
|
||||||
|
this._title.setTitle(title);
|
||||||
|
this._meta.updateTag({content: title}, "property='og:title'");
|
||||||
|
}
|
||||||
|
|
||||||
|
private updateDescription(description: string) {
|
||||||
|
this._meta.updateTag({content: description}, "name='description'");
|
||||||
|
this._meta.updateTag({content: description}, "property='og:description'");
|
||||||
|
}
|
||||||
|
|
||||||
|
private updateUrl(url: string) {
|
||||||
|
this._meta.updateTag({content: url}, "property='og:url'");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,8 +44,8 @@ declare var UIkit: any;
|
||||||
<span *ngIf="showLoading" class="uk-icon icon-button"><loading [top_margin]="false"></loading></span>
|
<span *ngIf="showLoading" class="uk-icon icon-button"><loading [top_margin]="false"></loading></span>
|
||||||
<span class="uk-margin-small-left uk-flex uk-flex-middle">Add to
|
<span class="uk-margin-small-left uk-flex uk-flex-middle">Add to
|
||||||
<span class="orcid-color space uk-flex uk-flex-middle">
|
<span class="orcid-color space uk-flex uk-flex-middle">
|
||||||
<img src="assets/common-assets/common/ORCIDiD_icon16x16.png" alt="">{{" "}}
|
<span>ORCID</span>
|
||||||
<span class="space">ORCID</span>
|
<img class="space" src="assets/common-assets/common/ORCIDiD_icon16x16.png" alt="">{{" "}}
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<!-- <span class="uk-margin-small-left">Add to <span class="orcid-color">ORCID</span></span>-->
|
<!-- <span class="uk-margin-small-left">Add to <span class="orcid-color">ORCID</span></span>-->
|
||||||
|
@ -76,8 +76,8 @@ declare var UIkit: any;
|
||||||
<span *ngIf="showLoading" class="uk-icon icon-button"><loading [top_margin]="false"></loading></span>
|
<span *ngIf="showLoading" class="uk-icon icon-button"><loading [top_margin]="false"></loading></span>
|
||||||
<span class="uk-margin-small-left uk-flex uk-flex-middle">Delete from
|
<span class="uk-margin-small-left uk-flex uk-flex-middle">Delete from
|
||||||
<span class="orcid-color space uk-flex uk-flex-middle">
|
<span class="orcid-color space uk-flex uk-flex-middle">
|
||||||
<img src="assets/common-assets/common/ORCIDiD_icon16x16.png" alt="">{{" "}}
|
<span>ORCID</span>
|
||||||
<span class="space">ORCID</span>
|
<img class="space" src="assets/common-assets/common/ORCIDiD_icon16x16.png" alt="">{{" "}}
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
@ -166,21 +166,22 @@ declare var UIkit: any;
|
||||||
<span>Grant OpenAIRE</span>
|
<span>Grant OpenAIRE</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<!-- <button (click)="openGrantWindow()" type="submit"-->
|
<!-- <button (click)="openGrantWindow()" type="submit"-->
|
||||||
<!-- class="uk-button uk-padding-small uk-padding-remove-vertical uk-margin-left orcid-button">-->
|
<!-- class="uk-button uk-padding-small uk-padding-remove-vertical uk-margin-left orcid-button">-->
|
||||||
<!-- <img src="assets/common-assets/common/ORCIDiD_icon16x16.png" alt="">{{" "}}-->
|
<!-- <img src="assets/common-assets/common/ORCIDiD_icon16x16.png" alt="">{{" "}}-->
|
||||||
<!-- <span>Create or Connect your ORCID iD</span>-->
|
<!-- <span>Create or Connect your ORCID iD</span>-->
|
||||||
<!-- </button>-->
|
<!-- </button>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</modal-alert>
|
</modal-alert>
|
||||||
|
|
||||||
|
|
||||||
<ng-container *ngIf="pageType == 'my_search'">
|
<ng-container *ngIf="pageType == 'my_search'">
|
||||||
<div class="uk-margin-bottom uk-text-center">
|
<span class="uk-margin-bottom uk-flex uk-flex-middle uk-flex-center">
|
||||||
<img src="assets/common-assets/common/ORCIDiD_icon16x16.png" alt="">{{" "}}
|
<span>ORCID</span>
|
||||||
ORCID ACTIONS
|
<img class="space" src="assets/common-assets/common/ORCIDiD_icon16x16.png" alt="">
|
||||||
</div>
|
<span class="space">ACTIONS</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
<span [attr.uk-tooltip]="(!putCodes || putCodes.length == 0)
|
<span [attr.uk-tooltip]="(!putCodes || putCodes.length == 0)
|
||||||
? 'This work is currently deleted.'
|
? 'This work is currently deleted.'
|
||||||
|
@ -373,7 +374,7 @@ declare var UIkit: any;
|
||||||
[classBody]="'landing-modal uk-padding-remove'">
|
[classBody]="'landing-modal uk-padding-remove'">
|
||||||
<div class="uk-text-center uk-padding-small">
|
<div class="uk-text-center uk-padding-small">
|
||||||
<div>
|
<div>
|
||||||
It seems than this result in OpenAIRE is the deduplication of multiple harvested results.
|
This result in OpenAIRE is the deduplication of multiple harvested results.
|
||||||
You have already added {{this.putCodes?.length}} works in your ORCID record related to this result.
|
You have already added {{this.putCodes?.length}} works in your ORCID record related to this result.
|
||||||
<div *ngIf="currentAction == 'delete'">
|
<div *ngIf="currentAction == 'delete'">
|
||||||
If you continue with delete action, all these works will be deleted.
|
If you continue with delete action, all these works will be deleted.
|
||||||
|
|
|
@ -4,6 +4,7 @@ import {Subscriber, Subscription} from "rxjs";
|
||||||
import {OrcidService} from "./orcid.service";
|
import {OrcidService} from "./orcid.service";
|
||||||
import {properties} from "../../../environments/environment";
|
import {properties} from "../../../environments/environment";
|
||||||
import {RouterHelper} from "../utils/routerHelper.class";
|
import {RouterHelper} from "../utils/routerHelper.class";
|
||||||
|
import {Meta, Title} from "@angular/platform-browser";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'orcid',
|
selector: 'orcid',
|
||||||
|
@ -31,9 +32,15 @@ export class OrcidComponent {
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute,
|
constructor(private route: ActivatedRoute,
|
||||||
private _router: Router,
|
private _router: Router,
|
||||||
private orcidService: OrcidService) {}
|
private orcidService: OrcidService,
|
||||||
|
private _meta: Meta, private _title: Title) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
var description = "Openaire, ORCID";
|
||||||
|
this.updateTitle("Connect with ORCID");
|
||||||
|
this.updateDescription(description);
|
||||||
|
this.updateUrl( properties.domain + properties.baseLink + this.route.url);
|
||||||
|
|
||||||
this.subscriptions.push(this.route.queryParams.subscribe(params => {
|
this.subscriptions.push(this.route.queryParams.subscribe(params => {
|
||||||
this.source = params['source'];
|
this.source = params['source'];
|
||||||
if (params['code']) {
|
if (params['code']) {
|
||||||
|
@ -123,4 +130,19 @@ export class OrcidComponent {
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private updateTitle(title: string) {
|
||||||
|
this._title.setTitle(title);
|
||||||
|
this._meta.updateTag({content: title}, "property='og:title'");
|
||||||
|
}
|
||||||
|
|
||||||
|
private updateDescription(description: string) {
|
||||||
|
this._meta.updateTag({content: description}, "name='description'");
|
||||||
|
this._meta.updateTag({content: description}, "property='og:description'");
|
||||||
|
}
|
||||||
|
|
||||||
|
private updateUrl(url: string) {
|
||||||
|
this._meta.updateTag({content: url}, "property='og:url'");
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -35,8 +35,8 @@ export class WorkV3_0 {
|
||||||
return "data-set";
|
return "data-set";
|
||||||
} else if(type == "Doctoral thesis") {
|
} else if(type == "Doctoral thesis") {
|
||||||
return "dissertation-thesis";
|
return "dissertation-thesis";
|
||||||
} else if(type == "Film") {
|
// } else if(type == "Film") {
|
||||||
return "artistic-performance";
|
// return "artistic-performance";
|
||||||
} else if(type == "Lecture") {
|
} else if(type == "Lecture") {
|
||||||
return "lecture-speech";
|
return "lecture-speech";
|
||||||
} else if(type == "Newsletter") {
|
} else if(type == "Newsletter") {
|
||||||
|
@ -111,7 +111,13 @@ export class WorkV3_0 {
|
||||||
// citation (Citation, optional),
|
// citation (Citation, optional),
|
||||||
|
|
||||||
if(resultLandingInfo.types) {
|
if(resultLandingInfo.types) {
|
||||||
work['type'] = this.mapType(resultLandingInfo.types[0]);
|
for(let type of resultLandingInfo.types) {
|
||||||
|
work['type'] = this.mapType(type);
|
||||||
|
if(work['type'] != "other") {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// work['type'] = this.mapType(resultLandingInfo.types[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(resultLandingInfo.date || resultLandingInfo.dateofacceptance) {
|
if(resultLandingInfo.date || resultLandingInfo.dateofacceptance) {
|
||||||
|
|
Loading…
Reference in New Issue