Index: modules/uoa-connect-portal/trunk/src/app/app.component.ts
===================================================================
--- modules/uoa-connect-portal/trunk/src/app/app.component.ts	(revision 55386)
+++ modules/uoa-connect-portal/trunk/src/app/app.component.ts	(revision 55387)
@@ -56,8 +56,8 @@
   properties:EnvProperties;
   showMenu:boolean = false;
   communities = null;
-  subscriberOfCommunities = [];
-  managerOfCommunities = [];
+  subscriberOfCommunities = false;
+  managerOfCommunities = false;
 
   // layout = null;
   //  community: {id:string, name:string, logoUrl:string};
@@ -77,26 +77,36 @@
 
        this._communitiesService.getCommunities(this.properties, this.properties.communitiesAPI).subscribe (
          communities => {
-                console.log(communities);
+
                 for(var com of communities){
+                  if( (
+                    ((data['communityId'] && data['communityId']!="" &&  com.communityId  == data['communityId'])
+                  || (ConnectHelper.getCommunityFromDomain(this.properties.domain) ==  com.communityId ))
+                   && community !=null) ||
+                    (
+                      !((data['communityId'] && data['communityId']!="" &&  com.communityId  == data['communityId'])
+                      || (ConnectHelper.getCommunityFromDomain(this.properties.domain) ==  com.communityId ))
+                      &&
+                      this.managerOfCommunities && this.subscriberOfCommunities)){
+                      break;
+                    }
                   if(Session.isLoggedIn() && com['status'] != "hidden"){
                     if(Session.isCommunityCurator() || Session.isPortalAdministrator()){
-                      this.managerOfCommunities.push(com);
+                      this.managerOfCommunities = true;
                     }else if(com.managers.indexOf(Session.getUserEmail())!=-1){
-                      this.managerOfCommunities.push(com);
-                    }else{
+                      this.managerOfCommunities = true;
+                    }else if(!this.subscriberOfCommunities){
                       // check if subscriber
-                      if(com['status'] != "private"){
-                        this._subscribeService.isSubscribedToCommunity(com.communityId, Session.getUserEmail(), this.properties.adminToolsAPIURL).subscribe (
-                          isSubscriber => {
-                            if(isSubscriber) {
-                              this.subscriberOfCommunities.push(com);
-                            }
-                          },
-                          error => {
-                            console.error("Error fetching your subscribed communities")
-                          });
-                      }
+                      this._subscribeService.isSubscribedToCommunity(com.communityId, Session.getUserEmail(), this.properties.adminToolsAPIURL).subscribe (
+                        isSubscriber => {
+                          if(isSubscriber) {
+                            this.subscriberOfCommunities = true;
+                          }
+                        },
+                        error => {
+                          console.error("Error fetching your subscribed communities")
+                        });
+
                     }
                   }
 
@@ -145,15 +155,26 @@
                 if(community == null){
                   this.menuItems= [];
                   var myCommunities = [];
-                  if(this.managerOfCommunities.length > 0){
+                  if(this.managerOfCommunities){
                     myCommunities.push( new MenuItem("","Managing communities","","/search/find/communities",false,[],[],{role:"%22manager%22"}))
                   }
-                  if(this.subscriberOfCommunities.length > 0){
-                    myCommunities.push( new MenuItem("","Subscribed to communities","","/search/find/communities",false,[],[],{status:"%22subscribed%22"}))
+                  if(Session.isLoggedIn()){
+                    this._subscribeService.getCommunitiesSubscribedTo(Session.getUserEmail(), this.properties.adminToolsAPIURL).subscribe (
+                      pids => {
+                        if(pids.length > 0 ) {
+                          myCommunities.push( new MenuItem("","Subscribed to communities","","/search/find/communities",false,[],[],{status:"%22subscribed%22"}))
+                        }
+                      },
+                      error => {
+                        console.error("Error fetching your subscribed communities")
+                      });
                   }
+                  // if(this.subscriberOfCommunities){
+                  //   myCommunities.push( new MenuItem("","Subscribed to communities","","/search/find/communities",false,[],[],{status:"%22subscribed%22"}))
+                  // }
 
                   this.menuItems.push({rootItem: new MenuItem("communities","Communities","","/search/find/communities",false,[],null,{}), items: []});
-                  if(this.managerOfCommunities.length > 0 || this.subscriberOfCommunities.length > 0){
+                  if(this.managerOfCommunities || this.subscriberOfCommunities){
                     this.menuItems.push({rootItem: new MenuItem("myCommunities","My Communities","","",false,[],[],{}), items: myCommunities});
                   }
                   this.menuItems.push({rootItem: new MenuItem("howto","Create Community","","/how-to-create-community",false,[],null,{}), items: []});
@@ -185,7 +206,7 @@
                    new MenuItem("","My links","","/myclaims",false,[],["/myclaims"],this.properties.environment!="development"?{}:{communityId:community.communityId}),
                    new MenuItem("","Invite users","","/invite",false,[],[],this.properties.environment!="development"?{}:{communityId:community.communityId}),
                  ];
-                 if(this.managerOfCommunities.length > 0 ){
+                 if(this.managerOfCommunities ){
                    this.userMenuItems.push(new MenuItem("","Support","https://openaire-connect.d4science.org/group/openaire-connect-gateway/explore?siteId=172366611","",false,[],[],{}))
                  }
               }
Index: modules/uoa-connect-portal/trunk/src/app/createCommunity/community-creation-instructions.component.ts
===================================================================
--- modules/uoa-connect-portal/trunk/src/app/createCommunity/community-creation-instructions.component.ts	(revision 55386)
+++ modules/uoa-connect-portal/trunk/src/app/createCommunity/community-creation-instructions.component.ts	(revision 55387)
@@ -23,7 +23,7 @@
                 <div class="uk-width-medium uk-text-center uk-margin-large-top uk-margin-large-left">
                   <h5>Contact OpenAIRE team, in order to create your community page</h5>
                   <div>
-                    <a class="uk-button portal-button" [queryParams]="" routerLinkActive="router-link-active" routerLink="/contact"> CONTACT US</a>
+                    <a class="uk-button portal-button" routerLinkActive="router-link-active" routerLink="/contact"> CONTACT US</a>
                   </div>
                 </div>
               </div>
@@ -125,7 +125,7 @@
                     <div class="uk-text-center uk-position-center ">
                     <p>Contact OpenAIRE team, in order to create your community page</p>
                     <div>
-                      <a [class]="'uk-button portal-button uk-button-large'"> CONTACT US</a>
+                      <a class="uk-button portal-button" routerLinkActive="router-link-active" routerLink="/contact"> CONTACT US</a>
                     </div>
                     </div>
                   </div>
