1
|
import {Component, Input} from '@angular/core';
|
2
|
import { FetchPublications } from '../../utils/fetchEntitiesClasses/fetchPublications.class';
|
3
|
|
4
|
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
5
|
|
6
|
@Component({
|
7
|
selector: 'publicationsTab',
|
8
|
template: `
|
9
|
<div *ngIf="fetchPublications.searchUtils.totalResults == 0" class = "uk-alert">
|
10
|
There are no publications
|
11
|
</div>
|
12
|
|
13
|
<div *ngIf="fetchPublications.searchUtils.totalResults > 0">
|
14
|
<p>
|
15
|
The results below are discovered through our pilot algorithms.
|
16
|
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
|
17
|
</p>
|
18
|
|
19
|
<div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults > 10">
|
20
|
<!--a [href] = "linkToSearchPublications">
|
21
|
View all {{fetchPublications.searchUtils.totalResults}} results
|
22
|
</a-->
|
23
|
<a [queryParams]="paramsForSearchLink"
|
24
|
routerLinkActive="router-link-active" [routerLink]="linkToSearchPublications">
|
25
|
View all {{fetchPublications.searchUtils.totalResults}} results
|
26
|
</a>
|
27
|
</div>
|
28
|
<tab-result [(results)]="fetchPublications.results"
|
29
|
[(status)]= "fetchPublications.status"
|
30
|
type="publication" urlParam="articleId">
|
31
|
</tab-result>
|
32
|
</div>
|
33
|
`
|
34
|
})
|
35
|
|
36
|
export class PublicationsTabComponent {
|
37
|
@Input() paramsForSearchLink = {};//: string = "";
|
38
|
@Input() fetchPublications : FetchPublications;
|
39
|
public linkToSearchPublications = "";
|
40
|
|
41
|
constructor () {}
|
42
|
|
43
|
ngOnInit() {
|
44
|
this.linkToSearchPublications = OpenaireProperties.getLinkToAdvancedSearchPublications();//+this.paramsForSearchLink;
|
45
|
console.info("publications tab: init");
|
46
|
}
|
47
|
|
48
|
ngOnDestroy() {}
|
49
|
}
|