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:
konstantina.galouni 2016-11-18 09:38:13 +00:00
parent 07ee0faa93
commit 5fe3a03af2
3 changed files with 14 additions and 77 deletions

View File

@ -7,24 +7,17 @@ import {OpenaireProperties} from '../utils/properties/openaireProperties';
<div *ngIf="identifiers != undefined && identifiers.size > 0">
<dt>Identifiers:</dt>
<dd>
<ul class="list-inline">
<li *ngFor="let key of identifiers.keys()">
<div *ngFor="let item of identifiers.get(key)">
<div [ngSwitch]="key">
<template [ngSwitchCase]="'doi'">
<a class="custom-external" href="{{doiURL}}{{item}}" target="_blank">
{{key}}: {{item}}
</a>
</template>
<template [ngSwitchCase]="'pmc'">
<a class="custom-external" href="{{pmcURL}}{{item}}" target="_blank">
{{key}}: {{item}}
</a>
</template>
</div>
</div>
</li>
</ul>
<span *ngFor="let key of identifiers.keys() let i=index">
<span *ngFor="let item of identifiers.get(key) let j=index">
<span *ngIf="i>0 || j>0">, </span>
<a *ngIf="key=='doi'" class="custom-external" href="{{doiURL}}{{item}}" target="_blank">
{{key}}: {{item}}
</a>
<a *ngIf="key=='pmc'" class="custom-external" href="{{pmcURL}}{{item}}" target="_blank">
{{key}}: {{item}}
</a>
</span>
</span>
</dd>
</div>
@ -32,7 +25,7 @@ import {OpenaireProperties} from '../utils/properties/openaireProperties';
})
export class ShowIdentifiersComponent {
@Input() identifiers: Map<string, string[]>;//Map<string, string>;
@Input() identifiers: Map<string, string[]>;
doiURL: string;
pmcURL: string;

View File

@ -75,7 +75,7 @@ public getCSVResultsForEntity(entity:string, id:string): any {
let exportPublications = [];
exportPublications.push(//[exportPublications.length] =
[
this.quote("bla"),
this.quote(["bli", "blo"]),
this.quote("bla"),
this.quote("bla"),
this.quote("bla"),
@ -90,7 +90,7 @@ public getCSVResultsForEntity(entity:string, id:string): any {
return exportPublications;
}
private quote(word: string): string {
private quote(word: any): string {
return '"'+word+'"';
}

View File

@ -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");
}
}