1 |
61381
|
k.triantaf
|
import {Component, Input} from '@angular/core';
|
2 |
|
|
import { FetchResearchResults } from '../../utils/fetchEntitiesClasses/fetchResearchResults.class';
|
3 |
|
|
|
4 |
|
|
import {ErrorCodes} from '../../utils/properties/errorCodes';
|
5 |
|
|
import{EnvProperties} from '../../utils/properties/env-properties';
|
6 |
|
|
|
7 |
|
|
@Component({
|
8 |
|
|
selector: 'softwareTab',
|
9 |
|
|
template: `
|
10 |
|
|
<errorMessages [status]="[fetchSoftware.searchUtils.status]" [type]="'software'" tab_error_class=true></errorMessages>
|
11 |
|
|
|
12 |
|
|
<div *ngIf="fetchSoftware.searchUtils.status == errorCodes.DONE">
|
13 |
|
|
<div class = "uk-text-right" *ngIf = "fetchSoftware.searchUtils.totalResults > 10" >
|
14 |
|
|
<a [queryParams]="paramsForSearchLink"
|
15 |
|
|
routerLinkActive="router-link-active" [routerLink]="linkToSearchSoftware" class="uk-button uk-button-text">
|
16 |
|
|
View all {{fetchSoftware.searchUtils.totalResults | number}} results
|
17 |
|
|
</a>
|
18 |
|
|
</div>
|
19 |
|
|
<tab-result [results]="fetchSoftware.results"
|
20 |
|
|
[status]= "fetchSoftware.searchUtils.status"
|
21 |
|
|
type="software" urlParam="softwareId">
|
22 |
|
|
</tab-result>
|
23 |
|
|
</div>
|
24 |
|
|
`
|
25 |
|
|
})
|
26 |
|
|
|
27 |
|
|
export class SoftwareTabComponent {
|
28 |
|
|
@Input() paramsForSearchLink = {};
|
29 |
|
|
@Input() fetchSoftware : FetchResearchResults;
|
30 |
|
|
@Input() properties:EnvProperties ;
|
31 |
|
|
public linkToSearchSoftware = "";
|
32 |
|
|
public errorCodes:ErrorCodes = new ErrorCodes();
|
33 |
|
|
|
34 |
|
|
constructor () {}
|
35 |
|
|
|
36 |
|
|
ngOnInit() {
|
37 |
|
|
this.linkToSearchSoftware = this.properties.searchLinkToAdvancedSoftware;
|
38 |
|
|
}
|
39 |
|
|
|
40 |
|
|
}
|