Revision 60903
Added by Konstantinos Triantafyllou about 3 years ago
modules/uoa-services-portal/trunk/explore/src/app/home/home.component.ts | ||
---|---|---|
3 | 3 |
import {ActivatedRoute, Router} from '@angular/router'; |
4 | 4 |
import {Location} from '@angular/common'; |
5 | 5 |
import "rxjs/add/observable/zip"; |
6 |
import {Title, Meta} from '@angular/platform-browser';
|
|
6 |
import {Meta, Title} from '@angular/platform-browser';
|
|
7 | 7 |
import {ConfigurationService} from '../openaireLibrary/utils/configuration/configuration.service'; |
8 | 8 |
import {SearchDataprovidersService} from '../openaireLibrary/services/searchDataproviders.service'; |
9 | 9 |
import {SearchProjectsService} from '../openaireLibrary/services/searchProjects.service'; |
10 | 10 |
import {SearchOrganizationsService} from '../openaireLibrary/services/searchOrganizations.service'; |
11 | 11 |
import {RefineFieldResultsService} from '../openaireLibrary/services/refineFieldResults.service'; |
12 | 12 |
import {SearchFields} from '../openaireLibrary/utils/properties/searchFields'; |
13 |
import {NumberUtils} from '../openaireLibrary/utils/number-utils.class'; |
|
14 | 13 |
|
15 | 14 |
import {RouterHelper} from '../openaireLibrary/utils/routerHelper.class'; |
16 | 15 |
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties'; |
... | ... | |
208 | 207 |
for (var i = 0; i < data['entities'].length; i++) { |
209 | 208 |
showEntity["" + data['entities'][i]["pid"] + ""] = data['entities'][i]["isEnabled"]; |
210 | 209 |
} |
211 |
this.showPublications = showEntity["publication"]; |
|
212 |
this.showDatasets = showEntity["dataset"]; |
|
213 |
this.showSoftware = showEntity["software"]; |
|
214 |
this.showOrp = showEntity["orp"]; |
|
215 |
this.showProjects = showEntity["project"]; |
|
216 |
this.showDataProviders = showEntity["datasource"]; |
|
217 |
this.showOrganizations = showEntity["organization"]; |
|
210 |
this.showPublications = !!showEntity["publication"];
|
|
211 |
this.showDatasets = !!showEntity["dataset"];
|
|
212 |
this.showSoftware = !!showEntity["software"];
|
|
213 |
this.showOrp = !!showEntity["orp"];
|
|
214 |
this.showProjects = !!showEntity["project"];
|
|
215 |
this.showDataProviders = !!showEntity["datasource"];
|
|
216 |
this.showOrganizations = !!showEntity["organization"];
|
|
218 | 217 |
if (this.showPublications) { |
219 | 218 |
this.resultTypes.values.push({name: "Publications", id: "publications", selected: true, number: 0}); |
220 | 219 |
} |
... | ... | |
286 | 285 |
parameterNames.push("f0"); |
287 | 286 |
parameterValues.push("q"); |
288 | 287 |
} |
289 |
console.log(this.routerHelper.createQueryParams(parameterNames, parameterValues)) |
|
290 | 288 |
this._router.navigate([url], {queryParams: this.routerHelper.createQueryParams(parameterNames, parameterValues)}); |
291 | 289 |
} |
292 | 290 |
} |
Also available in: Unified diff
[Explore | Trunk]: Fix boolean variables for entities