[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>
|
||||
<ul class="uk-list uk-list-divider uk-margin">
|
||||
<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>
|
||||
</ul>
|
||||
<no-load-paging *ngIf="results.length > pageSize" [type]="type"
|
||||
|
|
|
@ -101,8 +101,7 @@
|
|||
</a>
|
||||
</li>
|
||||
<!-- ORCID -->
|
||||
<li *ngIf="properties.environment == 'development' &&
|
||||
loggedIn && resultLandingInfo && resultLandingInfo.identifiers && resultLandingInfo.identifiers.size > 0">
|
||||
<li *ngIf="properties.environment == 'development'">
|
||||
<orcid-work [resultId]="id" [resultLandingInfo]="resultLandingInfo" [pids]="pidsArrayString" [pageType]="'landing'">
|
||||
</orcid-work>
|
||||
</li>
|
||||
|
@ -113,7 +112,7 @@
|
|||
</span>
|
||||
<span class="uk-margin-small-left">add annotation</span>
|
||||
</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':
|
||||
'Annotations are available only for logged in users'">
|
||||
<span class="uk-icon-button uk-button-primary uk-icon uk-disabled">
|
||||
|
|
|
@ -99,7 +99,7 @@ export class ResultLandingComponent {
|
|||
'Title', 'Authors', 'Access rights',
|
||||
'Publisher information', 'Funding Information',
|
||||
'Persistent identifiers', 'Other'];
|
||||
public loggedIn: boolean = false;
|
||||
|
||||
public pidsArrayString: string = "";
|
||||
public identifier: Identifier;
|
||||
|
||||
|
@ -134,10 +134,7 @@ export class ResultLandingComponent {
|
|||
//this.getDivContents();
|
||||
this.getPageContents();
|
||||
this.updateUrl(this.properties.domain +this.properties.baseLink + this._router.url);
|
||||
this.subscriptions.push(this.route.queryParams.subscribe(async data => {
|
||||
if (Session.isLoggedIn()) {
|
||||
this.loggedIn = true;
|
||||
}
|
||||
this.subscriptions.push(this.route.queryParams.subscribe(data => {
|
||||
this.resultLandingInfo = null;
|
||||
if (data['articleId']) {
|
||||
this.id = data['articleId'];
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
(ngModelChange)="fieldIdsChanged(i,selectedField.id)"><!--(click)="fieldIdsChanged(i)" -->
|
||||
<mat-option *ngFor="let id of fieldIds" [value]="id">{{fieldIdsMap[id].name}} </mat-option>
|
||||
</mat-select></td>
|
||||
<td *ngIf="selectedField.type == 'keyword'">
|
||||
<td *ngIf="selectedField.type == 'keyword' || selectedField.type == 'identifier'">
|
||||
<div class="uk-inline uk-width-expand">
|
||||
<a *ngIf="selectedField.value.length > 0" class="uk-form-icon uk-form-icon-flip"
|
||||
(click)="selectedField.value = ''"
|
||||
|
|
|
@ -11,7 +11,7 @@ import {Component, Input} from "@angular/core";
|
|||
</div>
|
||||
</ng-template>
|
||||
<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">
|
||||
<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>
|
||||
|
@ -25,7 +25,7 @@ export class LoadingComponent {
|
|||
*/
|
||||
@Input() color: 'success' | 'warning' | 'danger' = null;
|
||||
@Input() full: boolean = false;
|
||||
|
||||
@Input() top_margin: boolean = true;
|
||||
constructor() {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -262,10 +262,11 @@
|
|||
</span>
|
||||
</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">
|
||||
<!-- Impact Factors-->
|
||||
<span class="uk-flex uk-flex-middle">
|
||||
<span class="uk-flex uk-flex-top">
|
||||
<ng-container *ngIf="result.pop_inf && result.DOI">
|
||||
<!--Popularity -->
|
||||
<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>
|
||||
</span>
|
||||
|
||||
<div class="uk-text-muted uk-margin">Influence: Citation-based measure reflecting the total impact.</div>
|
||||
<div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-text-muted uk-margin">Influence: Citation-based measure reflecting the total impact.</div>
|
||||
<div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
<span *ngIf="properties.environment == 'development' && loggedIn && result.identifiers && result.identifiers.size > 0"
|
||||
class="uk-margin-right uk-flex uk-flex-middle uk-flex-right uk-width-expand">
|
||||
<orcid-work [resultId]="result.id" [type]="result.resultType" [pageType]="'search'"
|
||||
[putCodes]="result.orcidPutCodes" [givenPutCode]="true">
|
||||
<!-- && loggedIn -->
|
||||
<span *ngIf="properties.environment == 'development' && showOrcid && result.identifiers && result.identifiers.size > 0"
|
||||
class="uk-width-1-3 uk-width-expand@s">
|
||||
<!-- 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>
|
||||
</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>
|
||||
|
|
|
@ -24,6 +24,7 @@ export class ResultPreviewComponent implements OnInit{
|
|||
public beforeTitle: string[] = [];
|
||||
public dataProviderUrl = properties.searchLinkToDataProvider.split('?')[0];
|
||||
public loggedIn: boolean = false;
|
||||
@Input() showOrcid: boolean = true;
|
||||
|
||||
ngOnInit(): void {
|
||||
if (Session.isLoggedIn()) {
|
||||
|
|
|
@ -91,6 +91,8 @@ export class ResultPreview {
|
|||
identifiers: Map<string, string[]>; //key is the classname
|
||||
hostedBy_collectedFrom: HostedByCollectedFrom[];
|
||||
orcidPutCodes: string[];
|
||||
orcidUpdateDates: string [];
|
||||
orcidCreationDates: string [];
|
||||
|
||||
//datasets & orp & software:
|
||||
publisher: string;
|
||||
|
|
Loading…
Reference in New Issue