Production release February 2024 [CONNECT] #34
|
@ -113,7 +113,7 @@
|
||||||
<div *ngFor="let subChild of child.children" style="margin-bottom: 5px;">
|
<div *ngFor="let subChild of child.children" style="margin-bottom: 5px;">
|
||||||
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(subChild)"
|
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(subChild)"
|
||||||
class="uk-link-text">
|
class="uk-link-text">
|
||||||
{{subChild.label}}
|
{{searchFieldsHelper.getFosParameter() == 'foslabel' ? subChild.label : subChild.id}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -139,7 +139,7 @@
|
||||||
</h3>
|
</h3>
|
||||||
<div *ngFor="let subSubItem of subItem.children" style="margin-bottom: 5px;">
|
<div *ngFor="let subSubItem of subItem.children" style="margin-bottom: 5px;">
|
||||||
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(subSubItem)"
|
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(subSubItem)"
|
||||||
class="uk-link-text" [innerHTML]="highlightKeyword(subSubItem.label)">
|
class="uk-link-text" [innerHTML]="highlightKeyword(searchFieldsHelper.getFosParameter() == 'foslabel' ? subSubItem.label : subSubItem.id)">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -15,6 +15,7 @@ import {PiwikService} from "../utils/piwik/piwik.service";
|
||||||
import {debounceTime, distinctUntilChanged} from "rxjs/operators";
|
import {debounceTime, distinctUntilChanged} from "rxjs/operators";
|
||||||
import Timeout = NodeJS.Timeout;
|
import Timeout = NodeJS.Timeout;
|
||||||
import {ISVocabulariesService} from "../utils/staticAutoComplete/ISVocabularies.service";
|
import {ISVocabulariesService} from "../utils/staticAutoComplete/ISVocabularies.service";
|
||||||
|
import {SearchFields} from "../utils/properties/searchFields";
|
||||||
|
|
||||||
declare var UIkit;
|
declare var UIkit;
|
||||||
|
|
||||||
|
@ -46,6 +47,7 @@ export class FosComponent implements OnInit, OnDestroy {
|
||||||
private timeout: Timeout;
|
private timeout: Timeout;
|
||||||
@ViewChild('tabs') tabs: ElementRef;
|
@ViewChild('tabs') tabs: ElementRef;
|
||||||
public sliderInit: boolean = false;
|
public sliderInit: boolean = false;
|
||||||
|
private searchFieldsHelper: SearchFields = new SearchFields();
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private vocabulariesService: ISVocabulariesService,
|
private vocabulariesService: ISVocabulariesService,
|
||||||
|
@ -217,6 +219,6 @@ export class FosComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
public buildFosQueryParam(fos) {
|
public buildFosQueryParam(fos) {
|
||||||
// return {'foslabel': this.urlEncodeAndQuote(fos.id+"||"+fos.label)};
|
// return {'foslabel': this.urlEncodeAndQuote(fos.id+"||"+fos.label)};
|
||||||
return (properties.environment !== 'production' ? ({'foslabel': this.urlEncodeAndQuote(fos.id+"||"+fos.label)}) : ({'fos': this.urlEncodeAndQuote(fos.id)}));
|
return (this.searchFieldsHelper.getFosParameter() == 'foslabel' ? ({'foslabel': this.urlEncodeAndQuote(fos.id+"||"+fos.label)}) : ({'fos': this.urlEncodeAndQuote(fos.id)}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ import {Component, EventEmitter, Input, Output} from "@angular/core";
|
||||||
import {RouterHelper} from "../../utils/routerHelper.class";
|
import {RouterHelper} from "../../utils/routerHelper.class";
|
||||||
import {properties} from "../../../../environments/environment";
|
import {properties} from "../../../../environments/environment";
|
||||||
import {StringUtils} from "../../utils/string-utils.class";
|
import {StringUtils} from "../../utils/string-utils.class";
|
||||||
|
import {SearchFields} from "../../utils/properties/searchFields";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'fos',
|
selector: 'fos',
|
||||||
|
@ -96,6 +97,7 @@ export class FosComponent {
|
||||||
public routerHelper: RouterHelper = new RouterHelper();
|
public routerHelper: RouterHelper = new RouterHelper();
|
||||||
public properties = properties;
|
public properties = properties;
|
||||||
public title: string = "Fields of Science";
|
public title: string = "Fields of Science";
|
||||||
|
private searchFieldsHelper: SearchFields = new SearchFields();
|
||||||
|
|
||||||
public viewAllClick() {
|
public viewAllClick() {
|
||||||
// if(this.subjects.length <= this.threshold*2) {
|
// if(this.subjects.length <= this.threshold*2) {
|
||||||
|
@ -122,11 +124,11 @@ export class FosComponent {
|
||||||
|
|
||||||
public buildFosQueryParam(fos) {
|
public buildFosQueryParam(fos) {
|
||||||
// return {'foslabel': this.urlEncodeAndQuote(fos.id+"||"+fos.label)};
|
// return {'foslabel': this.urlEncodeAndQuote(fos.id+"||"+fos.label)};
|
||||||
return (properties.environment !== 'production' ? ({'foslabel': this.urlEncodeAndQuote(fos.id+"||"+fos.label)}) : ({'fos': this.urlEncodeAndQuote(fos.id)}));
|
return (this.searchFieldsHelper.getFosParameter() == 'foslabel' ? ({'foslabel': this.urlEncodeAndQuote(fos.id+"||"+fos.label)}) : ({'fos': this.urlEncodeAndQuote(fos.id)}));
|
||||||
}
|
}
|
||||||
|
|
||||||
public buildFosHrefParam(fos): string {
|
public buildFosHrefParam(fos): string {
|
||||||
// return ('foslabel='+this.urlEncodeAndQuote(fos.id+"||"+fos.label));
|
// return ('foslabel='+this.urlEncodeAndQuote(fos.id+"||"+fos.label));
|
||||||
return (properties.environment !== 'production' ? ('foslabel='+this.urlEncodeAndQuote(fos.id+"||"+fos.label)) : ('fos='+this.urlEncodeAndQuote(fos.id)));
|
return (this.searchFieldsHelper.getFosParameter() == 'foslabel' ? ('foslabel='+this.urlEncodeAndQuote(fos.id+"||"+fos.label)) : ('fos='+this.urlEncodeAndQuote(fos.id)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ import {HostedByCollectedFrom, Organization} from "../../utils/result-preview/re
|
||||||
import {Dates, Identifier, StringUtils} from "../../utils/string-utils.class";
|
import {Dates, Identifier, StringUtils} from "../../utils/string-utils.class";
|
||||||
import {properties} from "../../../../environments/environment";
|
import {properties} from "../../../../environments/environment";
|
||||||
import {HelperFunctions} from "../../utils/HelperFunctions.class";
|
import {HelperFunctions} from "../../utils/HelperFunctions.class";
|
||||||
|
import {SearchFields} from "../../utils/properties/searchFields";
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ResultLandingService {
|
export class ResultLandingService {
|
||||||
|
@ -325,9 +326,13 @@ export class ResultLandingService {
|
||||||
this.resultLandingInfo.subjects = subjectResults[0];
|
this.resultLandingInfo.subjects = subjectResults[0];
|
||||||
this.resultLandingInfo.otherSubjects = subjectResults[1];
|
this.resultLandingInfo.otherSubjects = subjectResults[1];
|
||||||
this.resultLandingInfo.classifiedSubjects = subjectResults[2];
|
this.resultLandingInfo.classifiedSubjects = subjectResults[2];
|
||||||
|
|
||||||
if (subjectResults[3]) {
|
if (subjectResults[3]) {
|
||||||
|
let searchFieldsHelper: SearchFields = new SearchFields();
|
||||||
subjectResults[3].forEach(element => {
|
subjectResults[3].forEach(element => {
|
||||||
this.resultLandingInfo.fos.push({id: element, label: element.replace(/^\d+/, '').trim()});
|
this.resultLandingInfo.fos.push(
|
||||||
|
{id: element, label: searchFieldsHelper.getFosParameter() == "foslabel" ? element.replace(/^\d+/, '').trim() : element}
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (this.resultLandingInfo.fos) {
|
if (this.resultLandingInfo.fos) {
|
||||||
|
|
|
@ -16,7 +16,7 @@ export class SearchFieldsBase {
|
||||||
|
|
||||||
// Remove Collected From Filter "collectedfrom","collectedfrom"
|
// Remove Collected From Filter "collectedfrom","collectedfrom"
|
||||||
public RESULT_REFINE_FIELDS = [
|
public RESULT_REFINE_FIELDS = [
|
||||||
"instancetypename", properties.environment!='production'?"foslabel":'fos', "relfunder",
|
"instancetypename", "foslabel", "relfunder",
|
||||||
"relfundinglevel0_id", "relfundinglevel1_id", "relfundinglevel2_id",
|
"relfundinglevel0_id", "relfundinglevel1_id", "relfundinglevel2_id",
|
||||||
"relproject", "sdg", "country", "resultlanguagename", "resulthostingdatasource", "community"];
|
"relproject", "sdg", "country", "resultlanguagename", "resulthostingdatasource", "community"];
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ export class SearchFieldsBase {
|
||||||
{type: "refine", title: "", values: ["instancetypename"]},
|
{type: "refine", title: "", values: ["instancetypename"]},
|
||||||
{type: "range", title: "", values: ["resultacceptanceyear", "resultacceptanceyear"]},
|
{type: "range", title: "", values: ["resultacceptanceyear", "resultacceptanceyear"]},
|
||||||
{type: "refine", title: "", values: [
|
{type: "refine", title: "", values: [
|
||||||
properties.environment!='production'?"foslabel":'fos', "relfunder",
|
"foslabel", "relfunder",
|
||||||
"relfundinglevel0_id", "relfundinglevel1_id", "relfundinglevel2_id",
|
"relfundinglevel0_id", "relfundinglevel1_id", "relfundinglevel2_id",
|
||||||
"relproject", "sdg", "country", "resultlanguagename", "resulthostingdatasource", "community"
|
"relproject", "sdg", "country", "resultlanguagename", "resulthostingdatasource", "community"
|
||||||
]}
|
]}
|
||||||
|
@ -954,6 +954,10 @@ export class SearchFieldsBase {
|
||||||
}
|
}
|
||||||
return "or";
|
return "or";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getFosParameter() {
|
||||||
|
return this.RESULT_REFINE_FIELDS.includes("foslabel") ? "foslabel" : "fos";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class FieldDetails {
|
export class FieldDetails {
|
||||||
|
|
Loading…
Reference in New Issue