Fixing bug with community in menu | add changes for root items in navigationBar
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@51415 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
37ae936f5c
commit
0027a05c4a
|
@ -19,7 +19,7 @@ import {ConnectHelper} from './utils/connectHelper';
|
|||
|
||||
<navbar *ngIf= "properties && showMenu && !community" portal="connect" onlyTop=false [userMenuItems]=userMenuItems [menuItems]=menuItems
|
||||
[(APIUrl)]="properties.adminToolsAPIURL" [(logInUrl)]="properties.loginUrl" [(logOutUrl)]="properties.logoutUrl" [(cookieDomain)]="properties.cookieDomain" [showMenu]=showMenu></navbar>
|
||||
<navbar *ngIf= "properties && community" portal="connect" onlyTop=false [communityId]="community.id" [userMenuItems]=userMenuItems [menuItems]=menuItems
|
||||
<navbar *ngIf= "properties && community" portal="connect" onlyTop=false [(communityId)]="community.id" [userMenuItems]=userMenuItems [menuItems]=menuItems
|
||||
[(APIUrl)]="properties.adminToolsAPIURL" [(logInUrl)]="properties.loginUrl" [(logOutUrl)]="properties.logoutUrl" [(cookieDomain)]="properties.cookieDomain" [(community)]=community [showMenu]=showMenu></navbar>
|
||||
|
||||
<div class="custom-main-content" >
|
||||
|
@ -51,6 +51,7 @@ export class AppComponent {
|
|||
public community = null;
|
||||
properties:EnvProperties;
|
||||
showMenu:boolean = false;
|
||||
communities = null;
|
||||
// community: {id:string, name:string, logoUrl:string};
|
||||
constructor( private route: ActivatedRoute, private propertiesService:EnvironmentSpecificService, private _communitiesService:CommunitiesService ) {
|
||||
}
|
||||
|
@ -63,6 +64,7 @@ export class AppComponent {
|
|||
|
||||
this.route.queryParams.subscribe(data => {
|
||||
var community = null;
|
||||
this.community = null;
|
||||
this.showMenu = false;
|
||||
this._communitiesService.getCommunities(this.properties.communityAPI+"communities").subscribe (
|
||||
communities => {
|
||||
|
@ -82,7 +84,6 @@ export class AppComponent {
|
|||
|| (ConnectHelper.getCommunityFromDomain(document.location.hostname) == com.communityId )){
|
||||
community = com;
|
||||
this.community = {id: community.communityId, name: (community.shortTitle)?community.shortTitle:community.title, logoUrl:community.logoUrl};
|
||||
|
||||
this.menuItems= [
|
||||
{rootItem: new MenuItem("home","Home",(typeof document !== 'undefined' && ConnectHelper.isProduction(document.location.hostname))?'https://beta.connect.openaire.eu':'',(typeof document === 'undefined' || !ConnectHelper.isProduction(document.location.hostname))?'/':'',false,[],[],{}),
|
||||
items: []},
|
||||
|
@ -116,7 +117,6 @@ export class AppComponent {
|
|||
|
||||
}
|
||||
if(community == null){
|
||||
|
||||
this.menuItems= [
|
||||
{rootItem: new MenuItem("communities","Communities","","/",false,[],[],{}),
|
||||
items: []}
|
||||
|
|
Loading…
Reference in New Issue