diff --git a/searchPages/find/searchAll.component.html b/searchPages/find/searchAll.component.html index e2480460..5bde81ca 100644 --- a/searchPages/find/searchAll.component.html +++ b/searchPages/find/searchAll.component.html @@ -27,7 +27,7 @@ -
+
diff --git a/searchPages/searchUtils/newSearchPage.component.html b/searchPages/searchUtils/newSearchPage.component.html index b0e333a2..acca3a2f 100644 --- a/searchPages/searchUtils/newSearchPage.component.html +++ b/searchPages/searchUtils/newSearchPage.component.html @@ -71,6 +71,15 @@
+ + + + +
@@ -91,24 +100,42 @@ Filters temporarily unavailable. Please try again later.
    -
  • - +
  • +
  • - -
  • - +
  • + + +
  • +
  • + +
  • + +
  • +
  • -
  • - + +
  • + + + + + +
  • +
    + +
  • + +
  • +
    +
  • +
@@ -199,11 +226,11 @@
-
- - -
+ + + + +
diff --git a/searchPages/searchUtils/newSearchPage.component.ts b/searchPages/searchUtils/newSearchPage.component.ts index dfda1d97..c2a4ae31 100644 --- a/searchPages/searchUtils/newSearchPage.component.ts +++ b/searchPages/searchUtils/newSearchPage.component.ts @@ -430,7 +430,9 @@ export class NewSearchPageComponent implements OnInit, OnDestroy, OnChanges { var dependentTo = this.searchFieldsHelper.DEPENDENT_FIELDS[this.refineFields[i]]; //if filter is not marked as hidden OR it is hidden but it is dependent to a field that it IS selected - if (this.searchFieldsHelper.HIDDEN_FIELDS.indexOf(this.refineFields[i]) == -1 || (selected_filters.indexOf(dependentTo) != -1) || (selected_filters.indexOf(this.refineFields[i]) != -1)) { + if (this.searchFieldsHelper.HIDDEN_FIELDS.indexOf(this.refineFields[i]) == -1 + || (selected_filters.indexOf(dependentTo) != -1) || (selected_filters.indexOf(this.refineFields[i]) != -1) + || (this.resultTypes && this.resultTypes.filterId == dependentTo && this.resultTypes.countSelectedValues > 0)) { fields.push(this.refineFields[i]); } } @@ -1718,4 +1720,8 @@ export class NewSearchPageComponent implements OnInit, OnDestroy, OnChanges { } return totalPages; } -} + + public getFilterById(filterId: string): Filter { + return this.filters.find(filter => filter.filterId == filterId); + } + } diff --git a/searchPages/searchUtils/quick-selections.component.ts b/searchPages/searchUtils/quick-selections.component.ts index ad1cfb97..97e83847 100644 --- a/searchPages/searchUtils/quick-selections.component.ts +++ b/searchPages/searchUtils/quick-selections.component.ts @@ -11,27 +11,35 @@ import {OpenaireEntities} from "../../utils/properties/searchFields"; @Component({ selector: 'quick-selections', template: ` -
- - {{quickFilter.value}} - -
-
-
Include:
-
-
- -
- - -
-
+
+
+ + {{quickFilter.value}} + +
+
+
Include:
+
+
+ +
+ + +
+
+
+ +
+ +
` }) export class QuickSelectionsComponent { + @Input() vertical: boolean=false; @Input() resultTypes:Filter; @Output() typeChange = new EventEmitter(); @Input() isDisabled; diff --git a/utils/properties/searchFields.ts b/utils/properties/searchFields.ts index 3043e422..02183b1c 100644 --- a/utils/properties/searchFields.ts +++ b/utils/properties/searchFields.ts @@ -694,7 +694,7 @@ export class SearchFields { //add project field depending on funder public HIDDEN_FIELDS: string[] = ["fundinglevel0_id", "fundinglevel1_id", "fundinglevel2_id", - "relfundinglevel0_id", "relfundinglevel1_id", "relfundinglevel2_id", "relproject"]; + "relfundinglevel0_id", "relfundinglevel1_id", "relfundinglevel2_id", "relproject", "instancetypename"]; public DEPENDENT_FIELDS: { [key: string]: string } = { ["relproject"]: "relfunder", @@ -703,7 +703,8 @@ export class SearchFields { ["fundinglevel2_id"]: "fundinglevel1_id", ["relfundinglevel0_id"]: "relfunder", ["relfundinglevel1_id"]: "relfundinglevel0_id", - ["relfundinglevel2_id"]: "relfundinglevel1_id" + ["relfundinglevel2_id"]: "relfundinglevel1_id", + ["instancetypename"]: "type" };