[develop | DONE | ADDED] Add title prefix for research outcomes based on custom filters
This commit is contained in:
parent
c60b661308
commit
7fe91d164d
|
@ -10,8 +10,8 @@ import {CustomFilterService} from "../../../shared/customFilter.service";
|
|||
[customFilters]=customFilters [hasPrefix]="false"
|
||||
[showBreadcrumb]="false"
|
||||
[showSwitchSearchLink]="true"
|
||||
[searchForm]="{dark: false, class: 'search-form'}"
|
||||
|
||||
[searchForm]="{dark: false, class: 'search-form'}"
|
||||
[pageTitlePrefix]="title"
|
||||
></search-research-results>
|
||||
`
|
||||
})
|
||||
|
|
|
@ -18,6 +18,7 @@ export abstract class SearchBaseComponent extends BaseComponent implements OnIni
|
|||
this.subscriptions.push((this.customFilterService.getCustomFilterAsObservable().subscribe(customFilters => {
|
||||
if (customFilters && customFilters.length > 0) {
|
||||
this.customFilters = customFilters;
|
||||
this.setStakeholderPrefixInMetadata();
|
||||
}
|
||||
})));
|
||||
this.subscriptions.push(this.route.params.subscribe(params => {
|
||||
|
@ -26,6 +27,7 @@ export abstract class SearchBaseComponent extends BaseComponent implements OnIni
|
|||
this.subscriptions.push((this.customFilterService.getCustomFilterAsObservable().subscribe(customFilters => {
|
||||
if (customFilters && customFilters.length > 0) {
|
||||
this.customFilters = customFilters;
|
||||
this.setStakeholderPrefixInMetadata();
|
||||
}
|
||||
})));
|
||||
} else {
|
||||
|
@ -58,4 +60,8 @@ export abstract class SearchBaseComponent extends BaseComponent implements OnIni
|
|||
delete this.parameters['fv0'];
|
||||
}
|
||||
}
|
||||
|
||||
setStakeholderPrefixInMetadata(){
|
||||
this.title = (this.customFilters.length > 1?this.customFilters[1].valueName:this.customFilters[0].valueName) + " | ";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ import {OpenaireEntities} from "../../../openaireLibrary/utils/properties/search
|
|||
</div>
|
||||
</div>
|
||||
<search-research-results *ngIf="customFilters" [customFilters]="customFilters" resultType="result"
|
||||
[hasPrefix]="false"
|
||||
[hasPrefix]="false" [pageTitlePrefix]="title"
|
||||
[includeOnlyResultsAndFilter]="true" [showBreadcrumb]="false"
|
||||
[showSwitchSearchLink]="false"
|
||||
[searchForm]="{dark: false, class: 'search-form'}"></search-research-results>
|
||||
|
|
Loading…
Reference in New Issue