[Aggregator | develop]: In search bars, set in placeholder the portal name according to the configuration name.
1. home.component: Get portalName by config.portalAsObservable>name and set placeholder to "Search "+portalName. 2. portal.ts: Added parameter "name: string" in method "getMockCommunityInfo()" and set communityInfo.name = name; 3. aggregators.ts: In method "getCommunityInfoByMenuId()", added "name" parameter in Portal.getMockCommunityInfo() | Updated titles in PortalAggregators>AggregatorInfo.
This commit is contained in:
parent
4c2de1138e
commit
d1543953a2
|
@ -13,7 +13,7 @@
|
||||||
Advanced search
|
Advanced search
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div search-input [(value)]="keyword" [placeholder]="'Search in Explore'" (searchEmitter)="goTo(true)"
|
<div search-input [(value)]="keyword" [placeholder]="'Search'+(portalName ? (' in '+portalName) : '')" (searchEmitter)="goTo(true)"
|
||||||
[searchInputClass]="'inner background'"></div>
|
[searchInputClass]="'inner background'"></div>
|
||||||
<!-- <advanced-search-input #advanced (searchEmitter)="goTo(true)">-->
|
<!-- <advanced-search-input #advanced (searchEmitter)="goTo(true)">-->
|
||||||
<!-- <entities-selection [simpleView]="true" currentEntity="all" [selectedEntity]="selectedEntity"-->
|
<!-- <entities-selection [simpleView]="true" currentEntity="all" [selectedEntity]="selectedEntity"-->
|
||||||
|
|
|
@ -26,6 +26,7 @@ import {Numbers, NumbersComponent} from "../openaireLibrary/sharedComponents/num
|
||||||
styleUrls: ['home.component.less']
|
styleUrls: ['home.component.less']
|
||||||
})
|
})
|
||||||
export class HomeComponent {
|
export class HomeComponent {
|
||||||
|
public portalName: string = "";
|
||||||
public keyword: string = "";
|
public keyword: string = "";
|
||||||
public searchFields: SearchFields = new SearchFields();
|
public searchFields: SearchFields = new SearchFields();
|
||||||
public errorCodes: ErrorCodes = new ErrorCodes();
|
public errorCodes: ErrorCodes = new ErrorCodes();
|
||||||
|
@ -112,6 +113,9 @@ export class HomeComponent {
|
||||||
}
|
}
|
||||||
this.subs.push(this.config.portalAsObservable.subscribe(data => {
|
this.subs.push(this.config.portalAsObservable.subscribe(data => {
|
||||||
if (data) {
|
if (data) {
|
||||||
|
if(data.name) {
|
||||||
|
this.portalName = data.name;
|
||||||
|
}
|
||||||
var showEntity = {};
|
var showEntity = {};
|
||||||
for (var i = 0; i < data['entities'].length; i++) {
|
for (var i = 0; i < data['entities'].length; i++) {
|
||||||
showEntity["" + data['entities'][i]["pid"] + ""] = data['entities'][i]["isEnabled"];
|
showEntity["" + data['entities'][i]["pid"] + ""] = data['entities'][i]["isEnabled"];
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 2f989107123ae674aba4907b113e4498a8f87786
|
Subproject commit 27f644aad1f4568a03bafbbd3d1640568a725957
|
|
@ -36,7 +36,7 @@ export class AggregatorInfo {
|
||||||
|
|
||||||
export class PortalAggregators {
|
export class PortalAggregators {
|
||||||
static list: AggregatorInfo[] = [
|
static list: AggregatorInfo[] = [
|
||||||
new AggregatorInfo("canada", "Canadian Aggregator", "assets/canada-logo.png", "Country",
|
new AggregatorInfo("canada", "Canada Explore", "assets/canada-logo.png", "Country",
|
||||||
"country", "CA", "Canada",
|
"country", "CA", "Canada",
|
||||||
"Portal to Canadian Research Outputs", `<span>
|
"Portal to Canadian Research Outputs", `<span>
|
||||||
Welcome to the Portal of Canadian Research Outputs. This has been developed as part of a collaboration between
|
Welcome to the Portal of Canadian Research Outputs. This has been developed as part of a collaboration between
|
||||||
|
@ -70,8 +70,8 @@ export class PortalAggregators {
|
||||||
|
|
||||||
}
|
}
|
||||||
`),
|
`),
|
||||||
new AggregatorInfo("italy", "Italian Aggregator", "assets/common-assets/logo-small-aggregator.png", "Country", "country", "IT", "Italy"),
|
new AggregatorInfo("italy", "Italy Explore", "assets/common-assets/logo-small-aggregator.png", "Country", "country", "IT", "Italy"),
|
||||||
new AggregatorInfo("greece", "Greek Aggregator", "assets/common-assets/logo-small-aggregator.png", "Country", "country", "GR", "Greece")
|
new AggregatorInfo("greece", "Greece Explore", "assets/common-assets/logo-small-aggregator.png", "Country", "country", "GR", "Greece")
|
||||||
];
|
];
|
||||||
static disabled = {
|
static disabled = {
|
||||||
"canada": {pages: ["/search/find/services"], entities: ["service"]},
|
"canada": {pages: ["/search/find/services"], entities: ["service"]},
|
||||||
|
@ -105,9 +105,9 @@ export class PortalAggregators {
|
||||||
|
|
||||||
public static getCommunityInfoByMenuId(menuId: string): any {
|
public static getCommunityInfoByMenuId(menuId: string): any {
|
||||||
if(PortalAggregators.disabled[menuId]){
|
if(PortalAggregators.disabled[menuId]){
|
||||||
return Portal.getMockCommunityInfo(menuId, PortalAggregators.disabled[menuId].entities,PortalAggregators.disabled[menuId].pages);
|
return Portal.getMockCommunityInfo(menuId, PortalAggregators.getFilterInfoByMenuId(menuId).title, PortalAggregators.disabled[menuId].entities,PortalAggregators.disabled[menuId].pages);
|
||||||
}
|
}
|
||||||
return Portal.getMockCommunityInfo(menuId, [],[]);
|
return Portal.getMockCommunityInfo(menuId, PortalAggregators.getFilterInfoByMenuId(menuId).title, [],[]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 2fffe0fa672adcf5577461d10c30e34b00308c85
|
Subproject commit cf3dab89f7356b88abfe6f125930076466e8a780
|
Loading…
Reference in New Issue