[master]: Fix links to search pages
This commit is contained in:
parent
a834890ddb
commit
69550193c3
|
@ -218,5 +218,6 @@ export class RepositoryComponent extends StakeholderBaseComponent implements OnI
|
|||
super.ngOnDestroy();
|
||||
this.layoutService.setRootClass(null);
|
||||
this.setProperties(Irish.irishAdminToolsCommunity, Irish.irishAdminToolsPortalType, this.configurationService);
|
||||
LinksResolver.resetProperties();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -133,8 +133,6 @@ export class ResearcherComponent extends ResearcherBaseComponent implements OnI
|
|||
LinksResolver.resetProperties();
|
||||
LinksResolver.setSearchAndResultLanding("researcher/" + this.authorId);
|
||||
this.setMetadata();
|
||||
|
||||
|
||||
},
|
||||
error: () => {
|
||||
this._router.navigate([properties.errorLink]);
|
||||
|
@ -178,6 +176,7 @@ export class ResearcherComponent extends ResearcherBaseComponent implements OnI
|
|||
ngOnDestroy() {
|
||||
super.ngOnDestroy();
|
||||
this.layoutService.setRootClass(null);
|
||||
LinksResolver.resetProperties();
|
||||
}
|
||||
|
||||
getPercentage(){
|
||||
|
|
|
@ -146,6 +146,7 @@ export class RfoComponent extends StakeholderBaseComponent implements OnInit {
|
|||
super.ngOnDestroy();
|
||||
this.layoutService.setRootClass(null);
|
||||
this.setProperties(Irish.irishAdminToolsCommunity, Irish.irishAdminToolsPortalType, this.configurationService);
|
||||
LinksResolver.resetProperties();
|
||||
}
|
||||
|
||||
get isManager() {
|
||||
|
|
|
@ -147,6 +147,7 @@ export class RpoComponent extends StakeholderBaseComponent implements OnInit {
|
|||
super.ngOnDestroy();
|
||||
this.layoutService.setRootClass(null);
|
||||
this.setProperties(Irish.irishAdminToolsCommunity, Irish.irishAdminToolsPortalType, this.configurationService);
|
||||
LinksResolver.resetProperties();
|
||||
}
|
||||
|
||||
get isManager() {
|
||||
|
|
|
@ -58,17 +58,12 @@ export class LinksResolver {
|
|||
errorLink: properties.errorLink
|
||||
};
|
||||
|
||||
public static setDefaultProperties(alias: string) {
|
||||
Object.keys(this.default).forEach(field => {
|
||||
this.default[field] = "/" + alias + (<string>this.default[field]);
|
||||
});
|
||||
}
|
||||
|
||||
public static setProperties(alias: string) {
|
||||
Object.keys(this.default).forEach(field => {
|
||||
properties[field] = "/" + alias + (<string>this.default[field]);
|
||||
});
|
||||
}
|
||||
|
||||
public static setSearchAndResultLanding(alias: string) {
|
||||
properties.searchLinkToResult= "/" + alias + this.default.searchLinkToResult;
|
||||
properties.searchLinkToPublication= "/" + alias + this.default.searchLinkToPublication;
|
||||
|
@ -82,9 +77,8 @@ export class LinksResolver {
|
|||
properties.searchLinkToAdvancedOrps= "/" + alias + this.default.searchLinkToAdvancedOrps;
|
||||
|
||||
}
|
||||
|
||||
public static resetProperties() {
|
||||
Object.keys(this.default).forEach(field => {
|
||||
properties[field] = this.default[field];
|
||||
});
|
||||
this.setProperties('national/');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ export class Irish {
|
|||
public portal: Portal = Portal.getMockCommunityInfo("noami", "Noami",['service'],['/search/advanced/services', '/search/find/services']);
|
||||
|
||||
constructor() {
|
||||
LinksResolver.setDefaultProperties('national/');
|
||||
LinksResolver.resetProperties();
|
||||
|
||||
StakeholderConfiguration.ROLES.manager = 'primary dashboard manager';
|
||||
StakeholderConfiguration.ROLES.member = 'manager';
|
||||
|
|
Loading…
Reference in New Issue