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