[Trunk | Connect]: app.component.ts & community.component.ts: Set open access filter in research outcomes, on search form of first page and on menu.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@61040 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
91c39690e3
commit
55cf2937c1
|
@ -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"], {}),
|
||||
]
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue