1
|
import {Component, Input} from '@angular/core';
|
2
|
import { SearchDataprovidersComponent } from '../../searchPages/simple/searchDataproviders.component';
|
3
|
import {SearchResultComponent} from '../../searchPages/searchUtils/searchResult.component';
|
4
|
|
5
|
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
6
|
|
7
|
@Component({
|
8
|
selector: 'datasourcesTab',
|
9
|
template: `
|
10
|
<div *ngIf="searchDataprovidersComponent.searchUtils.totalResults == 0" class = "alert alert-info " >
|
11
|
There are no datasources
|
12
|
</div>
|
13
|
|
14
|
<div *ngIf="searchDataprovidersComponent.searchUtils.totalResults > 0">
|
15
|
<p>
|
16
|
The results below are discovered through our pilot algorithms.
|
17
|
<a href="mailto:">Let us know how we are doing!</a>
|
18
|
</p>
|
19
|
|
20
|
<div class = "text-right" *ngIf = "searchDataprovidersComponent.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDataproviders" >View all {{searchDataprovidersComponent.searchUtils.totalResults}} results</a></div>
|
21
|
<search-result [(results)]="searchDataprovidersComponent.results" [(status)]= "searchDataprovidersComponent.status"></search-result>
|
22
|
</div>
|
23
|
`
|
24
|
})
|
25
|
|
26
|
export class DatasourcesTabComponent {
|
27
|
|
28
|
@Input() paramsForSearchLink: string = "";
|
29
|
@Input() searchDataprovidersComponent : SearchDataprovidersComponent;
|
30
|
public linkToSearchDataproviders = "";
|
31
|
|
32
|
constructor () {}
|
33
|
|
34
|
ngOnInit() {
|
35
|
this.linkToSearchDataproviders = OpenaireProperties.getLinkToSearchDataProviders()+this.paramsForSearchLink;
|
36
|
}
|
37
|
|
38
|
ngOnDestroy() {}
|
39
|
}
|