Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop

This commit is contained in:
Konstantinos Triantafyllou 2023-07-11 16:03:14 +03:00
commit 1785da3c45
1 changed files with 6 additions and 3 deletions

View File

@ -93,7 +93,8 @@ export class SearchAllComponent {
// @Input() formPlaceholderText = "Search for "+OpenaireEntities.RESULTS+", "+OpenaireEntities.PROJECTS+", "+OpenaireEntities.DATASOURCES+" & "+OpenaireEntities.ORGANIZATIONS+" in OpenAIRE";
@Input() searchForm: SearchForm = {class: 'search-form', dark: true}
@Input() breadcrumbs: Breadcrumb[] = [];
@Input() openAccess: boolean = true;
subs: Subscription[] = [];
quickFilter: { filter: Filter, selected: boolean, filterId: string, value: string } = {
@ -421,7 +422,7 @@ export class SearchAllComponent {
this.reload["result"] = false;
this.fetchPublications.results = [];
//Add Open Access Filter
this.subs.push(this.numOfSearchResults(this.fetchPublications, (refineParams ? (refineParams + '&') : '') + "&fq=resultbestaccessright%20exact%20%22Open%20Access%22"));
this.subs.push(this.numOfSearchResults(this.fetchPublications, (refineParams ? (refineParams + '&') : '') + (this.openAccess ? "&fq=resultbestaccessright%20exact%20%22Open%20Access%22" : "")));
}
if (this.activeEntity != "projects" && this.reload["projects"] && this.showProjects) {
@ -607,7 +608,9 @@ export class SearchAllComponent {
}
if (entity == "result") {
entity = "research-outcomes";
this.parameters["resultbestaccessright"] = '"' + encodeURIComponent("Open Access") + '"';
if(!!this.openAccess) {
this.parameters["resultbestaccessright"] = '"' + encodeURIComponent("Open Access") + '"';
}
}
this.router.navigate(["/search/find", entity], {queryParams: this.parameters});
}