Revision 60875
Added by Konstantina Galouni about 3 years ago
orcid-work.component.ts | ||
---|---|---|
161 | 161 |
|
162 | 162 |
<span [attr.uk-tooltip]="(!putCodes || putCodes.length == 0) |
163 | 163 |
? 'This work is currently deleted.' |
164 |
: ('Update this work to your ORCID record' + ((properties.environment == 'beta') ? '. The action will affect your real ORCID iD.' : ''))"> |
|
164 |
: ('Update this work to your ORCID record' + ((properties.environment == 'beta') ? '. The action will affect your real ORCID iD.' : '') |
|
165 |
+ showUpdateDatesInTooltip())"> |
|
165 | 166 |
<a (click)="currentAction='update'; updateWorkPreparation()" |
166 | 167 |
[class]="'uk-button action uk-margin-top uk-flex uk-flex-middle '+ ((showLoading || !putCodes || putCodes.length == 0) ? 'uk-disabled' : '')"> |
167 | 168 |
<icon *ngIf="!showLoading || currentAction!='update'" name="refresh" ratio="1"></icon> |
... | ... | |
386 | 387 |
}); |
387 | 388 |
} |
388 | 389 |
|
390 |
public showUpdateDatesInTooltip() { |
|
391 |
const monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; |
|
392 |
let response: string = ""; |
|
393 |
if(this.updateDates != null && this.updateDates.length > 0) { |
|
394 |
response += "<br><br> Last update in ORCID<br>"; |
|
395 |
for(let i=0; i<this.updateDates.length; i++) { |
|
396 |
let date: Date = new Date(this.updateDates[i]); |
|
397 |
response += "<span>"+date.getDate() + " " + monthNames[date.getMonth()] + " " + date.getFullYear(); |
|
398 |
if(i < this.updateDates.length - 1) { |
|
399 |
response += "& "; |
|
400 |
} |
|
401 |
response += "</span>"; |
|
402 |
} |
|
403 |
} |
|
404 |
return response; |
|
405 |
} |
|
406 |
|
|
389 | 407 |
public parseIdentifiers(identifiers: ExternalIDV3_0[]): Map<string, string[]> { |
390 | 408 |
let identifiersMap: Map<string, string[]> = new Map<string, string[]>(); |
391 | 409 |
for(let identifier of identifiers) { |
... | ... | |
508 | 526 |
|
509 | 527 |
// message: 'You have <strong>successfully added</strong> work with pids: <strong>'+this.pids+'</strong> in your ORCID record!', |
510 | 528 |
UIkit.notification({ |
511 |
message: 'You have <strong>successfully added</strong> work "<strong>'+this.resultTitle+'</strong>" in your ORCID record!', |
|
529 |
message: 'You have <strong>successfully added</strong> work "<strong>'+this.resultTitle+'</strong>" in your ORCID record!' |
|
530 |
// + |
|
531 |
// '<br><br><a class="uk-link" [href]="goToOrcidLinksPage()">Manager your ORCID links</a>' |
|
532 |
, |
|
533 |
// '<br><br><a class="uk-link" (click)="goToOrcidLinksPage()">Manager your ORCID links</a>', |
|
534 |
// '<br><br><a class="uk-link" routerLinkActive="router-link-active" [routerLink]="myOrcidLinksPage">Manager your ORCID links</a>', |
|
512 | 535 |
status: 'success', |
513 | 536 |
timeout: 6000, |
514 | 537 |
pos: 'bottom-right' |
... | ... | |
524 | 547 |
)); |
525 | 548 |
} |
526 | 549 |
|
550 |
goToOrcidLinksPage() { |
|
551 |
this._router.navigate([this.properties.myOrcidLinksPage]); |
|
552 |
} |
|
553 |
|
|
527 | 554 |
private updateWorkPreparation() { |
528 | 555 |
if(!Session.isLoggedIn()){ |
529 | 556 |
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} }); |
... | ... | |
553 | 580 |
|
554 | 581 |
// message: 'You have <strong>successfully updated</strong> work with pids: <strong>' + this.pids + '</strong> in your ORCID record!', |
555 | 582 |
UIkit.notification({ |
556 |
message: 'You have <strong>successfully updated</strong> work "<strong>' + this.resultTitle + '</strong>" in your ORCID record!', |
|
583 |
message: 'You have <strong>successfully updated</strong> work "<strong>' + this.resultTitle + '</strong>" in your ORCID record!' |
|
584 |
// + |
|
585 |
// '<br><br><a routerLinkActive="router-link-active" [routerLink]="myOrcidLinksPage">Manager your ORCID links</a>' |
|
586 |
, |
|
557 | 587 |
status: 'success', |
558 | 588 |
timeout: 6000, |
559 | 589 |
pos: 'bottom-right' |
... | ... | |
653 | 683 |
|
654 | 684 |
// message: 'You have <strong>successfully deleted</strong> work with pids: <strong>' + this.pids + '</strong> from your ORCID record!', |
655 | 685 |
UIkit.notification({ |
656 |
message: 'You have <strong>successfully deleted</strong> work "<strong>' + this.resultTitle + '</strong>" from your ORCID record!', |
|
686 |
message: 'You have <strong>successfully deleted</strong> work "<strong>' + this.resultTitle + '</strong>" from your ORCID record!' |
|
687 |
// + |
|
688 |
// '<br><br><a routerLinkActive="router-link-active" [routerLink]="myOrcidLinksPage">Manager your ORCID links</a>' |
|
689 |
, |
|
657 | 690 |
status: 'success', |
658 | 691 |
timeout: 6000, |
659 | 692 |
pos: 'bottom-right' |
Also available in: Unified diff
[Trunk | Library]:
1. myOrcidLinks.component.ts:
a. Remove comments from file.
b. Update and move on top of the page, message about green icons and when the data will be synchronized with ORCID.
c. Align "Discover research results related to you" on the right side of title.
d. [Bug fix] Set "baseUrl" with properties.myOrcidLinksPage.
2. orcid-work.component.ts: Show last update date in ORCID, on hover of Update button.
3. searchResult.component.ts: Add a missing condition (|| properties.adminToolsPortalType "community") to get ORCID putCodes for community dashboards except for Explore portal.
4. env-properties.ts: Added property "myOrcidLinksPage?: string;".
5. result-preview.component.html:
a. Add a missing condition (|| properties.adminToolsPortalType "community") to get ORCID putCodes for community dashboards except for Explore portal.
b. Hidle "result.orcidUpdateDates" from results preview (this info is moved on hover of update button).