[Library|Trunk]
- add checks for admin tool response - use property for admin portal url git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60040 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
defc495e88
commit
276a6c7fca
|
@ -163,7 +163,7 @@ export class SearchAllComponent {
|
|||
if ((this.customFilter && this.customFilter.queryFieldName == "communityId") || this.properties.adminToolsCommunity) {
|
||||
//this.config.getCommunityInformation(this.properties, (this.customFilter && this.customFilter.queryFieldName == "communityId") ? this.customFilter.valueId : this.properties.adminToolsCommunity).subscribe(data => {
|
||||
this.subs.push(this.config.communityInformationState.subscribe(data => {
|
||||
if(data) {
|
||||
if(data && data['entities']) {
|
||||
var showEntity = {};
|
||||
for (var i = 0; i < data['entities'].length; i++) {
|
||||
|
||||
|
|
|
@ -109,12 +109,16 @@ export class EntitiesSelectionComponent {
|
|||
if(data) {
|
||||
let showEntity = {};
|
||||
let showPage = {};
|
||||
for (let i = 0; i < data['entities'].length; i++) {
|
||||
if(data['entities']) {
|
||||
for (let 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"];
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < data['pages'].length; i++) {
|
||||
showPage["" + data['pages'][i]["route"] + ""] = data['pages'][i]["isEnabled"];
|
||||
if(data['pages']) {
|
||||
for (let i = 0; i < data['pages'].length; i++) {
|
||||
showPage["" + data['pages'][i]["route"] + ""] = data['pages'][i]["isEnabled"];
|
||||
}
|
||||
}
|
||||
this.showResearchOutcomes = showPage[this.simpleView?this.properties.searchLinkToResults:this.properties.searchLinkToAdvancedResults] && (showEntity["publication"] || showEntity["dataset"] || showEntity["software"] || showEntity["orp"]);
|
||||
this.showPublications = showPage[this.simpleView?this.properties.searchLinkToResults:this.properties.searchLinkToAdvancedResults] && showEntity["publication"];
|
||||
|
|
|
@ -101,13 +101,17 @@ export class NavigationBarComponent implements OnInit, OnDestroy{
|
|||
//this.config.getCommunityInformation(this.properties, this.communityId).subscribe(data => {
|
||||
this.subs.push(this.config.communityInformationState.subscribe(data => {
|
||||
if (data) {
|
||||
for (var i = 0; i < data['entities'].length; i++) {
|
||||
if(data['entities']) {
|
||||
for (var i = 0; i < data['entities'].length; i++) {
|
||||
|
||||
this.showEntity['' + data['entities'][i]['pid'] + ''] = data['entities'][i]['isEnabled'];
|
||||
this.showEntity['' + data['entities'][i]['pid'] + ''] = data['entities'][i]['isEnabled'];
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < data['pages'].length; i++) {
|
||||
this.showPage[data['pages'][i]['route']] = data['pages'][i]['isEnabled'];
|
||||
if(data['pages']) {
|
||||
for (var i = 0; i < data['pages'].length; i++) {
|
||||
this.showPage[data['pages'][i]['route']] = data['pages'][i]['isEnabled'];
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -20,7 +20,7 @@ export class Composer {
|
|||
}
|
||||
|
||||
private static manageNotificationSettings(communityId: string): string {
|
||||
return "Click <a href='https://beta.admin.connect.openaire.eu/manage-user-notifications?communityId="
|
||||
return "Click <a href='" + properties.adminPortalURL+ "/manage-user-notifications?communityId="
|
||||
+ communityId + "'>here</a> to manage your notification settings. ";
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import {EnvProperties} from "../properties/env-properties";
|
|||
@Component({
|
||||
selector: 'manage',
|
||||
template: `
|
||||
<a *ngIf="communityId" [href]="'https://beta.admin.connect.openaire.eu/dashboard?communityId='+communityId"
|
||||
<a *ngIf="communityId" [href]="properties.adminPortalURL + '/dashboard?communityId='+communityId"
|
||||
[class]=" ((buttonSizeSmall)?'uk-button-small':'')+' uk-button portal-button'"
|
||||
target="_blank">
|
||||
Manage
|
||||
|
|
Loading…
Reference in New Issue