diff --git a/searchPages/searchResearchResults.module.ts b/searchPages/searchResearchResults.module.ts index a0cbfd43..07a6cf5e 100644 --- a/searchPages/searchResearchResults.module.ts +++ b/searchPages/searchResearchResults.module.ts @@ -3,7 +3,6 @@ import {CommonModule} from '@angular/common'; import {FormsModule} from '@angular/forms'; import {SearchResearchResultsServiceModule} from '../services/searchResearchResultsService.module'; -import {IsRouteEnabled} from '../error/isRouteEnabled.guard'; import {SearchResearchResultsComponent} from "./searchResearchResults.component"; import {NewSearchPageModule} from "./searchUtils/newSearchPage.module"; diff --git a/searchPages/searchUtils/entitiesSelection.component.ts b/searchPages/searchUtils/entitiesSelection.component.ts index bc28587a..9c8a4052 100644 --- a/searchPages/searchUtils/entitiesSelection.component.ts +++ b/searchPages/searchUtils/entitiesSelection.component.ts @@ -103,7 +103,7 @@ export class EntitiesSelectionComponent { ngOnInit() { this.show = 0; if (this.properties) { - if((this.customFilter && this.customFilter.queryFieldName == "communityId") || (this.properties.adminToolsCommunity !== "monitor" && this.properties.adminToolsPortalType !=='aggregator')) { + if((this.customFilter && this.customFilter.queryFieldName == "communityId") || (this.properties.adminToolsCommunity !== "monitor" )) { //this.config.getCommunityInformation(this.properties, (this.customFilter && this.customFilter.queryFieldName == "communityId") ? this.customFilter.valueId : this.properties.adminToolsCommunity).subscribe(data => { this.subs.push(this.config.communityInformationState.subscribe(data => { if(data) { @@ -176,17 +176,6 @@ export class EntitiesSelectionComponent { this.show = 3;*/ this.show = 1; this.disableSelect = true; - }else if(this.properties.adminToolsPortalType =='aggregator'){ - this.showResearchOutcomes = true; - this.showPublications = true; - this.showDatasets = true; - this.showSoftware = true; - this.showOther = true; - this.showProjects = true; - this.showOrganizations = true; - this.showDataProviders = true; - this.showAll = true; - this.show = 5; } else { this.showResearchOutcomes = true; this.showPublications = true; diff --git a/searchPages/searchUtils/quick-selections.component.ts b/searchPages/searchUtils/quick-selections.component.ts index 1b4ba9d3..9c9919d3 100644 --- a/searchPages/searchUtils/quick-selections.component.ts +++ b/searchPages/searchUtils/quick-selections.component.ts @@ -92,9 +92,9 @@ export class QuickSelectionsComponent { this.queryParams = Object.assign({}, params); this.initializeFilters(); })); - - if(this.properties && !this.initialized) { - if(this.properties.adminToolsCommunity !== "monitor" && this.properties.adminToolsPortalType !== "aggregator" ) { + //Allow all types + /* if(this.properties && !this.initialized) { + if(this.properties.adminToolsCommunity !== "monitor") { this.subs.push(this.config.communityInformationState.subscribe(data => { if(data) { var showEntity = {}; @@ -117,7 +117,7 @@ export class QuickSelectionsComponent { this.showEntities = true; this.initializeFilters(); })); - } else { + } else {*/ this.showPublications = true; this.showDatasets = true; this.showSoftware = true; @@ -125,11 +125,11 @@ export class QuickSelectionsComponent { this.showEntities = true; this.initialized = true; this.initializeFilters(); - } + /*} }else{ this.initializeFilters(); - } + }*/ } initializeFilters(){ diff --git a/searchPages/searchUtils/searchFilter.component.ts b/searchPages/searchUtils/searchFilter.component.ts index 9510c118..221f0ecb 100644 --- a/searchPages/searchUtils/searchFilter.component.ts +++ b/searchPages/searchUtils/searchFilter.component.ts @@ -244,12 +244,8 @@ export class SearchFilterComponent implements OnInit, OnChanges{ } getParams(filter:Filter, value:Value){ let params = Object.assign({}, this.queryParams); - let qf=false; - if(this.quickFilter && this.quickFilter.filterId == filter.filterId && this.quickFilter.selected && value.id == this.quickFilter.value){ - params['qf']="false"; - qf=true; - } - if(params[filter.filterId] && this.checkIfValueIndexOf(params[filter.filterId].split(','),value.id)==-1 && !qf) { + let isValueSelected = true; + if(params[filter.filterId] && this.checkIfValueIndexOf(params[filter.filterId].split(','),value.id)==-1) { //has other values of this filter --> add this value params[filter.filterId] = params[filter.filterId] + ',' + '"' + encodeURIComponent(value.id) + '"'; }else if(params[filter.filterId] && this.checkIfValueIndexOf(params[filter.filterId].split(','),value.id)!=-1) { @@ -261,10 +257,15 @@ export class SearchFilterComponent implements OnInit, OnChanges{ if(values.length == 0){ delete params[filter.filterId]; } - } else if(!qf){ + isValueSelected = false; + } else{ //has no filter, no value --> add the value params[filter.filterId] = '"' + encodeURIComponent(value.id) + '"' ; } + //if it is the Quick filter set the if selected or not + if(this.quickFilter && this.quickFilter.filterId == filter.filterId && value.id == this.quickFilter.value){ + params['qf']=isValueSelected; + } delete params['page']; return params; } diff --git a/sharedComponents/navigationBar.component.html b/sharedComponents/navigationBar.component.html index 8c0df456..05b69fdf 100644 --- a/sharedComponents/navigationBar.component.html +++ b/sharedComponents/navigationBar.component.html @@ -50,7 +50,7 @@