[Trunk|Library]

remove old showAuthors component
	
	add properties in showPublisher component of software landing



git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@55904 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2019-05-29 16:47:31 +00:00
parent 655e80e607
commit 6564a4d74b
2 changed files with 1 additions and 64 deletions

View File

@ -1,63 +0,0 @@
import {Component, Input} from '@angular/core';
import {RouterHelper} from '../../utils/routerHelper.class';
import {HelperFunctions} from "../../utils/HelperFunctions.class";
@Component({
selector: 'showAuthors1',
template: `
<span *ngIf="authors != undefined">
<div *ngIf="showAll">
<a (click)="showAll = !showAll;">View less authors</a>
</div>
<span *ngFor="let author of authors.slice(0,30) let i=index" style="font-style: italic;">
<!--a [queryParams]="routerHelper.createQueryParams(['author','at'],[quote(author['name']),'and'])" routerLinkActive="router-link-active" [routerLink]="'/search/advanced/'+searchPage">
{{author['name']}}
</a-->
{{author}}
<span *ngIf=" i<29 && i<(authors.length-1)">;</span>
</span>
<span *ngIf="!showAll && authors.length > 30"> ... </span>
<span *ngIf="showAll" style="font-style: italic;">
<span *ngFor="let author of authors.slice(30) let i=index">
<!--a [queryParams]="routerHelper.createQueryParams(['author','at'],[quote(author['name']),'and'])" routerLinkActive="router-link-active" [routerLink]="'/search/advanced/'+searchPage">
{{author['name']}}
</a-->
{{author}}
<span *ngIf=" i<(authors.length-1)">;</span>
</span>
</span>
<span *ngIf="!showAll && authors.length > 30">
<a (click)="showAll = !showAll;">
view all {{authors.length | number}} authors
</a>
</span>
<span *ngIf="showAll">
<a (click)="showAll = !showAll; scroll()">View less authors</a>
</span>
</span>
`
})
export class ShowAuthorsComponent1 {
@Input() authors: { [key: string]: string }[];
@Input() searchPage:string ="publications"
public showAll: boolean = false;
public routerHelper:RouterHelper = new RouterHelper();
constructor () {
}
ngOnInit() {
}
public quote(params: string):string {
return '"'+params+'"';
}
public scroll() {
HelperFunctions.scroll();
}
}

View File

@ -38,7 +38,7 @@
</div> </div>
<ul class="uk-list"> <ul class="uk-list">
<showPublisher [publisher]="softwareInfo.publisher" <showPublisher [publisher]="softwareInfo.publisher" [properties]="properties"
[journal]="softwareInfo.journal"></showPublisher> [journal]="softwareInfo.journal"></showPublisher>
<li *ngIf="softwareInfo.embargoEndDate"><span class="uk-text-bold">Embargo end date:</span> {{softwareInfo.embargoEndDate}}</li> <li *ngIf="softwareInfo.embargoEndDate"><span class="uk-text-bold">Embargo end date:</span> {{softwareInfo.embargoEndDate}}</li>