|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
import {Component, Input} from '@angular/core';
|
|
|
|
|
import {Component, Input, SimpleChanges} from '@angular/core';
|
|
|
|
|
import {EnvProperties} from "../../properties/env-properties";
|
|
|
|
|
import {ErrorCodes} from "../../properties/errorCodes";
|
|
|
|
|
import {OpenaireEntities} from "../../properties/searchFields";
|
|
|
|
@ -41,7 +41,7 @@ import {StringUtils} from "../../string-utils.class";
|
|
|
|
|
|
|
|
|
|
<ng-container *ngIf="fetch.searchUtils.status == errorCodes.DONE">
|
|
|
|
|
<search-result [properties]="properties"
|
|
|
|
|
[results]="results"
|
|
|
|
|
[results]="fetch.results"
|
|
|
|
|
[status]="fetch.searchUtils.status"
|
|
|
|
|
[type]="resultType" [showEnermaps]="showEnermaps" [prevPath]="prevPath">
|
|
|
|
|
</search-result>
|
|
|
|
@ -67,7 +67,6 @@ export class SearchTabComponent {
|
|
|
|
|
@Input() properties: EnvProperties;
|
|
|
|
|
@Input() customTitle;
|
|
|
|
|
@Input() showEnermaps: boolean;
|
|
|
|
|
@Input() currentPage: number = null;
|
|
|
|
|
|
|
|
|
|
public errorCodes: ErrorCodes = new ErrorCodes();
|
|
|
|
|
|
|
|
|
@ -75,10 +74,6 @@ export class SearchTabComponent {
|
|
|
|
|
return StringUtils.getEntityName(entityType, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get results() {
|
|
|
|
|
return this.currentPage ? this.fetch.results.slice((this.currentPage - 1) * this.searchNumber, this.currentPage * this.searchNumber) : this.fetch.results;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get paramsForExternalUrl() {
|
|
|
|
|
let parameters: string = "";
|
|
|
|
|
Object.keys(this.params).forEach(paramKey => {
|
|
|
|
|