[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 {ResultPreview} from "../../utils/result-preview/result-preview";
|
||||
import {HttpClient} from "@angular/common/http";
|
||||
import {Meta, Title} from "@angular/platform-browser";
|
||||
|
||||
declare var UIkit: any;
|
||||
|
||||
|
@ -31,6 +32,9 @@ declare var UIkit: any;
|
|||
<!-- </div>-->
|
||||
<div class="">
|
||||
<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">
|
||||
An Error Occurred
|
||||
</div>
|
||||
|
@ -166,7 +170,8 @@ export class MyOrcidLinksComponent {
|
|||
|
||||
constructor (private route: ActivatedRoute, private router: Router,
|
||||
private _orcidService: OrcidService,
|
||||
private _searchResearchResultsService: SearchResearchResultsService
|
||||
private _searchResearchResultsService: SearchResearchResultsService,
|
||||
private _meta: Meta, private _title: Title
|
||||
// ,private http: HttpClient/*ATHENA CODE*/
|
||||
) {
|
||||
this.errorCodes = new ErrorCodes();
|
||||
|
@ -222,9 +227,14 @@ export class MyOrcidLinksComponent {
|
|||
// this.typeQuery += "&type=results";
|
||||
// }
|
||||
|
||||
this.typeQuery = "&type=results";
|
||||
// this.typeQuery = "&type=results";
|
||||
// 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.getLocalWorks();
|
||||
}
|
||||
|
@ -535,4 +545,23 @@ export class MyOrcidLinksComponent {
|
|||
}
|
||||
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 class="uk-margin-small-left uk-flex uk-flex-middle">Add to
|
||||
<span class="orcid-color space uk-flex uk-flex-middle">
|
||||
<img src="assets/common-assets/common/ORCIDiD_icon16x16.png" alt="">{{" "}}
|
||||
<span class="space">ORCID</span>
|
||||
<span>ORCID</span>
|
||||
<img class="space" src="assets/common-assets/common/ORCIDiD_icon16x16.png" alt="">{{" "}}
|
||||
</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 class="uk-margin-small-left uk-flex uk-flex-middle">Delete from
|
||||
<span class="orcid-color space uk-flex uk-flex-middle">
|
||||
<img src="assets/common-assets/common/ORCIDiD_icon16x16.png" alt="">{{" "}}
|
||||
<span class="space">ORCID</span>
|
||||
<span>ORCID</span>
|
||||
<img class="space" src="assets/common-assets/common/ORCIDiD_icon16x16.png" alt="">{{" "}}
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
|
@ -166,21 +166,22 @@ declare var UIkit: any;
|
|||
<span>Grant OpenAIRE</span>
|
||||
</button>
|
||||
|
||||
<!-- <button (click)="openGrantWindow()" type="submit"-->
|
||||
<!-- 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="">{{" "}}-->
|
||||
<!-- <span>Create or Connect your ORCID iD</span>-->
|
||||
<!-- </button>-->
|
||||
<!-- <button (click)="openGrantWindow()" type="submit"-->
|
||||
<!-- 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="">{{" "}}-->
|
||||
<!-- <span>Create or Connect your ORCID iD</span>-->
|
||||
<!-- </button>-->
|
||||
</div>
|
||||
</div>
|
||||
</modal-alert>
|
||||
|
||||
|
||||
<ng-container *ngIf="pageType == 'my_search'">
|
||||
<div class="uk-margin-bottom uk-text-center">
|
||||
<img src="assets/common-assets/common/ORCIDiD_icon16x16.png" alt="">{{" "}}
|
||||
ORCID ACTIONS
|
||||
</div>
|
||||
<span class="uk-margin-bottom uk-flex uk-flex-middle uk-flex-center">
|
||||
<span>ORCID</span>
|
||||
<img class="space" src="assets/common-assets/common/ORCIDiD_icon16x16.png" alt="">
|
||||
<span class="space">ACTIONS</span>
|
||||
</span>
|
||||
|
||||
<span [attr.uk-tooltip]="(!putCodes || putCodes.length == 0)
|
||||
? 'This work is currently deleted.'
|
||||
|
@ -373,7 +374,7 @@ declare var UIkit: any;
|
|||
[classBody]="'landing-modal uk-padding-remove'">
|
||||
<div class="uk-text-center uk-padding-small">
|
||||
<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.
|
||||
<div *ngIf="currentAction == 'delete'">
|
||||
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 {properties} from "../../../environments/environment";
|
||||
import {RouterHelper} from "../utils/routerHelper.class";
|
||||
import {Meta, Title} from "@angular/platform-browser";
|
||||
|
||||
@Component({
|
||||
selector: 'orcid',
|
||||
|
@ -31,9 +32,15 @@ export class OrcidComponent {
|
|||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private _router: Router,
|
||||
private orcidService: OrcidService) {}
|
||||
private orcidService: OrcidService,
|
||||
private _meta: Meta, private _title: Title) {}
|
||||
|
||||
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.source = params['source'];
|
||||
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";
|
||||
} else if(type == "Doctoral thesis") {
|
||||
return "dissertation-thesis";
|
||||
} else if(type == "Film") {
|
||||
return "artistic-performance";
|
||||
// } else if(type == "Film") {
|
||||
// return "artistic-performance";
|
||||
} else if(type == "Lecture") {
|
||||
return "lecture-speech";
|
||||
} else if(type == "Newsletter") {
|
||||
|
@ -111,7 +111,13 @@ export class WorkV3_0 {
|
|||
// citation (Citation, optional),
|
||||
|
||||
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) {
|
||||
|
|
Loading…
Reference in New Issue