Revision 50586
Added by Argiro Kokogiannaki about 6 years ago
fetchOrganizations.class.ts | ||
---|---|---|
1 | 1 |
import {SearchOrganizationsService} from '../../services/searchOrganizations.service'; |
2 | 2 |
import { ErrorCodes} from '../../utils/properties/openaireProperties'; |
3 | 3 |
import {SearchUtilsClass } from '../../searchPages/searchUtils/searchUtils.class'; |
4 |
import{EnvProperties} from '../../utils/properties/env-properties'; |
|
4 | 5 |
|
5 | 6 |
export class FetchOrganizations { |
6 | 7 |
private errorCodes: ErrorCodes; |
... | ... | |
31 | 32 |
} |
32 | 33 |
|
33 | 34 |
|
34 |
public getResultsByKeyword(keyword:string , page: number, size: number){ |
|
35 |
public getResultsByKeyword(keyword:string , page: number, size: number, properties:EnvProperties){
|
|
35 | 36 |
var parameters = ""; |
36 | 37 |
if(keyword.length > 0){ |
37 | 38 |
parameters = "q=" + keyword; |
... | ... | |
40 | 41 |
//var errorCodes:ErrorCodes = new ErrorCodes(); |
41 | 42 |
this.searchUtils.status = this.errorCodes.LOADING; |
42 | 43 |
|
43 |
this.subResults = this._searchOrganizationsService.searchOrganizations(parameters, null, page, size, []).subscribe( |
|
44 |
this.subResults = this._searchOrganizationsService.searchOrganizations(parameters, null, page, size, [], properties).subscribe(
|
|
44 | 45 |
data => { |
45 | 46 |
this.searchUtils.totalResults = data[0]; |
46 | 47 |
console.info("search Organizations: [Parameters:"+parameters+" ] [total results:"+this.searchUtils.totalResults+"]"); |
Also available in: Unified diff
USe a json file to read properties | replace openaire Properties | parameterize menu (use params, community, ) | parameterize search pages (hide community information)