[Library | new-theme]: Fixes in parsing of "eoscifguidelines" | Added EOSC Subject ("eoscifguidelines") in RESULT ADVANCED FIELDS (not in production for now).
1. resultLanding.service.ts: [Bug fix] Spelling error in parsing of "eoscifguidelines" field. 2. showSubjects.component.ts: [Bug fix] Do not show "EOSC" label in classified subjects, when no "eoscSubjects" parsed. 3. searchFields.ts: In RESULT_ADVANCED_FIELDS added "eoscifguidelines" | Added method "getResultAdvancedFields()", which does not include "eoscifguidelines" in "RESULT_ADVANCED_FIELDS" when environment == "production". 4. searchAll.component.ts & searchResearchResults.component.ts: Get searchFields.RESULT_ADVANCED_FIELDS from "getResultAdvancedFields()".
This commit is contained in:
parent
656a3634e2
commit
7ef47ab0ef
|
@ -18,7 +18,7 @@ import {properties} from "../../../../environments/environment";
|
|||
Subjects by Vocabulary
|
||||
</div>
|
||||
<ng-container *ngTemplateOutlet="subjects_by_vocabulary_template; context: {customClasses: 'multi-line-ellipsis lines-2', id: 'content'}"></ng-container>
|
||||
<ng-container *ngTemplateOutlet="eosc_subjects_template"></ng-container>
|
||||
<ng-container *ngIf="eoscSubjects && eoscSubjects.length > 0"><ng-container *ngTemplateOutlet="eosc_subjects_template"></ng-container></ng-container>
|
||||
<div *ngIf="isClassifiedLarge" class="uk-text-right">
|
||||
<a (click)="openSubjectsByVocabularyModal()" class="view-more-less-link">View all</a>
|
||||
</div>
|
||||
|
@ -97,7 +97,7 @@ import {properties} from "../../../../environments/environment";
|
|||
<modal-alert #subjectsByVocabularyModal *ngIf="(classifiedSubjects && classifiedSubjects.size > 0) || (eoscSubjects && eoscSubjects.length > 0)" large="true">
|
||||
<div class="uk-text-small">
|
||||
<ng-container *ngTemplateOutlet="subjects_by_vocabulary_template"></ng-container>
|
||||
<ng-container *ngTemplateOutlet="eosc_subjects_template"></ng-container>
|
||||
<ng-container *ngIf="eoscSubjects && eoscSubjects.length > 0"><ng-container *ngTemplateOutlet="eosc_subjects_template"></ng-container></ng-container>
|
||||
</div>
|
||||
</modal-alert>
|
||||
`
|
||||
|
|
|
@ -87,7 +87,7 @@ export class ResultLandingService {
|
|||
res[1]['oaf:result']['pid'], // 4
|
||||
res[1]['oaf:result']['journal'], // 5
|
||||
res[1]['oaf:result']['language'], // 6
|
||||
res[1]['oaf:result']['eoscifgiudelines'], // 7
|
||||
res[1]['oaf:result']['eoscifguidelines'], // 7
|
||||
res[1]['oaf:result']['subject'], // 8
|
||||
res[1]['oaf:result']['context'], // 9
|
||||
res[1]['oaf:result']['creator'], // 10
|
||||
|
|
|
@ -103,7 +103,7 @@ export class SearchAllComponent {
|
|||
resultTypes = {publication: true, dataset: true, software: true, other: true};
|
||||
|
||||
//adv Search Form
|
||||
public fieldIds: string[] = this.searchFields.RESULT_ADVANCED_FIELDS;
|
||||
public fieldIds: string[] = this.searchFields.getResultAdvancedFields();
|
||||
public fieldIdsMap = this.searchFields.RESULT_FIELDS;
|
||||
public selectedFields: AdvancedField[] = [];
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ export class SearchResearchResultsComponent {
|
|||
public searchUtils: SearchUtilsClass = new SearchUtilsClass();
|
||||
public searchFields: SearchFields = new SearchFields();
|
||||
|
||||
public fieldIds: string[] = this.searchFields.RESULT_ADVANCED_FIELDS;
|
||||
public fieldIds: string[] = this.searchFields.getResultAdvancedFields();
|
||||
public fieldIdsMap = this.searchFields.RESULT_FIELDS;
|
||||
public rangeFields: string[][] = this.searchFields.RESULT_RANGE_FIELDS;
|
||||
public selectedFields: AdvancedField[] = [];
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import {Filter} from "../../searchPages/searchUtils/searchHelperClasses.class";
|
||||
import {properties} from "../../../../environments/environment";
|
||||
|
||||
export class SearchFields {
|
||||
|
||||
|
@ -17,7 +18,7 @@ export class SearchFields {
|
|||
"relfundinglevel0_id", "relfundinglevel1_id", "relfundinglevel2_id",
|
||||
"relproject", "sdg", "country", "resultlanguagename", "resulthostingdatasource", "community"];
|
||||
|
||||
public RESULT_ADVANCED_FIELDS: string[] = ["q", "resulttitle", "resultauthor", "authorid", "resultdescription", "resultsubject", "resultpublisher",
|
||||
public RESULT_ADVANCED_FIELDS: string[] = ["q", "resulttitle", "resultauthor", "authorid", "resultdescription", "resultsubject", "eoscifguidelines", "resultpublisher",
|
||||
"resultbestaccessright", "community", "collectedfromdatasourceid", "resulthostingdatasourceid", "resultdateofacceptance",
|
||||
"relfunder",
|
||||
"relfundinglevel0_id", "relfundinglevel1_id", "relfundinglevel2_id",
|
||||
|
@ -56,6 +57,14 @@ export class SearchFields {
|
|||
equalityOperator: "=",
|
||||
filterType: null
|
||||
},
|
||||
["eoscifguidelines"]: {
|
||||
name: "EOSC Subject",
|
||||
type: "keyword",
|
||||
param: "eoscSubj",
|
||||
operator: "es",
|
||||
equalityOperator: " exact ",
|
||||
filterType: null
|
||||
},
|
||||
["resultdescription"]: {
|
||||
name: "Abstract",
|
||||
type: "keyword",
|
||||
|
@ -690,6 +699,16 @@ export class SearchFields {
|
|||
|
||||
constructor() {
|
||||
}
|
||||
|
||||
getResultAdvancedFields() {
|
||||
if(properties.environment == "production") {
|
||||
this.RESULT_ADVANCED_FIELDS = this.RESULT_ADVANCED_FIELDS.filter((value, index, array) => {
|
||||
return value != "eoscifguidelines";
|
||||
})
|
||||
}
|
||||
return this.RESULT_ADVANCED_FIELDS;
|
||||
}
|
||||
|
||||
getField(fieldId: string, fieldType: string): any {
|
||||
if (fieldType == "publication" || fieldType == "dataset" || fieldType == "software" || fieldType == "other" || fieldType == "result") {
|
||||
return this.RESULT_FIELDS[fieldId];
|
||||
|
|
Loading…
Reference in New Issue