diff --git a/src/app/app.component.ts b/src/app/app.component.ts index dc9acd2..cdd4307 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -236,7 +236,7 @@ export class AppComponent { { rootItem: new MenuItem("search", "Search", "", "/search/find", false, [], ["/search/find"], {}), items: [ - new MenuItem("", "Research outcomes", "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], {}), + new MenuItem("", "Research outcomes", "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], {resultbestaccessright: '"' + encodeURIComponent("Open Access") + '"'}), new MenuItem("", "Projects", "", "/search/find/projects/", false, ["project"], ["/search/find/projects"], {}), new MenuItem("", "Content Providers", "", "/search/find/dataproviders", false, ["datasource"], ["/search/find/dataproviders"], {}), ] diff --git a/src/app/community/community.component.ts b/src/app/community/community.component.ts index 141382f..3ef1560 100644 --- a/src/app/community/community.component.ts +++ b/src/app/community/community.component.ts @@ -28,6 +28,7 @@ import {ErrorCodes} from "../openaireLibrary/utils/properties/errorCodes"; import {Subscription} from "rxjs"; import {properties} from "../../environments/environment"; import {ConnectHelper} from "../openaireLibrary/connect/connectHelper"; +import {Filter} from "../openaireLibrary/searchPages/searchUtils/searchHelperClasses.class"; @Component({ selector: 'community', @@ -101,7 +102,13 @@ export class CommunityComponent { keyword: string = ""; customFilter; placeholderText = "Search by title, author, abstract, DOI, orcid... "; - + resultsQuickFilter: { filter: Filter, selected: boolean, filterId: string, value: string } = { + filter: null, + selected: true, + filterId: "resultbestaccessright", + value: "Open Access" + }; + constructor( private element: ElementRef, private route: ActivatedRoute, @@ -460,6 +467,12 @@ export class CommunityComponent { let url = (simple) ? this.selectedEntitySimpleUrl : this.selectedEntityAdvancedUrl; let parameterNames = []; let parameterValues = []; + + if (this.selectedEntity == "result" && this.resultsQuickFilter && this.resultsQuickFilter.selected) { + parameterNames.push(this.resultsQuickFilter.filterId); + parameterValues.push('"'+ encodeURIComponent(this.resultsQuickFilter.value)+'"'); + } + if (this.keyword.length > 0) { parameterNames.push("fv0"); parameterValues.push(this.keyword);