[Trunk | Library]:
deletedByInference.component.ts: In <result-preview> add property "showOrcid" set to "false". resultLanding.component.html: a. Show <orcid-work> always (user is logged in or not and if there are no identifiers). b. Add class "half-opacity" in button and text for annotations when not user is logged in or there is no pid. resultLanding.component.ts: Remove "loggedIn" field as it is duplicate (the other is "isLoggedIn"). advancedSearchForm.component.html: Show input form for filters with type "keyword" and [NEW] type "identifier". loading.component.ts: Add boolean property "top_margin" to add or not class "uk-margin-small-top" on spinner. result-preview.component.html: a. Show <orcid-work> component even when user is not logged in. b. Fix widths for bottom line of result preview. c. Add "orcidCreationDates" and "orcidUpdateDates" in bottom line when available (in my orcid links page). result-preview.component.ts: Add "showOrcid" property. result-preview.ts: Add fields "orcidUpdateDates: string[]" and "orcidCreationDates: string[]". git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60393 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
fb458253d4
commit
ba229df685
|
@ -24,7 +24,7 @@ import {properties} from "../../../../../environments/environment";
|
||||||
</no-load-paging>
|
</no-load-paging>
|
||||||
<ul class="uk-list uk-list-divider uk-margin">
|
<ul class="uk-list uk-list-divider uk-margin">
|
||||||
<li *ngFor="let result of results.slice((page-1)*pageSize, page*pageSize)">
|
<li *ngFor="let result of results.slice((page-1)*pageSize, page*pageSize)">
|
||||||
<result-preview [modal]="modal" [properties]="properties" [result]="getResultPreview(result)"></result-preview>
|
<result-preview [modal]="modal" [properties]="properties" [result]="getResultPreview(result)" [showOrcid]="false"></result-preview>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<no-load-paging *ngIf="results.length > pageSize" [type]="type"
|
<no-load-paging *ngIf="results.length > pageSize" [type]="type"
|
||||||
|
|
|
@ -101,8 +101,7 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<!-- ORCID -->
|
<!-- ORCID -->
|
||||||
<li *ngIf="properties.environment == 'development' &&
|
<li *ngIf="properties.environment == 'development'">
|
||||||
loggedIn && resultLandingInfo && resultLandingInfo.identifiers && resultLandingInfo.identifiers.size > 0">
|
|
||||||
<orcid-work [resultId]="id" [resultLandingInfo]="resultLandingInfo" [pids]="pidsArrayString" [pageType]="'landing'">
|
<orcid-work [resultId]="id" [resultLandingInfo]="resultLandingInfo" [pids]="pidsArrayString" [pageType]="'landing'">
|
||||||
</orcid-work>
|
</orcid-work>
|
||||||
</li>
|
</li>
|
||||||
|
@ -113,7 +112,7 @@
|
||||||
</span>
|
</span>
|
||||||
<span class="uk-margin-small-left">add annotation</span>
|
<span class="uk-margin-small-left">add annotation</span>
|
||||||
</a>
|
</a>
|
||||||
<span *ngIf="!pid || !isLoggedIn" class="uk-link-text uk-text-bold uk-text-uppercase uk-text-muted"
|
<span *ngIf="!pid || !isLoggedIn" class="uk-link-text uk-text-bold uk-text-uppercase uk-text-muted half-opacity"
|
||||||
[attr.uk-tooltip]="!pid?'Annotations are available only for resources with a PID (persistent identifier) like DOI, handle, PMID':
|
[attr.uk-tooltip]="!pid?'Annotations are available only for resources with a PID (persistent identifier) like DOI, handle, PMID':
|
||||||
'Annotations are available only for logged in users'">
|
'Annotations are available only for logged in users'">
|
||||||
<span class="uk-icon-button uk-button-primary uk-icon uk-disabled">
|
<span class="uk-icon-button uk-button-primary uk-icon uk-disabled">
|
||||||
|
|
|
@ -99,7 +99,7 @@ export class ResultLandingComponent {
|
||||||
'Title', 'Authors', 'Access rights',
|
'Title', 'Authors', 'Access rights',
|
||||||
'Publisher information', 'Funding Information',
|
'Publisher information', 'Funding Information',
|
||||||
'Persistent identifiers', 'Other'];
|
'Persistent identifiers', 'Other'];
|
||||||
public loggedIn: boolean = false;
|
|
||||||
public pidsArrayString: string = "";
|
public pidsArrayString: string = "";
|
||||||
public identifier: Identifier;
|
public identifier: Identifier;
|
||||||
|
|
||||||
|
@ -134,10 +134,7 @@ export class ResultLandingComponent {
|
||||||
//this.getDivContents();
|
//this.getDivContents();
|
||||||
this.getPageContents();
|
this.getPageContents();
|
||||||
this.updateUrl(this.properties.domain +this.properties.baseLink + this._router.url);
|
this.updateUrl(this.properties.domain +this.properties.baseLink + this._router.url);
|
||||||
this.subscriptions.push(this.route.queryParams.subscribe(async data => {
|
this.subscriptions.push(this.route.queryParams.subscribe(data => {
|
||||||
if (Session.isLoggedIn()) {
|
|
||||||
this.loggedIn = true;
|
|
||||||
}
|
|
||||||
this.resultLandingInfo = null;
|
this.resultLandingInfo = null;
|
||||||
if (data['articleId']) {
|
if (data['articleId']) {
|
||||||
this.id = data['articleId'];
|
this.id = data['articleId'];
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
(ngModelChange)="fieldIdsChanged(i,selectedField.id)"><!--(click)="fieldIdsChanged(i)" -->
|
(ngModelChange)="fieldIdsChanged(i,selectedField.id)"><!--(click)="fieldIdsChanged(i)" -->
|
||||||
<mat-option *ngFor="let id of fieldIds" [value]="id">{{fieldIdsMap[id].name}} </mat-option>
|
<mat-option *ngFor="let id of fieldIds" [value]="id">{{fieldIdsMap[id].name}} </mat-option>
|
||||||
</mat-select></td>
|
</mat-select></td>
|
||||||
<td *ngIf="selectedField.type == 'keyword'">
|
<td *ngIf="selectedField.type == 'keyword' || selectedField.type == 'identifier'">
|
||||||
<div class="uk-inline uk-width-expand">
|
<div class="uk-inline uk-width-expand">
|
||||||
<a *ngIf="selectedField.value.length > 0" class="uk-form-icon uk-form-icon-flip"
|
<a *ngIf="selectedField.value.length > 0" class="uk-form-icon uk-form-icon-flip"
|
||||||
(click)="selectedField.value = ''"
|
(click)="selectedField.value = ''"
|
||||||
|
|
|
@ -11,7 +11,7 @@ import {Component, Input} from "@angular/core";
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template #loading>
|
<ng-template #loading>
|
||||||
<div class="uk-flex uk-flex-center uk-margin-small-top">
|
<div [class]="'uk-flex uk-flex-center '+(top_margin ? 'uk-margin-small-top' : '')">
|
||||||
<span class="portal-color uk-icon uk-spinner">
|
<span class="portal-color uk-icon uk-spinner">
|
||||||
<svg width="60" height="60" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg" data-svg="spinner"><circle
|
<svg width="60" height="60" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg" data-svg="spinner"><circle
|
||||||
fill="none" stroke="#000" cx="15" cy="15" r="14" style="stroke-width: 2px;"></circle></svg>
|
fill="none" stroke="#000" cx="15" cy="15" r="14" style="stroke-width: 2px;"></circle></svg>
|
||||||
|
@ -25,7 +25,7 @@ export class LoadingComponent {
|
||||||
*/
|
*/
|
||||||
@Input() color: 'success' | 'warning' | 'danger' = null;
|
@Input() color: 'success' | 'warning' | 'danger' = null;
|
||||||
@Input() full: boolean = false;
|
@Input() full: boolean = false;
|
||||||
|
@Input() top_margin: boolean = true;
|
||||||
constructor() {
|
constructor() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -262,10 +262,11 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="(result.pop_inf && result.DOI) || (loggedIn && result.identifiers && result.identifiers.size > 0)"
|
<!--&& loggedIn -->
|
||||||
|
<div *ngIf="(result.pop_inf && result.DOI) || (properties.environment == 'development' && ((showOrcid && result.identifiers && result.identifiers.size > 0) || (result.orcidUpdateDates?.length > 0 || result.orcidCreationDates?.length > 0)))"
|
||||||
class="result-preview-bottom">
|
class="result-preview-bottom">
|
||||||
<!-- Impact Factors-->
|
<!-- Impact Factors-->
|
||||||
<span class="uk-flex uk-flex-middle">
|
<span class="uk-flex uk-flex-top">
|
||||||
<ng-container *ngIf="result.pop_inf && result.DOI">
|
<ng-container *ngIf="result.pop_inf && result.DOI">
|
||||||
<!--Popularity -->
|
<!--Popularity -->
|
||||||
<a title="Popularity" class="popularity-{{result.pop_inf[0]}} uk-margin-right uk-flex uk-flex-middle">
|
<a title="Popularity" class="popularity-{{result.pop_inf[0]}} uk-margin-right uk-flex uk-flex-middle">
|
||||||
|
@ -330,18 +331,40 @@
|
||||||
class="uk-margin-small-top uk-margin-small-left">{{" " + (result.pop_inf[1] == 'A' ? 'In top 0.01%' : '') + (result.pop_inf[1] == 'B' ? 'In top 1%' : '') + (result.pop_inf[1] == 'C' ? 'In bottom 99%' : '')}}</span>
|
class="uk-margin-small-top uk-margin-small-left">{{" " + (result.pop_inf[1] == 'A' ? 'In top 0.01%' : '') + (result.pop_inf[1] == 'B' ? 'In top 1%' : '') + (result.pop_inf[1] == 'C' ? 'In bottom 99%' : '')}}</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div class="uk-text-muted uk-margin">Influence: Citation-based measure reflecting the total impact.</div>
|
<div class="uk-text-muted uk-margin">Influence: Citation-based measure reflecting the total impact.</div>
|
||||||
<div>
|
<div>
|
||||||
<a title="Link to Bip!Finder" class=" uk-float-right" target="_blank" href=
|
<a title="Link to Bip!Finder" class=" uk-float-right" target="_blank" href=
|
||||||
"https://bip.imis.athena-innovation.gr/site/details?id={{result.DOI}}">View more details</a>
|
"https://bip.imis.athena-innovation.gr/site/details?id={{result.DOI}}">View more details</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<span *ngIf="properties.environment == 'development' && loggedIn && result.identifiers && result.identifiers.size > 0"
|
<!-- && loggedIn -->
|
||||||
class="uk-margin-right uk-flex uk-flex-middle uk-flex-right uk-width-expand">
|
<span *ngIf="properties.environment == 'development' && showOrcid && result.identifiers && result.identifiers.size > 0"
|
||||||
<orcid-work [resultId]="result.id" [type]="result.resultType" [pageType]="'search'"
|
class="uk-width-1-3 uk-width-expand@s">
|
||||||
[putCodes]="result.orcidPutCodes" [givenPutCode]="true">
|
<!-- class="uk-flex uk-flex-middle uk-flex-right uk-width-expand">-->
|
||||||
|
<orcid-work *ngIf="showOrcid && result.identifiers && result.identifiers.size > 0" [resultId]="result.id" [type]="result.resultType" [pageType]="'search'"
|
||||||
|
[putCodes]="result.orcidPutCodes" [givenPutCode]="true" [identifiers]="result.identifiers">
|
||||||
</orcid-work>
|
</orcid-work>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
<span *ngIf="properties.environment == 'development' && (result.orcidUpdateDates?.length > 0 || result.orcidCreationDates?.length > 0)"
|
||||||
|
class="uk-width-expand uk-text-right">
|
||||||
|
<span *ngIf="result.orcidCreationDates?.length > 0" class="uk-display-inline-block">
|
||||||
|
<span class="uk-text-muted">Added in ORCID:</span>
|
||||||
|
<span *ngFor="let date of result.orcidCreationDates; let i=index">
|
||||||
|
{{date | date: 'dd MMM yyyy'}}
|
||||||
|
<span *ngIf="i < (result.orcidCreationDates.length - 1)">& </span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<span *ngIf="result.orcidCreationDates?.length > 0 && result.orcidUpdateDates?.length > 0">
|
||||||
|
{{' . '}}
|
||||||
|
</span>
|
||||||
|
<span *ngIf="result.orcidUpdateDates?.length > 0" class="uk-display-inline-block">
|
||||||
|
<span class="uk-text-muted">Last update in ORCID:</span>
|
||||||
|
<span *ngFor="let date of result.orcidUpdateDates; let i=index">
|
||||||
|
{{date | date: 'dd MMM yyyy'}}
|
||||||
|
<span *ngIf="i < (result.orcidUpdateDates.length - 1)">& </span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -24,6 +24,7 @@ export class ResultPreviewComponent implements OnInit{
|
||||||
public beforeTitle: string[] = [];
|
public beforeTitle: string[] = [];
|
||||||
public dataProviderUrl = properties.searchLinkToDataProvider.split('?')[0];
|
public dataProviderUrl = properties.searchLinkToDataProvider.split('?')[0];
|
||||||
public loggedIn: boolean = false;
|
public loggedIn: boolean = false;
|
||||||
|
@Input() showOrcid: boolean = true;
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
if (Session.isLoggedIn()) {
|
if (Session.isLoggedIn()) {
|
||||||
|
|
|
@ -91,7 +91,9 @@ export class ResultPreview {
|
||||||
identifiers: Map<string, string[]>; //key is the classname
|
identifiers: Map<string, string[]>; //key is the classname
|
||||||
hostedBy_collectedFrom: HostedByCollectedFrom[];
|
hostedBy_collectedFrom: HostedByCollectedFrom[];
|
||||||
orcidPutCodes: string[];
|
orcidPutCodes: string[];
|
||||||
|
orcidUpdateDates: string [];
|
||||||
|
orcidCreationDates: string [];
|
||||||
|
|
||||||
//datasets & orp & software:
|
//datasets & orp & software:
|
||||||
publisher: string;
|
publisher: string;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue