publication landing page: identifiers alignment
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@44567 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
07ee0faa93
commit
5fe3a03af2
|
@ -7,24 +7,17 @@ import {OpenaireProperties} from '../utils/properties/openaireProperties';
|
||||||
<div *ngIf="identifiers != undefined && identifiers.size > 0">
|
<div *ngIf="identifiers != undefined && identifiers.size > 0">
|
||||||
<dt>Identifiers:</dt>
|
<dt>Identifiers:</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<ul class="list-inline">
|
<span *ngFor="let key of identifiers.keys() let i=index">
|
||||||
<li *ngFor="let key of identifiers.keys()">
|
<span *ngFor="let item of identifiers.get(key) let j=index">
|
||||||
<div *ngFor="let item of identifiers.get(key)">
|
<span *ngIf="i>0 || j>0">, </span>
|
||||||
<div [ngSwitch]="key">
|
<a *ngIf="key=='doi'" class="custom-external" href="{{doiURL}}{{item}}" target="_blank">
|
||||||
<template [ngSwitchCase]="'doi'">
|
|
||||||
<a class="custom-external" href="{{doiURL}}{{item}}" target="_blank">
|
|
||||||
{{key}}: {{item}}
|
{{key}}: {{item}}
|
||||||
</a>
|
</a>
|
||||||
</template>
|
<a *ngIf="key=='pmc'" class="custom-external" href="{{pmcURL}}{{item}}" target="_blank">
|
||||||
<template [ngSwitchCase]="'pmc'">
|
|
||||||
<a class="custom-external" href="{{pmcURL}}{{item}}" target="_blank">
|
|
||||||
{{key}}: {{item}}
|
{{key}}: {{item}}
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</span>
|
||||||
</div>
|
</span>
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -32,7 +25,7 @@ import {OpenaireProperties} from '../utils/properties/openaireProperties';
|
||||||
})
|
})
|
||||||
|
|
||||||
export class ShowIdentifiersComponent {
|
export class ShowIdentifiersComponent {
|
||||||
@Input() identifiers: Map<string, string[]>;//Map<string, string>;
|
@Input() identifiers: Map<string, string[]>;
|
||||||
doiURL: string;
|
doiURL: string;
|
||||||
pmcURL: string;
|
pmcURL: string;
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ public getCSVResultsForEntity(entity:string, id:string): any {
|
||||||
let exportPublications = [];
|
let exportPublications = [];
|
||||||
exportPublications.push(//[exportPublications.length] =
|
exportPublications.push(//[exportPublications.length] =
|
||||||
[
|
[
|
||||||
this.quote("bla"),
|
this.quote(["bli", "blo"]),
|
||||||
this.quote("bla"),
|
this.quote("bla"),
|
||||||
this.quote("bla"),
|
this.quote("bla"),
|
||||||
this.quote("bla"),
|
this.quote("bla"),
|
||||||
|
@ -90,7 +90,7 @@ public getCSVResultsForEntity(entity:string, id:string): any {
|
||||||
return exportPublications;
|
return exportPublications;
|
||||||
}
|
}
|
||||||
|
|
||||||
private quote(word: string): string {
|
private quote(word: any): string {
|
||||||
return '"'+word+'"';
|
return '"'+word+'"';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,56 +0,0 @@
|
||||||
import {Component, Input, Output, EventEmitter, ViewChild} from '@angular/core';
|
|
||||||
import {Observable} from 'rxjs/Observable';
|
|
||||||
import {AlertModal} from '../../utils/modal/alert';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'search-download',
|
|
||||||
template: `
|
|
||||||
<div class= "searchDownload">
|
|
||||||
<div class="text-right" *ngIf="totalResults <= 100000">
|
|
||||||
<a (click)="download()">Download report (CSV)</a>
|
|
||||||
</div>
|
|
||||||
<div class="text-right" *ngIf="totalResults > 100000">
|
|
||||||
<a (click)="denialOfDownload()">
|
|
||||||
<span class="glyphicon glyphicon-download" aria-hidden="true"></span>
|
|
||||||
Download report (CSV)
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<modal-alert></modal-alert>
|
|
||||||
|
|
||||||
`
|
|
||||||
})
|
|
||||||
|
|
||||||
export class SearchDownloadComponent {
|
|
||||||
@Input() totalResults:number = 0;
|
|
||||||
@ViewChild(AlertModal) alertApplyAll;
|
|
||||||
@Output() downloadClick = new EventEmitter();
|
|
||||||
|
|
||||||
constructor () {
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
confirmClose(data){
|
|
||||||
|
|
||||||
}
|
|
||||||
download() {
|
|
||||||
this.downloadClick.emit({
|
|
||||||
value: true
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
denialOfDownload() {
|
|
||||||
this.alertApplyAll.isOpen = true;
|
|
||||||
this.alertApplyAll.cancelButton = true;
|
|
||||||
this.alertApplyAll.okButton = false;
|
|
||||||
this.alertApplyAll.alertTitle = "Download Results in CSV";
|
|
||||||
this.alertApplyAll.message = "Sorry, but the results are too many! Use the api instead!";
|
|
||||||
this.alertApplyAll.cancelButtonText = "Ok";
|
|
||||||
|
|
||||||
console.info("denial of Download");
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue