diff --git a/searchPages/searchUtils/newSearchPage.component.html b/searchPages/searchUtils/newSearchPage.component.html index d46370b5..7c095fb0 100644 --- a/searchPages/searchUtils/newSearchPage.component.html +++ b/searchPages/searchUtils/newSearchPage.component.html @@ -1,5 +1,13 @@
+ + + + {{customFilter.valueName}} + + + @@ -249,7 +257,9 @@ addClass=" " [breadcrumbs]="breadcrumbs"> -
+
@@ -615,7 +625,7 @@ [class.switcher_active]="filterToggle">
- diff --git a/searchPages/searchUtils/newSearchPage.component.ts b/searchPages/searchUtils/newSearchPage.component.ts index ab561c6b..17c8be80 100644 --- a/searchPages/searchUtils/newSearchPage.component.ts +++ b/searchPages/searchUtils/newSearchPage.component.ts @@ -107,6 +107,7 @@ export class NewSearchPageComponent { //Dashboard filterToggle = false; + customFilterEnabled:boolean = false; constructor(private route: ActivatedRoute, private location: Location, private _meta: Meta, @@ -139,6 +140,7 @@ export class NewSearchPageComponent { if (params['page'] && params['page']!=1) { HelperFunctions.scrollToId("searchForm"); } + this.customFilterEnabled = params['cf'] && params['cf'] == "true"; }); var description = "Openaire, search, repositories, open access, type, content provider, funder, project, " + this.pageTitle; @@ -867,7 +869,8 @@ export class NewSearchPageComponent { allFqs += fq; } } - if(this.customFilter && this.customFilter.isHiddenFilter){ + this.customFilterEnabled = URLparams["cf"] == "true"; + if(this.customFilter && (this.customFilter.isHiddenFilter || (this.refineFields.indexOf(this.customFilter.queryFieldName) == -1 && this.customFilterEnabled))){ allFqs += "&fq=" + StringUtils.URIEncode(this.customFilter.queryFieldName + " exact " + StringUtils.quote((this.customFilter.valueId))); } @@ -1192,7 +1195,10 @@ public static createRangeFilterQuery(rangeField,selectedFromValue, selectedToVal this.parameterValues.push("" + this.quickFilter.selected); } } - + if(this.customFilterEnabled){ + this.parameterNames.push("cf"); + this.parameterValues.push("true"); + } // if (this.searchUtils.size != this.resultsPerPage) { // // allLimits += ((allLimits.length == 0) ? '?' : '&') + 'size=' + this.searchUtils.size; // this.parameterNames.push("size");