Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/services/searchDataproviders.service.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/services/searchDataproviders.service.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/services/searchDataproviders.service.ts	(revision 55570)
@@ -150,7 +150,7 @@
           //compatibilities = " and (datasourcecompatibilityid <> UNKNOWN) and (datasourcecompatibilityid <> openaire2.0_data)"
           compatibilities = " and (datasourcecompatibilityid <> openaire2.0_data)";
         }
-        let url = link+"?query=(((deletedbyinference = false) AND (oaftype exact datasource)) "+((compatibilities && compatibilities.length > 0)?" "+compatibilities+" ":"")+") and (relorganizationid exact "+id+")";
+        let url = link+"?query=(((deletedbyinference = false) AND (oaftype exact datasource)) "+((compatibilities && compatibilities.length > 0)?" "+compatibilities+" ":"")+") and (relorganizationid exact \""+id+"\")";
         url += "&page="+(page-1)+"&size="+size+"&format=json";
 
 
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/simple/searchPublications.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/simple/searchPublications.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/simple/searchPublications.component.ts	(revision 55570)
@@ -338,7 +338,7 @@
 
     var parameters = $event.value;
     //console.info("queryChanged: Execute search query "+parameters);
-    this._getResults(parameters, true, this.searchUtils.page, this.searchUtils.size, this.searchUtils.sortBy);
+    //this._getResults(parameters, true, this.searchUtils.page, this.searchUtils.size, this.searchUtils.sortBy);
 
   }
 
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/connect/communities/communities.service.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/connect/communities/communities.service.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/connect/communities/communities.service.ts	(revision 55570)
@@ -3,13 +3,27 @@
 
 import {CommunityInfo} from '../community/communityInfo';
 import {EnvProperties} from '../../utils/properties/env-properties';
+import {BehaviorSubject, Observable} from "rxjs";
 
 @Injectable()
 export class CommunitiesService {
 
+    public communities: BehaviorSubject<CommunityInfo[]> = null;
+
     constructor(private http: Http) {
+        this.communities = new BehaviorSubject([]);
     }
 
+    updateCommunities(properties: EnvProperties, url: string) {
+        this.getCommunities(properties, url).subscribe(res => {
+                this.communities.next(res);
+        })
+    }
+
+    getCommunitiesState() {
+        return this.communities.asObservable();
+    }
+
     getCommunities(properties: EnvProperties, url: string) {
         return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
                         .map(res => <any> res.json()).map(res => this.parseCommunities(res));
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/dataProviders/entityRegistries.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/dataProviders/entityRegistries.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/dataProviders/entityRegistries.component.ts	(revision 55570)
@@ -166,7 +166,7 @@
     //console.info("queryChanged: Execute search query "+parameters);
     var csv_parameters = $event.value;
 
-    this._getResults(parameters, csv_parameters, false, this.searchUtils.page, this.searchUtils.size);
+    //this._getResults(parameters, csv_parameters, false, this.searchUtils.page, this.searchUtils.size);
   }
   private createFilters():Filter[] {
     var filter_names=["Type","Compatibility Level"];
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/dataProviders/compatibleDataProviders.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/dataProviders/compatibleDataProviders.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/dataProviders/compatibleDataProviders.component.ts	(revision 55570)
@@ -167,7 +167,7 @@
 
     //console.info("queryChanged: Execute search query "+parameters);
 
-    this._getResults(parameters, csv_parameters, false, this.searchUtils.page, this.searchUtils.size);
+    //this._getResults(parameters, csv_parameters, false, this.searchUtils.page, this.searchUtils.size);
   }
   private createFilters():Filter[] {
     var filter_names=["Type","Compatibility Level"];
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/simple/searchDataproviders.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/simple/searchDataproviders.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/simple/searchDataproviders.component.ts	(revision 55570)
@@ -389,7 +389,7 @@
     this.loadPaging = true;
 
     var parameters = $event.value;
-    this._getResults(parameters, true, this.searchUtils.page, this.searchUtils.size);
+    //this._getResults(parameters, true, this.searchUtils.page, this.searchUtils.size);
   }
 
   private handleError(message: string, error) {
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/simple/searchDatasets.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/simple/searchDatasets.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/simple/searchDatasets.component.ts	(revision 55570)
@@ -309,7 +309,7 @@
 
     var parameters = $event.value;
     //this.getResults(parameters, this.searchUtils.page, this.searchUtils.size, "searchPage");
-    this._getResults(parameters, true, this.searchUtils.page, this.searchUtils.size, this.searchUtils.sortBy);
+    //this._getResults(parameters, true, this.searchUtils.page, this.searchUtils.size, this.searchUtils.sortBy);
   }
 
   private handleError(message: string, error) {
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/simple/searchSoftware.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/simple/searchSoftware.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/simple/searchSoftware.component.ts	(revision 55570)
@@ -309,7 +309,7 @@
 
     var parameters = $event.value;
     //this.getResults(parameters, this.searchUtils.page, this.searchUtils.size, "searchPage");
-    this._getResults(parameters, true, this.searchUtils.page, this.searchUtils.size, this.searchUtils.sortBy);
+    //this._getResults(parameters, true, this.searchUtils.page, this.searchUtils.size, this.searchUtils.sortBy);
   }
 
   private handleError(message: string, error) {
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/connect/communityGuard/connectSubscriber.guard.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/connect/communityGuard/connectSubscriber.guard.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/connect/communityGuard/connectSubscriber.guard.ts	(revision 55570)
@@ -17,7 +17,7 @@
      let errorCode = LoginErrorCodes.NOT_SUBSCRIBER;
      if (!Session.isLoggedIn()) {
        errorCode = LoginErrorCodes.NOT_LOGIN;
-       this.router.navigate(['/user-info'], {queryParams: {'errorCode': errorCode, 'redirectUrl': path}});
+       this.router.navigate(['/user-info'], {queryParams: {'errorCode': errorCode, 'redirectUrl': path, communityId:community}});
        return false;
      } else {
        const obs = this.propertiesService.subscribeEnvironment().mergeMap(properties => {
@@ -30,7 +30,8 @@
            .subscribe(() => this.router.navigate(['/user-info'], {
              queryParams: {
                'errorCode': errorCode,
-               'redirectUrl': path
+               'redirectUrl': path,
+               communityId:community
              }
            }));
        return obs;
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/dataProvider/dataProvider.service.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/dataProvider/dataProvider.service.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/dataProvider/dataProvider.service.ts	(revision 55570)
@@ -69,17 +69,25 @@
         if(data[0] != null) {
             this.dataProviderInfo.title = {"name": (data[0].englishname)?data[0].englishname: data[0].officialname, "url": data[0].websiteurl};
             this.dataProviderInfo.officialName =  data[0].officialname;
-            var originalId =(data[0].originalId)?data[0].originalId:"";
-            if(originalId && originalId != ""){
-              if(originalId.indexOf("opendoar____::") != -1){
-                this.dataProviderInfo.openDoarId = originalId.split("opendoar____::")[1];
 
-              }else if (originalId.indexOf("re3data_____::") != -1){
-                this.dataProviderInfo.r3DataId = originalId.split("re3data_____::")[1];
+            var pattern = /.{12}::.+/;
+            var originalIds =(data[0].originalId)?data[0].originalId:"";
+
+            let length = Array.isArray(originalIds) ? originalIds.length : 1;
+
+            for(let i=0; i<length; i++) {
+              var originalId = Array.isArray(originalIds) ? originalIds[i] : originalIds;
+              var matched = originalId.match(pattern);
+
+              if(matched && originalId && originalId != ""){
+                if(originalId.indexOf("opendoar____::") != -1){
+                  this.dataProviderInfo.openDoarId = originalId.split("opendoar____::")[1];
+                }else if (originalId.indexOf("re3data_____::") != -1){
+                  this.dataProviderInfo.r3DataId = originalId.split("re3data_____::")[1];
+                }
+                this.dataProviderInfo.originalId = originalId;
               }
-              this.dataProviderInfo.originalId = originalId;
             }
-
         }
 
         if(data[1] != null) {
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/services/searchDatasets.service.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/services/searchDatasets.service.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/services/searchDatasets.service.ts	(revision 55570)
@@ -6,7 +6,7 @@
 import 'rxjs/add/observable/of';
 import 'rxjs/add/operator/do';
 import 'rxjs/add/operator/share';
-import {StringUtils} from '../utils/string-utils.class';
+import {DOI, StringUtils} from '../utils/string-utils.class';
 import { ParsingFunctions } from '../landingPages/landing-utils/parsingFunctions.class';
 import{EnvProperties} from '../utils/properties/env-properties';
 
@@ -361,9 +361,23 @@
 
     numOfSearchDatasets(params: string, properties:EnvProperties, refineParams:string=null):any {
         let url = properties.searchAPIURLLAst+"datasets/count?format=json";
-        if(params != "") {
-          url += "&q=" + StringUtils.URIEncode(params);
+
+        if(params.length > 0){
+          var DOIs:string[] = DOI.getDOIsFromString(params);
+          var doisParams = "";
+
+          for(var i =0 ;i < DOIs.length; i++){
+            doisParams+=(doisParams.length > 0?"&":"")+'doi="'+ DOIs[i]+'"';
+          }
+          if(doisParams.length > 0){
+            url += "&"+doisParams;
+          }else{
+            url += "&q=" + StringUtils.URIEncode(params);
+          }
         }
+        // if(params != "") {
+        //   url += "&q=" + StringUtils.URIEncode(params);
+        // }
         if(refineParams!= null && refineParams != ''  ) {
             url += refineParams;
         }
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/services/searchOrps.service.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/services/searchOrps.service.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/services/searchOrps.service.ts	(revision 55570)
@@ -6,7 +6,7 @@
 import 'rxjs/add/observable/of';
 import 'rxjs/add/operator/do';
 import 'rxjs/add/operator/share';
-import {StringUtils} from '../utils/string-utils.class';
+import {DOI, StringUtils} from '../utils/string-utils.class';
 import { ParsingFunctions } from '../landingPages/landing-utils/parsingFunctions.class';
 import{EnvProperties} from '../utils/properties/env-properties';
 
@@ -36,6 +36,7 @@
 
         return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
                     .map(res => <any> res.json())
+                    //.do(res => console.info(res))
                     .map(res => [res['meta'].total, this.parseResults(res['results']),RefineResultsUtils.parse(res['refineResults'],refineFields, "other")]);
     }
     searchOrpById (id: string , properties:EnvProperties):any {
@@ -88,6 +89,8 @@
 
         return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
                     .map(res => <any> res.json())
+                    //.do(res => console.info(res))
+
                     .map(res => [res['meta'].total, this.parseResults(res['results']),RefineResultsUtils.parse(res['refineResults'],refineFields, "other")]);
     }
     advancedSearchOrps (params: string, page: number, size: number, sortBy: string, properties:EnvProperties ):any {
@@ -111,6 +114,7 @@
 
       return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
       .map(res => <any> res.json())
+      //.do(res => console.info(res))
       .map(res => [res['meta'].total, this.parseResults(res['results'])]);
     }
     searchOrpsForEntity (params: string, page: number, size: number, properties:EnvProperties):any {
@@ -362,9 +366,22 @@
     numOfSearchOrps(params: string, properties:EnvProperties, refineParams:string=null):any {
         let url = properties.searchAPIURLLAst+"other/count?format=json";
 
-        if(params != "") {
-          url += "&q=" + StringUtils.URIEncode(params);
+        if(params.length > 0){
+          var DOIs:string[] = DOI.getDOIsFromString(params);
+          var doisParams = "";
+
+          for(var i =0 ;i < DOIs.length; i++){
+            doisParams+=(doisParams.length > 0?"&":"")+'doi="'+ DOIs[i]+'"';
+          }
+          if(doisParams.length > 0){
+            url += "&"+doisParams;
+          }else{
+            url += "&q=" + StringUtils.URIEncode(params);
+          }
         }
+        // if(params != "") {
+        //   url += "&q=" + StringUtils.URIEncode(params);
+        // }
         if(refineParams!= null && refineParams != ''  ) {
             url += refineParams;
         }
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/services/searchSoftware.service.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/services/searchSoftware.service.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/services/searchSoftware.service.ts	(revision 55570)
@@ -8,7 +8,7 @@
 import 'rxjs/add/operator/share';
 import { ParsingFunctions } from '../landingPages/landing-utils/parsingFunctions.class';
 import{EnvProperties} from '../utils/properties/env-properties';
-import {StringUtils} from '../utils/string-utils.class';
+import {DOI, StringUtils} from '../utils/string-utils.class';
 @Injectable()
 export class SearchSoftwareService {
     private sizeOfDescription: number = 270;
@@ -35,6 +35,7 @@
 
         return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
                     .map(res => <any> res.json())
+                    //.do(res => console.info(res))
                     .map(res => [res['meta'].total, this.parseResults(res['results']),RefineResultsUtils.parse(res['refineResults'],refineFields, "software")]);
     }
     searchSoftwareById (id: string, properties:EnvProperties ):any {
@@ -86,6 +87,7 @@
 
         return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
                     .map(res => <any> res.json())
+                    //.do(res => console.info(res))
                     .map(res => [res['meta'].total, this.parseResults(res['results']),RefineResultsUtils.parse(res['refineResults'],refineFields, "software")]);
     }
     advancedSearchSoftware (params: string, page: number, size: number, sortBy: string, properties:EnvProperties ):any {
@@ -108,6 +110,7 @@
 
       return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
       .map(res => <any> res.json())
+      //.do(res => console.info(res))
       .map(res => [res['meta'].total, this.parseResults(res['results'])]);
     }
     searchSoftwareForEntity (params: string, page: number, size: number, properties:EnvProperties):any {
@@ -369,9 +372,23 @@
 
     numOfSearchSoftware(params: string, properties:EnvProperties, refineParams:string=null):any {
         let url = properties.searchAPIURLLAst+"software/count?format=json";
-        if(params != "") {
-          url += "&q=" + StringUtils.URIEncode(params);
+
+        if(params.length > 0){
+          var DOIs:string[] = DOI.getDOIsFromString(params);
+          var doisParams = "";
+
+          for(var i =0 ;i < DOIs.length; i++){
+            doisParams+=(doisParams.length > 0?"&":"")+'doi="'+ DOIs[i]+'"';
+          }
+          if(doisParams.length > 0){
+            url += "&"+doisParams;
+          }else{
+            url += "&q=" + StringUtils.URIEncode(params);
+          }
         }
+        // if(params != "") {
+        //   url += "&q=" + StringUtils.URIEncode(params);
+        // }
         if(refineParams!= null && refineParams != ''  ) {
             url += refineParams;
         }
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/services/searchPublications.service.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/services/searchPublications.service.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/services/searchPublications.service.ts	(revision 55570)
@@ -7,7 +7,7 @@
 
 import {SearchResult}     from '../utils/entities/searchResult';
 import {RefineResultsUtils} from './servicesUtils/refineResults.class';
-import {StringUtils} from '../utils/string-utils.class';
+import {DOI, StringUtils} from '../utils/string-utils.class';
 import { ParsingFunctions } from '../landingPages/landing-utils/parsingFunctions.class';
 import{EnvProperties} from '../utils/properties/env-properties';
 
@@ -37,6 +37,7 @@
 
         return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
                     .map(res => <any> res.json())
+                    // .do(res => console.info(res))
                     .map(res => [res['meta'].total, this.parseResults(res['results']),RefineResultsUtils.parse(res['refineResults'],refineFields, "publication")]);
     }
     searchPublicationById (id: string, properties:EnvProperties ):any {
@@ -89,6 +90,7 @@
 
         return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
                     .map(res => <any> res.json())
+                    //.do(res => console.info(res))
                     .map(res => [res['meta'].total, this.parseResults(res['results']),RefineResultsUtils.parse(res['refineResults'],refineFields, "publication")]);
     }
 
@@ -112,6 +114,8 @@
 
       return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
       .map(res => <any> res.json())
+      //.do(res => console.info(res))
+
       .map(res => [res['meta'].total, this.parseResults(res['results'])]);
     }
     searchPublicationsForEntity (params: string, page: number, size: number, properties:EnvProperties):any {
@@ -471,9 +475,22 @@
 
     numOfSearchPublications(params: string, properties:EnvProperties, refineParams:string=null):any {
         let url = properties.searchAPIURLLAst+"publications/count?format=json";
-        if(params != "") {
-          url += "&q=" + StringUtils.URIEncode(params);
+        if(params.length > 0){
+          var DOIs:string[] = DOI.getDOIsFromString(params);
+          var doisParams = "";
+
+          for(var i =0 ;i < DOIs.length; i++){
+            doisParams+=(doisParams.length > 0?"&":"")+'doi="'+ DOIs[i]+'"';
+          }
+          if(doisParams.length > 0){
+            url += "&"+doisParams;
+          }else{
+            url += "&q=" + StringUtils.URIEncode(params);
+          }
         }
+        // if(params != "") {
+        //   url += "&q=" + StringUtils.URIEncode(params);
+        // }
         if(refineParams!= null && refineParams != ''  ) {
             url += refineParams;
         }
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/advanced/advancedSearchOrps.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/advanced/advancedSearchOrps.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/advanced/advancedSearchOrps.component.ts	(revision 55570)
@@ -177,7 +177,7 @@
     this.loadPaging = true;
 
     var parameters = $event.value;
-    this.getResults(parameters, this.searchUtils.page,this.searchUtils.size, this.searchUtils.sortBy);
+    //this.getResults(parameters, this.searchUtils.page,this.searchUtils.size, this.searchUtils.sortBy);
     //console.info("queryChanged: Execute search query "+parameters);
 
   }
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/advanced/advancedSearchDataProviders.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/advanced/advancedSearchDataProviders.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/advanced/advancedSearchDataProviders.component.ts	(revision 55570)
@@ -174,7 +174,7 @@
     this.loadPaging = true;
 
     var parameters = $event.value;
-    this.getResults(parameters, this.searchUtils.page,this.searchUtils.size);
+    //this.getResults(parameters, this.searchUtils.page,this.searchUtils.size);
     //console.info("queryChanged: Execute search query "+parameters);
 
   }
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/advanced/advancedSearchOrganizations.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/advanced/advancedSearchOrganizations.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/advanced/advancedSearchOrganizations.component.ts	(revision 55570)
@@ -179,7 +179,7 @@
     this.loadPaging = true;
 
     var parameters = $event.value;
-    this.getResults(parameters, this.searchUtils.page,this.searchUtils.size);
+    //this.getResults(parameters, this.searchUtils.page,this.searchUtils.size);
     //console.info("queryChanged: Execute search query "+parameters);
 
   }
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/advanced/advancedSearchDatasets.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/advanced/advancedSearchDatasets.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/advanced/advancedSearchDatasets.component.ts	(revision 55570)
@@ -186,7 +186,7 @@
     this.loadPaging = true;
 
     var parameters = $event.value;
-    this.getResults(parameters, this.searchUtils.page,this.searchUtils.size, this.searchUtils.sortBy);
+    //this.getResults(parameters, this.searchUtils.page,this.searchUtils.size, this.searchUtils.sortBy);
     //console.info("queryChanged: Execute search query "+parameters);
 
   }
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/advanced/advancedSearchProjects.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/advanced/advancedSearchProjects.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/advanced/advancedSearchProjects.component.ts	(revision 55570)
@@ -181,7 +181,7 @@
     this.loadPaging = true;
 
     var parameters = $event.value;
-    this.getResults(parameters, this.searchUtils.page,this.searchUtils.size);
+    //this.getResults(parameters, this.searchUtils.page,this.searchUtils.size);
     //console.info("queryChanged: Execute search query "+parameters);
 
   }
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/advanced/advancedSearchSoftware.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/advanced/advancedSearchSoftware.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/advanced/advancedSearchSoftware.component.ts	(revision 55570)
@@ -187,7 +187,7 @@
     this.loadPaging = true;
 
     var parameters = $event.value;
-    this.getResults(parameters, this.searchUtils.page,this.searchUtils.size, this.searchUtils.sortBy);
+    //this.getResults(parameters, this.searchUtils.page,this.searchUtils.size, this.searchUtils.sortBy);
     //console.info("queryChanged: Execute search query "+parameters);
 
   }
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/advanced/advancedSearchPublications.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/advanced/advancedSearchPublications.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/advanced/advancedSearchPublications.component.ts	(revision 55570)
@@ -188,7 +188,7 @@
     this.loadPaging = true;
 
     var parameters = $event.value;
-    this.getResults(parameters, this.searchUtils.page,this.searchUtils.size, this.searchUtils.sortBy);
+    //this.getResults(parameters, this.searchUtils.page,this.searchUtils.size, this.searchUtils.sortBy);
     //console.info("queryChanged: Execute search query "+parameters);
 
   }
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/searchForm.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/searchForm.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/searchForm.component.ts	(revision 55570)
@@ -1,5 +1,4 @@
 import {Component, Input, Output, EventEmitter} from '@angular/core';
-import {Observable}       from 'rxjs/Observable';
 import {RouterHelper} from '../../utils/routerHelper.class';
 import {Router} from '@angular/router';
 
@@ -7,8 +6,8 @@
     selector: 'search-form',
     template: `
 
-        <form [class]="(isDisabled)?'uk-margin uk-text-center uk-margin-top uk-disabled':'uk-margin uk-text-center uk-margin-top'">
-                 <input type="text" class="uk-input  uk-width-xlarge" [placeholder]="placeholderText" aria-describedby="sizing-addon2"  [(ngModel)]="keyword"  name="keyword" >
+        <form [class]="((isDisabled)?'uk-disabled':'')+' uk-margin uk-margin-top '+(setFormCentered?' uk-text-center':'')">
+                 <input type="text" class="uk-input  uk-width-xlarge@l uk-width-medium@m uk-width-auto" [placeholder]="placeholderText" aria-describedby="sizing-addon2"  [(ngModel)]="keyword"  name="keyword" >
                     <button *ngIf="!link" (click)="keywordChanged()"  type="submit" class=" uk-button  portal-button">
                     <span class="uk-icon" ><svg width="30" height="30" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="search" ratio="1.5"><circle fill="none" stroke="#000" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg></span>
                   </button>
@@ -24,7 +23,8 @@
     @Input() keyword: string = '';
     @Input() generalSearch: boolean = false;
     @Input() placeholderText: string = "Type keywords";
-    @Input() link: boolean = false;
+    @Input() link: string = "";
+    @Input() setFormCentered: boolean = true;
     public routerHelper:RouterHelper = new RouterHelper();
 
     @Output() keywordChange  = new EventEmitter();
@@ -43,6 +43,7 @@
         });
     }
     goTo() {
-      this._router.navigate(['/search/find'], { queryParams: this.routerHelper.createQueryParam('keyword',this.keyword) });
+      //this._router.navigate(['/search/find'], { queryParams: this.routerHelper.createQueryParam('keyword',this.keyword) });
+      this._router.navigate([this.link], { queryParams: this.routerHelper.createQueryParam('keyword',this.keyword) });
     }
 }
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/searchResultsPerPage.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/searchResultsPerPage.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/searchResultsPerPage.component.ts	(revision 55570)
@@ -1,55 +1,8 @@
 import {Component, Input, Output, EventEmitter} from '@angular/core';
-import {Observable}       from 'rxjs/Observable';
-import {ErrorCodes} from '../../utils/properties/errorCodes';
 
-import {Router, ActivatedRoute} from '@angular/router';
-import {RouterHelper} from '../../utils/routerHelper.class';
 @Component({
     selector: 'search-results-per-page',
-    template: `
-    <!--div class= "searchPaging uk-panel uk-margin-top uk-grid uk-margin-bottom"-->
-
-      <!--form class="uk-form-horizontal uk-width-1-2">
-        <div class="uk-form-label inherit-color">Results per page:</div>
-        <div class="uk-form-controls">
-          <select class="uk-select" id="form-horizontal-select" name="select_results_per_page"
-                  [(ngModel)]="searchUtils.size" (ngModelChange)="navigate(searchUtils.size)">
-            <option [ngValue]="5" > 5</option>
-            <option [ngValue]="10">10</option>
-            <option [ngValue]="20">20</option>
-            <option [ngValue]="50">50</option>
-          </select>
-        </div>
-      </form-->
-
-          <!--select class="uk-select uk-width-2-3" id="form-horizontal-select" name="select_results_per_page"
-                  [(ngModel)]="searchUtils.size" (ngModelChange)="navigate(searchUtils.size)">
-            <option [ngValue]="5" > 5 Results per page</option>
-            <option [ngValue]="10">10 Results per page</option>
-            <option [ngValue]="20">20 Results per page</option>
-            <option [ngValue]="50">50 Results per page</option>
-          </select-->
-    <!--/div-->
-
-    <!--span>Results per page:</span>
-    <span>
-      <ul class="uk-subnav uk-subnav-divider">
-        <li [class]="searchUtils.size == 5  ? 'uk-active' : ''"><a  [queryParams]="routerHelper.createQueryParamsResultsPerPage(parameterNames,parameterValues,'size',5)"  routerLinkActive="router-link-active" [routerLink]=baseUrl> 5</a></li>
-        <li [class]="searchUtils.size == 10 ? 'uk-active' : ''"><a  [queryParams]="routerHelper.createQueryParamsResultsPerPage(parameterNames,parameterValues,'size',10)" routerLinkActive="router-link-active" [routerLink]=baseUrl>10</a></li>
-        <li [class]="searchUtils.size == 20 ? 'uk-active' : ''"><a  [queryParams]="routerHelper.createQueryParamsResultsPerPage(parameterNames,parameterValues,'size',20)" routerLinkActive="router-link-active" [routerLink]=baseUrl>20</a></li>
-        <li [class]="searchUtils.size == 50 ? 'uk-active' : ''"><a  [queryParams]="routerHelper.createQueryParamsResultsPerPage(parameterNames,parameterValues,'size',50)" routerLinkActive="router-link-active" [routerLink]=baseUrl>50</a></li>
-      </ul>
-    </span-->
-
-    <!--ul class="uk-subnav uk-subnav-divider">
-      <li>Results per page:</li>
-      <li [class]="searchUtils.size == 5  ? 'uk-active' : ''"><a  [queryParams]="routerHelper.createQueryParamsResultsPerPage(parameterNames,parameterValues,'size',5)"  routerLinkActive="router-link-active" [routerLink]=baseUrl> 5</a></li>
-      <li [class]="searchUtils.size == 10 ? 'uk-active' : ''"><a  [queryParams]="routerHelper.createQueryParamsResultsPerPage(parameterNames,parameterValues,'size',10)" routerLinkActive="router-link-active" [routerLink]=baseUrl>10</a></li>
-      <li [class]="searchUtils.size == 20 ? 'uk-active' : ''"><a  [queryParams]="routerHelper.createQueryParamsResultsPerPage(parameterNames,parameterValues,'size',20)" routerLinkActive="router-link-active" [routerLink]=baseUrl>20</a></li>
-      <li [class]="searchUtils.size == 50 ? 'uk-active' : ''"><a  [queryParams]="routerHelper.createQueryParamsResultsPerPage(parameterNames,parameterValues,'size',50)" routerLinkActive="router-link-active" [routerLink]=baseUrl>50</a></li>
-    </ul-->
-<!--[(ngModel)]="searchUtils.size" (ngModelChange)="navigate(searchUtils.size)"-->
-<!--[(ngModel)]="=size" (ngModelChange)="sizeChanged()"-->
+    template: `        
     <span class="uk-width-2-3@m uk-width-1-1@s">
       <span class="uk-width-5-6@m"> Results per page:</span>
       <select class="uk-select uk-width-1-6@m uk-width-auto" id="form-horizontal-select" name="select_results_per_page"
@@ -76,10 +29,4 @@
           value: this.size
       });
     }
-    /*navigate(size: number) {
-      this.searchUtils.page = 1;
-      console.info(size);
-      console.info(this.baseUrl);
-      this._router.navigate([this.baseUrl], { queryParams:  this.routerHelper.createQueryParamsResultsPerPage(this.parameterNames,this.parameterValues,'size',size)});
-    }*/
 }
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/communitySearchResults.component.html
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/communitySearchResults.component.html	(nonexistent)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/communitySearchResults.component.html	(revision 55570)
@@ -0,0 +1,48 @@
+<ul [class]="'uk-list uk-list-divider  uk-margin ' + custom_class">
+    <errorMessages [status]="[status]" [type]="'results'"></errorMessages>
+
+    <li *ngFor="let result of results" class="uk-animation-fade uk-margin-auto" uk-grid>
+        <a class="uk-width-1-5 uk-height-small uk-card uk-card-default uk-card-body uk-inline" (click)="confirmModalOpen(result)">
+            <div *ngIf="result.isSubscribed" class="uk-position-top-right uk-card-badge portal-card-badge uk-width-1-2 uk-text-small uk-text-center">
+                <span>Subscribed</span>
+            </div>
+            <img *ngIf= "result.logoUrl != null && result.logoUrl != '' " class="uk-padding uk-position-center" src="{{result.logoUrl}}" alt="{{(result.title)?result.title:result.shortTitle}} logo" >
+            <span  *ngIf= "result.logoUrl == null || result.logoUrl == '' "  class="uk-icon uk-padding uk-position-center">
+               <svg width="50" height="50" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="2.5"> <circle fill="none" stroke="#000" stroke-width="1.1" cx="7.7" cy="8.6" r="3.5"></circle> <path fill="none" stroke="#000" stroke-width="1.1" d="M1,18.1 C1.7,14.6 4.4,12.1 7.6,12.1 C10.9,12.1 13.7,14.8 14.3,18.3"></path> <path fill="none" stroke="#000" stroke-width="1.1" d="M11.4,4 C12.8,2.4 15.4,2.8 16.3,4.7 C17.2,6.6 15.7,8.9 13.6,8.9 C16.5,8.9 18.8,11.3 19.2,14.1"></path></svg>
+            </span>
+            <div *ngIf="result.status == 'manager'" class="uk-card-badge private-card-badge uk-width-2-5 uk-position-top-left uk-text-small uk-text-center ">
+                <span class="uk-padding-small">Private</span>
+            </div>
+        </a>
+        <div class="uk-width-expand">
+            <div  [title] =  result.shortTitle class="uk-text-large uk-grid">
+                <a (click)="confirmModalOpen(result)" [class]="(result.isManager)?'uk-width-3-4':''">
+                    {{(result.title)?result.title:result.shortTitle}}
+                </a>
+                <manage *ngIf="result.isManager" [communityId]="result.communityId" class="uk-width-expand uk-margin-auto-right"></manage>
+            </div>
+            <div *ngIf="result.description">
+                <div class="text-justify descriptionText uk-margin-auto-right" [title]="result.description">
+                    {{_formatDescription(result.description)}}
+                </div>
+            </div>
+            <div class="uk-padding-small uk-padding-remove-left uk-grid">
+                <div class="uk-width-1-2">
+                    <span *ngIf="result.date"><b> Creation Date: </b></span>
+                    <span *ngIf="result.date">{{result.date | date:'dd-MM-yyyy'}}</span>
+                </div>
+                <div class="uk-width-expand uk-align-right uk-margin-auto-right">
+                    <span *ngIf="result.type && result.type != ''" ><b> Type: </b></span>
+                    <span *ngIf="result.type && result.type != ''" >{{(result.type == 'ri')?'Research Initiative':'Research Community'}}</span>
+                </div>
+            </div>
+        </div>
+    </li>
+</ul>
+<modal-alert #AlertModal (alertOutput)="goToCommunityPage($event)">
+    <div class="uk-text-center">
+        The profile will be presented in a new tab.<br>
+        Are you sure that you want to proceed?
+    </div>
+</modal-alert>
+
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/communitySearchResults.module.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/communitySearchResults.module.ts	(nonexistent)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/communitySearchResults.module.ts	(revision 55570)
@@ -0,0 +1,25 @@
+import { NgModule}              from '@angular/core';
+import { CommonModule }         from '@angular/common';
+import { FormsModule }          from '@angular/forms';
+import { RouterModule }         from '@angular/router';
+import {ErrorMessagesModule}    from '../../utils/errorMessages.module';
+import {CommunitySearchResultsComponent} from "./communitySearchResults.component";
+import {AlertModalModule} from "../../utils/modal/alertModal.module";
+import {ManageModule} from "../../utils/manage/manage.module";
+
+@NgModule({
+  imports: [
+    CommonModule, FormsModule,
+    RouterModule, ErrorMessagesModule,
+    AlertModalModule, ManageModule
+  ],
+  declarations: [
+    CommunitySearchResultsComponent
+  ],
+  providers:[
+  ],
+  exports: [
+    CommunitySearchResultsComponent
+  ]
+})
+export class CommunitySearchResultsModule { }
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/searchPage.component.html
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/searchPage.component.html	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/searchPage.component.html	(revision 55570)
@@ -77,7 +77,7 @@
                         </span>
                         <search-dataprovider-map *ngIf= "!showUnknownFilters" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils" [mapUrl]="mapUrl" [mapTooltipType]="mapTooltipType"></search-dataprovider-map>
                       </span>
-                      <search-download *ngIf= "!showUnknownFilters && searchUtils.totalResults > 0" class="uk-width-1-2" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils" [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults"></search-download>
+                      <search-download *ngIf= "!showUnknownFilters && searchUtils.totalResults > 0 && entityType != 'community'" class="uk-width-1-2" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils" [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults"></search-download>
                    </div>
 
                   </div>
@@ -136,7 +136,7 @@
                     </span>
                     <search-dataprovider-map *ngIf= "!showUnknownFilters"   [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils" [mapUrl]="mapUrl" [mapTooltipType]="mapTooltipType"></search-dataprovider-map>
                   </span>
-                  <search-download *ngIf= "!showUnknownFilters && searchUtils.totalResults > 0" class="uk-width-1-2" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils" [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults"></search-download>
+                  <search-download *ngIf= "!showUnknownFilters && searchUtils.totalResults > 0 && entityType != 'community'" class="uk-width-1-2" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils" [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults"></search-download>
                </div>
                </div>
                <search-filter  *ngFor="let filter of filters " [isDisabled]="disableForms" [filter]="filter"  [showResultCount]=showResultCount (onFilterChange)="filterChanged($event)"  [(connectCommunityId)]=connectCommunityId></search-filter>
@@ -154,29 +154,24 @@
                   <!-- <search-results-per-page class="uk-width-1-2@m uk-width-1-1" [(searchUtils)] = "searchUtils" [(baseUrl)] = "baseUrl" [(parameterNames)] = "parameterNames" [(parameterValues)] = "parameterValues" ></search-results-per-page> -->
                   <!-- <search-sorting class="uk-width-1-2@m uk-width-1-1" *ngIf="sort" [(searchUtils)] = "searchUtils" [(sortBy)]="sortBy" [(baseUrl)] = "baseUrl" [(parameterNames)] = "parameterNames" [(parameterValues)] = "parameterValues" ></search-sorting> -->
                   <search-results-per-page class="uk-width-1-2@m uk-width-1-1" [(size)]="searchUtils.size" (sizeChange)="sizeChanged($event)"></search-results-per-page>
-                  <search-sorting class="uk-width-1-2@m uk-width-1-1" *ngIf="sort" [(sortBy)]="searchUtils.sortBy" (sortByChange)="sortByChanged($event)"></search-sorting>
+                  <search-sorting class="uk-width-1-2@m uk-width-1-1" *ngIf="sort" [entityType]="entityType" [(sortBy)]="searchUtils.sortBy" (sortByChange)="sortByChanged($event)"></search-sorting>
                 </div>
-                <search-paging [type]="type" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils" [(results)] = "results"  [(baseUrl)] = "baseUrl" [(parameterNames)] = "parameterNames" [(parameterValues)] = "parameterValues" ></search-paging>
+                <search-paging *ngIf="searchUtils.totalResults != 1" [type]="type" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils" [(results)] = "results"  [(baseUrl)] = "baseUrl" [(parameterNames)] = "parameterNames" [(parameterValues)] = "parameterValues"></search-paging>
+                <search-paging *ngIf="searchUtils.totalResults == 1" [type]="entityType" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils" [(results)] = "results"  [(baseUrl)] = "baseUrl" [(parameterNames)] = "parameterNames" [(parameterValues)] = "parameterValues"></search-paging>
               </div>
- <!-- *ngIf="tableViewLink || searchUtils.totalResults <= csvLimit"  -->
-              <!-- <div  class="uk-width-1-1@s uk-hidden@m">
-                <span *ngIf="tableViewLink" class="uk-margin-medium-right">
-                  <a routerLinkActive="router-link-active" [class]="(disableForms)?'uk-disabled uk-link-muted':''" [routerLink]=tableViewLink >
-                    <span class="uk-margin-small-right uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><rect x="2" y="2" width="3" height="3"></rect><rect x="8" y="2" width="3" height="3"></rect><rect x="14" y="2" width="3" height="3"></rect><rect x="2" y="8" width="3" height="3"></rect><rect x="8" y="8" width="3" height="3"></rect><rect x="14" y="8" width="3" height="3"></rect><rect x="2" y="14" width="3" height="3"></rect><rect x="8" y="14" width="3" height="3"></rect><rect x="14" y="14" width="3" height="3"></rect></svg></span>
-                  </a>
-
-                  <span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="table" ratio="1"><rect x="1" y="3" width="18" height="1"></rect><rect x="1" y="7" width="18" height="1"></rect><rect x="1" y="11" width="18" height="1"></rect><rect x="1" y="15" width="18" height="1"></rect></svg></span>
-                </span>
-                <search-download [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults"></search-download>
-              </div> -->
-
               <div *ngIf="(searchUtils.page <= pagingLimit)" class="">
-                <search-result    *ngIf="!tableView"
+                <search-result    *ngIf="entityType != 'community' && !tableView"
                                   [results]="results"
                                   [status]="searchUtils.status"
                                   [type]="entityType"
                                   [showLoading]="true" [(properties)]=properties>
                 </search-result>
+                <community-search-result *ngIf="entityType == 'community' && !tableView"
+                                  [results]="results"
+                                  [status]="searchUtils.status"
+                                  [type]="entityType"
+                                  [showLoading]="true" [(properties)]=properties>
+                </community-search-result>
               </div>
 
               <div [class]="searchUtils.page > pagingLimit ? 'search-results' : ''" *ngIf="(searchUtils.page >= pagingLimit) && (searchUtils.totalResults > searchUtils.size*pagingLimit)">
@@ -190,12 +185,11 @@
                   <!-- <search-results-per-page class="uk-width-1-2@m uk-width-1-1"></search-results-per-page> -->
                   <!--[(size)]="searchUtils.size" (sizeChange)="sizeChanged($event)"-->
                   <!-- <search-sorting class="uk-width-1-2@m uk-width-1-1" *ngIf="sort" [(searchUtils)] = "searchUtils" [(sortBy)]="sortBy" [(baseUrl)] = "baseUrl" [(parameterNames)] = "parameterNames" [(parameterValues)] = "parameterValues" ></search-sorting> -->
-                  <search-sorting class="uk-width-1-2@m uk-width-1-1" *ngIf="sort" [(sortBy)]="searchUtils.sortBy" (sortByChange)="sortByChanged($event)"></search-sorting>
+                  <search-sorting class="uk-width-1-2@m uk-width-1-1" *ngIf="sort" [entityType]="entityType"  [(sortBy)]="searchUtils.sortBy" (sortByChange)="sortByChanged($event)"></search-sorting>
                 </div>
                 <search-paging [type]="type" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils" [(results)] = "results"  [(baseUrl)] = "baseUrl" [(parameterNames)] = "parameterNames" [(parameterValues)] = "parameterValues" ></search-paging>
               </div>
-
-              <a *ngIf="properties.showLastIndexInformationLink" class="last_index_info uk-button-text"
+              <a *ngIf="properties.showLastIndexInformationLink && lastIndex" class="last_index_info uk-button-text"
                   [href]="properties.lastIndexInformationLink" target="_blank">
                   Last index information
               </a>
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/searchResult.component.html
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/searchResult.component.html	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/searchResult.component.html	(revision 55570)
@@ -1,9 +1,4 @@
  <ul [class]="'uk-list uk-list-divider  uk-margin '+custom_class">
-  <!--div *ngIf="status == errorCodes.NONE" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">No Results found</div>
-  <div *ngIf="status == errorCodes.ERROR" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
-  <div *ngIf="status == errorCodes.OUT_OF_BOUND" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">Requested page out of bounds</div>
-  <div *ngIf="status == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
-  <div *ngIf="status == errorCodes.LOADING && showLoading"   class="uk-animation-fade uk-margin-large-top  uk-width-1-1" role="alert"><span class="loading-gif  uk-align-center" ></span></div-->
   <errorMessages [status]="[status]" [type]="'results'"></errorMessages>
 
     <li *ngFor="let result of results" class="uk-animation-fade">
@@ -19,13 +14,6 @@
         <span *ngIf="result.languages && result.languages.length > 0" class="uk-label custom-label  label-language " title="Language">{{result.languages.join(", ")}}</span>
         <span *ngIf="result.countriesForResults && result.countriesForResults.length > 0" class="uk-label custom-label  label-country " title="Country">{{result.countriesForResults.join(", ")}}</span>
         <span *ngIf="result.title && result.title.accessMode" [class]="'uk-label custom-label  label-'+ result.title.accessMode " title="Access Mode">{{result.title.accessMode}}</span>
-        <!-- <span *ngIf="result['funders'] && result['funders'].length > 0" class="uk-label custom-label label-funder " title="Funder"><span *ngFor="let funder of result['funders'] let i=index">
-
-            <span *ngIf="funder.funderShortname">
-              {{funder.funderShortname}}</span><span
-
-              *ngIf="i < result['funders'].length-1">, </span>
-        </span></span> -->
         <span *ngIf="result['funderShortname']" class="uk-label custom-label label-funder " title="Funder">{{result['funderShortname']}}</span>
         <span *ngIf="result.openAccessMandatePublications != undefined && result.openAccessMandatePublications && (result.openAccessMandateDatasets == undefined || !result.openAccessMandateDatasets)"
                class="uk-label custom-label label-openaccessmandate " title="Open Access mandate for Publications">Open Access mandate for Publications</span>
@@ -38,10 +26,6 @@
         <div class="uk-margin-small">
             <span *ngIf="result['authors'] != undefined" class="resultsAuthors uk-margin-small-top" style="font-style: italic;">
                 <span *ngFor="let author of result['authors'].slice(0,15)">
-                    <!--a href="{{author['url']}}"-->
-                    <!--a [queryParams]="routerHelper.createQueryParams(['author','at'],[quote(author['name']),'and'])" routerLinkActive="router-link-active" [routerLink]="linkToAdvancedSearchPage">
-                        {{author['name']}};
-                    </a-->
                     {{author}};
                 </span>
                 <span *ngIf="result['authors'].length > 15">...</span>
@@ -52,20 +36,12 @@
         </div>
 
         <div *ngIf="result.publisher != undefined && result.publisher != ''"><span class="uk-text-bold">Publisher:</span> {{result.publisher}}</div>
-        <!-- <div *ngIf="result['compatibility'] != undefined && result['compatibility'] != ''">
-            Compatibility: {{result.compatibility}}
-        </div> -->
-        <!-- <approved-by-community [contentProviderId]="result.id"></approved-by-community> -->
         <span *ngIf="result['type'] != undefined && result['type'] != ''" class="uk-label custom-label label-blue label-dataprovider" title="Type"> {{result['type']}}</span>
-        <!-- <div *ngIf="result['type'] != undefined && result['type'] != ''">Type: {{result['type']}}</div> -->
         <span *ngIf="result['compatibility'] != undefined && result['compatibility'] != ''" class="uk-label custom-label  label-compatibility" title="Compatibility">{{result.compatibility}}</span>
-
-        <!-- <div *ngIf="result.country != undefined && result.country != ''">Country: {{result.country}}</div> -->
         <span *ngIf="result.country != undefined && result.country != ''" class="uk-label custom-label  label-country" title="Country"> {{result.country}}</span>
         <div *ngIf="result['projects'] != undefined">
             <span> Project: </span>
             <span *ngFor="let project of result['projects'].slice(0,15) let i=index">
-                <!--a *ngIf="project.url != undefined" href="{{project.url}}"-->
                     <a *ngIf="project.id" [queryParams]="{projectId: project.id}" routerLinkActive="router-link-active" routerLink="/search/project">
                         {{project['funderShortname']?project['funderShortname']:project['funderName']}}
                         | {{ project['acronym']?project['acronym']:(project['title'].length>25?project['title'].substring(0,25)+'...':project['title'])}} ({{project.code}})</a><span
@@ -86,24 +62,10 @@
         </div>
 
         <mark *ngIf="result.embargoEndDate != undefined && result.embargoEndDate != ''">Embargo End Date: {{result.embargoEndDate}}</mark>
-
-
-        <!-- <div *ngIf="result['funders'] != undefined">
-          <span> Funder: </span>
-          <span *ngFor="let funder of result['funders'] let i=index">
-
-              <span *ngIf="funder.funderShortname">
-                {{funder.funderShortname}}</span><span
-
-                *ngIf="i < result['funders'].length-1">,</span>
-          </span>
-          <span *ngIf="result.startYear && result.endYear"> (start {{result.startYear}} - end {{result.endYear}})</span>
-        </div> -->
         <div *ngIf="result.startYear && result.endYear"> Start year: {{result.startYear}} - End year: {{result.endYear}}</div>
         <div *ngIf="showOrganizations && result['organizations'] != undefined && result['organizations'].length > 0">
             <span> Organization: </span>
             <span *ngFor="let organization of result['organizations'].slice(0,10) let i=index">
-                <!--a *ngIf="organization.url != undefined" href="{{organization.url}}"-->
                 <a *ngIf="organization.id" [queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active" routerLink="/search/organization">
                         {{organization.name}}</a><span
 
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/searchPage.module.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/searchPage.module.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/searchPage.module.ts	(revision 55570)
@@ -5,10 +5,6 @@
 
 import{SearchPageComponent} from './searchPage.component';
 import{SearchFormModule} from './searchForm.module';
-import{SearchResultsModule} from './searchResults.module';
-//import{DatasourceTableViewModule} from './datasourceTableView.module';
-//import{SearchFilterComponent} from './searchFilter.component';
-//import{SearchFilterModalComponent} from './searchFilterModal.component';
 import {SearchFilterModule} from './searchFilter.module';
 import{LoadingModalModule} from '../../utils/modal/loadingModal.module';
 import {ReportsServiceModule} from '../../services/reportsService.module';
@@ -23,12 +19,14 @@
 import {Schema2jsonldModule} from '../../sharedComponents/schema2jsonld/schema2jsonld.module';
 import { SEOServiceModule } from '../../sharedComponents/SEO/SEOService.module';
 import { SearchDataproviderMapModule } from './searchDataproviderMap.module';
+import {CommunitySearchResultsModule} from "./communitySearchResults.module";
+import {SearchResultsModule} from "./searchResults.module";
 
 @NgModule({
   imports: [
-    CommonModule, FormsModule,RouterModule,  SearchFormModule, SearchResultsModule,
+    CommonModule, FormsModule, RouterModule, SearchFormModule, SearchResultsModule, CommunitySearchResultsModule,
     LoadingModalModule, ReportsServiceModule, SearchDataproviderMapModule,
-    SearchPagingModule, SearchResultsPerPageModule, SearchSortingModule, SearchDownloadModule, ModalModule, SearchFilterModule, PiwikServiceModule, HelperModule, Schema2jsonldModule, SEOServiceModule
+    SearchPagingModule, SearchResultsPerPageModule, SearchSortingModule, SearchDownloadModule, ModalModule, SearchFilterModule, PiwikServiceModule, HelperModule, Schema2jsonldModule, SEOServiceModule, SearchResultsModule
   ],
   declarations: [
     SearchPageComponent
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/searchFilter.component.html
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/searchFilter.component.html	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/searchFilter.component.html	(revision 55570)
@@ -7,7 +7,7 @@
       <div class="searchFilterBoxValues ">
         <div *ngFor = "let value of getSelectedValues(filter,'num')"  class = "uk-animation-fade filterItem">
            <span class="filterName"><div title = "{{value.name}}">
-           <input [disabled]="isDisabled" [(ngModel)]="value.selected" type="checkbox" (ngModelChange)="filterChange(value.selected)" />
+           <input  [(ngModel)]="value.selected" type="checkbox" (ngModelChange)="filterChange(value.selected)" />
            {{_formatName(value)}} </div></span>
            <span class="filterNumber" *ngIf = "showResultCount === true" >  ({{value.number|number}})</span>
         </div>
@@ -14,9 +14,9 @@
         <!-- <hr *ngIf="filter.countSelectedValues > 0 && (filter.values.length-filter.countSelectedValues ) > 0 " class="uk-grid-divider uk-margin-small"--> 
         <div *ngFor = "let value of getNotSelectedValues(filter,'num').slice(0,(!addShowMore?getNotSelectedValues(filter,'num').length:5-getSelectedValues(filter,'num').length))" class = "uk-animation-fade filterItem">
 
-           <span class="filterName"><div title = "{{value.name}}"> <input [disabled]="isDisabled" [(ngModel)]="value.selected" type="checkbox" (ngModelChange)="filterChange(value.selected)" />
+           <span class="filterName"><div title = "{{value.name}}" [class]="(isDisabled || (showResultCount && value.number === 0))?'uk-text-muted':''" > <input [disabled]="isDisabled || (showResultCount && value.number === 0)" [(ngModel)]="value.selected" type="checkbox" (ngModelChange)="filterChange(value.selected)" />
            {{_formatName(value)}} </div></span>
-           <span class="filterNumber" *ngIf = "showResultCount === true" >  ({{value.number|number}})</span>
+           <span class="filterNumber" *ngIf = "showResultCount === true" [class]="(isDisabled || value.number === 0)?'uk-text-muted':''" >  ({{value.number|number}})</span>
         </div>
 
         <a *ngIf=" addShowMore && (filter.values.length) > 5" (click)="open()"
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/communitySearchResults.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/communitySearchResults.component.ts	(nonexistent)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/communitySearchResults.component.ts	(revision 55570)
@@ -0,0 +1,69 @@
+import {Component, Input, ViewChild} from '@angular/core';
+import {ErrorCodes} from '../../utils/properties/errorCodes';
+import {RouterHelper} from '../../utils/routerHelper.class';
+import{EnvProperties} from '../../utils/properties/env-properties';
+import {CommunityInfo} from "../../connect/community/communityInfo";
+import {Router} from "@angular/router";
+@Component({
+  selector: 'community-search-result',
+  templateUrl:'communitySearchResults.component.html'
+})
+
+export class CommunitySearchResultsComponent {
+  @Input() results: CommunityInfo[];
+  @Input() status: number;
+  @Input() type: string;
+  @Input() showLoading: boolean = false;
+  @Input() custom_class: string = "search-results";
+  @Input() properties: EnvProperties;
+  @Input() maxCharacters: number = 150;
+  @ViewChild('AlertModal') modal;
+
+
+  public urlParam: string;
+  public errorCodes:ErrorCodes = new ErrorCodes();
+  public routerHelper:RouterHelper = new RouterHelper();
+  public errorMessage: string = "No results found";
+  public selectedCommunityId: string;
+  constructor(private router: Router) {}
+
+  ngOnInit() {
+
+  }
+
+  getProductionPrefix():string{
+    return (this.properties.environment == "beta")?"beta.":""
+  }
+
+  isProduction():boolean{
+    return this.properties.environment!="development";
+
+  }
+
+  public _formatDescription(description){
+    return (((description).length > this.maxCharacters)?(description.substring(0,(this.maxCharacters - ('...').length))+"..."):description);
+  }
+
+  public confirmModalOpen(community: CommunityInfo) {
+      this.selectedCommunityId = community.communityId;
+      this.modal.cancelButton = true;
+      this.modal.okButton = true;
+      this.modal.alertTitle = 'You have selected ' + community.title;
+      this.modal.alertMessage = false;
+      this.modal.okButtonLeft = false;
+      this.modal.okButtonText = 'Yes';
+      this.modal.cancelButtonText = 'No';
+      this.modal.open();
+  }
+
+  public goToCommunityPage(data: any) {
+    let url = '';
+    if(this.isProduction()) {
+      url = 'https://'+ this.getProductionPrefix() + this.selectedCommunityId +'.openaire.eu';
+    } else {
+      url = this.router.createUrlTree(['/'], {
+        queryParams: { 'communityId': this.selectedCommunityId} }).toString();
+    }
+    window.open(url, '_blank');
+  }
+}
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/searchPage.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/searchPage.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/searchPage.component.ts	(revision 55570)
@@ -1,24 +1,21 @@
 import {Component, Input}             from '@angular/core';
 import {ViewChild, Output}            from '@angular/core';
-import {EventEmitter,ElementRef}      from '@angular/core';
+import {EventEmitter}      from '@angular/core';
 import {Location}                     from '@angular/common';
 import {Router, ActivatedRoute}       from '@angular/router';
 import {Title, Meta}                  from '@angular/platform-browser';
 
-import {Observable}                   from 'rxjs/Observable';
-
 import {Filter, Value}                from './searchHelperClasses.class';
-import {SearchResult}                 from '../../utils/entities/searchResult';
-import {SearchFields, FieldDetails}   from '../../utils/properties/searchFields';
+import {SearchFields}                 from '../../utils/properties/searchFields';
 import {SearchUtilsClass}             from './searchUtils.class';
 import {DOI, StringUtils}             from '../../utils/string-utils.class';
+import {RouterHelper}                 from '../../utils/routerHelper.class';
 import {ModalLoading}                 from '../../utils/modal/loading.component';
-import {SearchFilterComponent}        from './searchFilter.component';
-import {SearchFilterModalComponent}   from './searchFilterModal.component';
 import {ErrorCodes}                   from '../../utils/properties/errorCodes';
 import {PiwikService}                 from '../../utils/piwik/piwik.service';
 import {EnvProperties}                from '../../utils/properties/env-properties';
-import { SEOService } from '../../sharedComponents/SEO/SEO.service';
+import { SEOService }                 from '../../sharedComponents/SEO/SEO.service';
+import {HelperFunctions} from "../../utils/HelperFunctions.class";
 
 @Component({
     selector: 'search-page',
@@ -55,6 +52,8 @@
   @Input() mapUrl: string = "";
   @Input() mapTooltipType: string ="content providers";
   @Input() newQueryButton: boolean = true;
+  @Input() lastIndex: boolean = true;
+  @Input() hasPrefix: boolean = true;
   //@Input() sortBy: string = "";
   @ViewChild (ModalLoading) loading : ModalLoading ;
   public fieldIdsMap;//:  { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string  }};
@@ -70,9 +69,10 @@
   // public currentFilter: Filter;
   public csvLimit: number = 0;
   public pagingLimit: number = 0;
-  public resultsPerPage: number = 0;
+  public resultsPerPage: number = 10;
   public isPiwikEnabled;
   properties:EnvProperties;
+  public routerHelper:RouterHelper = new RouterHelper();
   public errorCodes:ErrorCodes = new ErrorCodes();
 
   constructor (private route: ActivatedRoute,
@@ -79,7 +79,6 @@
                private location: Location,
                private _meta: Meta,
                private _title: Title,
-               private element: ElementRef,
                private _piwikService:PiwikService,
                private router: Router,
              private seoService: SEOService) {
@@ -91,7 +90,6 @@
       .subscribe((data: { envSpecific: EnvProperties }) => {
         this.properties = data.envSpecific;
         this.pagingLimit = data.envSpecific.pagingLimit;
-        this.resultsPerPage =data.envSpecific.resultsPerPage;
         this.csvLimit = data.envSpecific.csvLimit;
         this.isPiwikEnabled = data.envSpecific.enablePiwikTrack;
         if(typeof window !== 'undefined') {
@@ -101,9 +99,8 @@
           this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe();
         }
       });
-    if (typeof document !== 'undefined') {
-       this.element.nativeElement.scrollIntoView();
-    }
+      HelperFunctions.scroll();
+
         // this.updateBaseUrlWithParameters(this.filters);
         this.updateTitle(this.pageTitle);
         var description = "Openaire, search, repositories, open access, type, content provider, funder, project, " + this.type + "," +this.pageTitle;
@@ -110,33 +107,46 @@
         this.updateDescription(description);
         this.seoService.createLinkForCanonicalURL(this.properties.baseLink+this.router.url,false);
   }
-  ngAfterViewChecked(){
 
-  }
   ngOnDestroy() {
     if(this.piwiksub){
       this.piwiksub.unsubscribe();
     }
   }
-  // toggleModal($event) {
-  //   this.currentFilter = $event.value;
-  //   //this.searchFilterModal.open();
-  // }
 
+
   updateDescription(description:string) {
     this._meta.updateTag({content:description},"name='description'");
     this._meta.updateTag({content:description},"property='og:description'");
   }
+
   updateTitle(title:string) {
-    var _prefix ="OpenAIRE | ";
-    var _title = _prefix + ((title.length> 50 ) ?title.substring(0,50):title);
+    let _title: string;
+    if(this.hasPrefix) {
+      let _prefix ="OpenAIRE | ";
+      _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
+    } else {
+      _title = ((title.length > 50) ? title.substring(0, 50) : title);
+    }
     this._title.setTitle(_title);
     this._meta.updateTag({content:_title},"property='og:title'");
   }
+
   updateUrl(url:string) {
     this._meta.updateTag({content:url},"property='og:url'");
   }
 
+  public getQueryParamsFromUrl(params) {
+    this.queryParameters = new Map<string,string>();
+    for(let i=0; i< this.refineFields.length ; i++) {
+      let filterId = this.refineFields[i];
+      if (params[filterId] != undefined) {
+        this.queryParameters.set(filterId, StringUtils.URIDecode(params[filterId]));
+      }
+    }
+    return this.queryParameters;
+  }
+
   public getQueryParametersFromUrl(params){ // called by ngOnInit function of search find pages
     // var parameters = "";
     var allFqs = "";
@@ -359,7 +369,7 @@
     if(this.searchUtils.page != 1 && includePage){
        allLimits+=((allLimits.length == 0)?'?':'&') + 'page=' + this.searchUtils.page;
     }
-    if(this.searchUtils.size != 10) {
+    if(this.searchUtils.size != this.resultsPerPage) {
       allLimits+=((allLimits.length == 0)?'?':'&') + 'size=' + this.searchUtils.size;
       this.parameterNames.push("size");
       this.parameterValues.push(""+this.searchUtils.size);
@@ -523,7 +533,9 @@
     //console.info("queryParams : "+queryParameters);
     var indexQuery = this.createIndexQueryParameters(this.filters);
 
-    this.location.go(location.pathname,urlParameters);
+    //this.location.go(location.pathname,urlParameters);
+    this.router.navigate( [this.baseUrl], { queryParams: this.routerHelper.createQueryParams(this.parameterNames, this.parameterValues) } );
+    
 /* Code For Piwik*/
     if (typeof localStorage !== 'undefined') {
       localStorage.setItem('previousRoute', this.router.url);
@@ -534,12 +546,10 @@
     /* End Piwik Code */
     this.queryChange.emit({
         value: queryParameters,
-        index:indexQuery
-
+        index:indexQuery,
+        params: this.queryParameters
     });
-    if (typeof document !== 'undefined') {
-       this.element.nativeElement.scrollIntoView();
-    }
+    HelperFunctions.scroll();
   }
   filterChanged($event){
        this.goTo(1);
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/searchResults.module.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/searchResults.module.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/searchResults.module.ts	(revision 55570)
@@ -14,18 +14,14 @@
     CommonModule, FormsModule,
     RouterModule, ErrorMessagesModule,
     ApprovedByCommunityModule
-   ],
+  ],
   declarations: [
-    SearchResultComponent,
-
-],
-
+    SearchResultComponent
+  ],
   providers:[
   ],
   exports: [
-
-      SearchResultComponent
-
-    ]
+    SearchResultComponent
+  ]
 })
 export class SearchResultsModule { }
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/searchSorting.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/searchSorting.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/searchSorting.component.ts	(revision 55570)
@@ -1,79 +1,38 @@
 import {Component, Input, Output, EventEmitter} from '@angular/core';
-import {Observable}       from 'rxjs/Observable';
 
-import {Router, ActivatedRoute} from '@angular/router';
-import {RouterHelper} from '../../utils/routerHelper.class';
 @Component({
     selector: 'search-sorting',
-    template: `
-      <!--form class="uk-form-horizontal uk-width-1-1">
-        <div class="uk-form-label inherit-color">Sort By:</div>
-        <div class="uk-form-controls">
-          <select class="uk-select" id="form-horizontal-select" name="select_sort_results"
-                  [(ngModel)]="sortBy" (ngModelChange)="navigateSort(sortBy)">
-            <option value="">Relevance score</option>
-            <option value="resultdateofacceptance,descending">Year</option>
-          </select>
-        </div>
-      </form-->
-
-      <!--select class="uk-select uk-width-2-3 uk-float-right" id="form-horizontal-select" name="select_sort_results"
-              [(ngModel)]="sortBy" (ngModelChange)="navigateSort(sortBy)">
-        <option value="">Most relevant first</option>
-        <option value="resultdateofacceptance,descending">Most recent first</option>
-      </select-->
-
+    template: `        
       <span class="uk-width-2-3@m uk-width-1-1@s uk-float-right">
         <span class="uk-width-1-4"> Sort by:</span>
-        <select class="uk-select uk-width-3-4@m uk-width-auto" id="form-horizontal-select" name="select_results_per_page"
+        <select *ngIf="entityType != 'community'" class="uk-select uk-width-3-4@m uk-width-auto" id="form-horizontal-select" name="select_results_per_page"
                 [(ngModel)]="sortBy" (ngModelChange)="sortByChanged()">
                 <option value="">Relevance</option>
                 <option value="resultdateofacceptance,descending">Date (most recent)</option>
                 <option value="resultdateofacceptance,ascending">Date (least recent)</option>
         </select>
+        <select *ngIf="entityType == 'community'" class="uk-select uk-width-3-4@m uk-width-auto" id="form-horizontal-select" name="select_results_per_page"
+                  [(ngModel)]="sortBy" (ngModelChange)="sortByChanged()">
+                <option value="">Title</option>
+                <option value="creationdate,descending">Creation Date (most recent)</option>
+                <option value="creationdate,ascending">Creation Date (least recent)</option>
+        </select>
       </span>
-
-      <!--ul class="uk-subnav uk-subnav-pill">
-        <li [class]="sortBy == ''  ? 'uk-active' : ''"><a  [queryParams]="routerHelper.createQueryParams(parameterNames,parameterValues)"  routerLinkActive="router-link-active" [routerLink]=baseUrl>Sort by Relevance</a></li>
-        <li [class]="sortBy == 'resultdateofacceptance,descending'? 'uk-active' : ''"><a  [queryParams]="routerHelper.createQueryParamsSortBy(parameterNames,parameterValues,'sortBy',sortBy)" routerLinkActive="router-link-active" [routerLink]=baseUrl>Sort by Date</a></li>
-      </ul-->
     `
 })
 
 export class SearchSortingComponent {
-    /*@Input() searchUtils;
-    @Input() baseUrl;
-    @Input() parameterNames:string[];
-    @Input() parameterValues:string[];
-    */
-    @Input() sortBy: string="";
+
+    @Input() sortBy: string = '';
+    @Input() entityType: string = '';
     @Output() sortByChange  = new EventEmitter();
 
-    //public routerHelper:RouterHelper = new RouterHelper();
 
-    constructor (/*private route: ActivatedRoute, private _router: Router*/) {}
+    constructor () {}
 
     ngOnInit() {}
 
-    /*navigateSort(sortBy: string) {
-      this.searchUtils.page = 1;
 
-      console.info("sortBy="+sortBy);
-      if(sortBy) {
-        this._router.navigate([this.baseUrl], { queryParams: this.routerHelper.createQueryParamsSortBy(this.parameterNames, this.parameterValues, 'sortBy', sortBy)});
-      } else {
-        let index: number = this.parameterNames.findIndex(function(element) {
-          return element == "sortBy";
-        });
-        console.info("index of sortby: "+index);
-        if(index >= 0) {
-          this.parameterNames.splice(index, 1);
-          this.parameterValues.splice(index, 1);
-        }
-        this._router.navigate([this.baseUrl], { queryParams: this.routerHelper.createQueryParams(this.parameterNames, this.parameterValues)});
-      }
-    }*/
-
     sortByChanged() {
       this.sortByChange.emit({
           value: this.sortBy
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/advancedSearchPage.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/advancedSearchPage.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/searchUtils/advancedSearchPage.component.ts	(revision 55570)
@@ -13,6 +13,7 @@
 import {ModalLoading}                 from '../../utils/modal/loading.component';
 import {StringUtils, Dates}           from '../../utils/string-utils.class';
 import {ErrorCodes}                   from '../../utils/properties/errorCodes';
+import {RouterHelper}                 from '../../utils/routerHelper.class';
 
 import {PiwikService}                 from '../../utils/piwik/piwik.service';
 import {EnvProperties}                from '../../utils/properties/env-properties';
@@ -55,6 +56,7 @@
   public resultsPerPage: number = 0;
   isPiwikEnabled = false;
   properties:EnvProperties;
+  public routerHelper:RouterHelper = new RouterHelper();
   public errorCodes:ErrorCodes = new ErrorCodes();
 
   url = null;
@@ -265,7 +267,9 @@
      this.searchUtils.page = page;
     var urlParameters = this.createUrlParameters(true);
     var queryParameters = this.createQueryParameters();
-    this.location.go(location.pathname,urlParameters);
+    //this.location.go(location.pathname,urlParameters);
+    this.router.navigate( [this.searchUtils.baseUrl], { queryParams: this.routerHelper.createQueryParams(this.parameterNames, this.parameterValues) } );
+
     this.queryChange.emit({
         value: queryParameters
     });
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/dataProviders/journals.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/dataProviders/journals.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/dataProviders/journals.component.ts	(revision 55570)
@@ -166,7 +166,7 @@
     //console.info("queryChanged: Execute search query "+parameters);
     var csv_parameters = $event.value;
 
-    this._getResults(parameters,csv_parameters, false, this.searchUtils.page, this.searchUtils.size);
+    //this._getResults(parameters,csv_parameters, false, this.searchUtils.page, this.searchUtils.size);
   }
   private createFilters():Filter[] {
     var filter_names=["Type","Compatibility Level"];
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/simple/searchOrps.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/simple/searchOrps.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/simple/searchOrps.component.ts	(revision 55570)
@@ -286,7 +286,7 @@
     this.loadPaging = true;
 
     var parameters = $event.value;
-    this._getResults(parameters, true, this.searchUtils.page, this.searchUtils.size, this.searchUtils.sortBy);
+    //this._getResults(parameters, true, this.searchUtils.page, this.searchUtils.size, this.searchUtils.sortBy);
   }
 
   private handleError(message: string, error) {
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/simple/searchOrganizations.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/simple/searchOrganizations.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/simple/searchOrganizations.component.ts	(revision 55570)
@@ -190,7 +190,7 @@
 
     var parameters = $event.value;
     //console.info("queryChanged: Execute search query "+parameters);
-    this._getResults(parameters, true, this.searchUtils.page, this.searchUtils.size);
+    //this._getResults(parameters, true, this.searchUtils.page, this.searchUtils.size);
   }
 
   private handleError(message: string, error) {
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/simple/searchProjects.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/simple/searchProjects.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/searchPages/simple/searchProjects.component.ts	(revision 55570)
@@ -229,7 +229,7 @@
 
     this.urlParams = undefined;
     var parameters = $event.value;
-    this._getResults(parameters, true, this.searchUtils.page, this.searchUtils.size);
+    //this._getResults(parameters, true, this.searchUtils.page, this.searchUtils.size);
   }
 
   private handleError(message: string, error) {
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/connect/community/communityInfo.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/connect/community/communityInfo.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/connect/community/communityInfo.ts	(revision 55570)
@@ -11,4 +11,6 @@
   subjects: string[];
   status:string;
   zenodoCommunity:string;
+  isSubscribed: boolean;
+  isManager: boolean;
 }
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/orp/orp.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/orp/orp.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/orp/orp.component.ts	(revision 55570)
@@ -1,5 +1,5 @@
 import {Component, ViewChild}         from '@angular/core';
-import {ElementRef, Input}            from '@angular/core';
+import {Input}            from '@angular/core';
 import {ActivatedRoute, Router}       from '@angular/router';
 import {Title, Meta}                  from '@angular/platform-browser';
 
@@ -12,6 +12,7 @@
 import {OrpService}               from './orp.service';
 import {PiwikService}                 from '../../utils/piwik/piwik.service';
 import { SEOService } from '../../sharedComponents/SEO/SEO.service';
+import {HelperFunctions} from "../../utils/HelperFunctions.class";
 
 
 @Component({
@@ -61,8 +62,7 @@
     sub: any; piwiksub: any; infoSub: any;
     properties:EnvProperties;
 
-    constructor (private element: ElementRef,
-                 private _orpService: OrpService,
+    constructor (private _orpService: OrpService,
                  private _piwikService:PiwikService,
                  private  route: ActivatedRoute,
                  private _meta: Meta,
@@ -189,9 +189,7 @@
     }
 
     public scroll() {
-      if (typeof document !== 'undefined') {
-         this.element.nativeElement.scrollIntoView();
-      }
+      HelperFunctions.scroll();
     }
 
     private handleError(message: string, error) {
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/dataProvider/dataProvider.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/dataProvider/dataProvider.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/dataProvider/dataProvider.component.ts	(revision 55570)
@@ -1,5 +1,5 @@
 import {Component, ViewChild}               from '@angular/core';
-import {ElementRef, Input}                  from '@angular/core';
+import {Input}                  from '@angular/core';
 import {ActivatedRoute, Router}             from '@angular/router';
 import {Title, Meta}                        from '@angular/platform-browser';
 
@@ -29,6 +29,7 @@
 import {RouterHelper}                       from '../../utils/routerHelper.class';
 import {PiwikService}                       from '../../utils/piwik/piwik.service';
 import { SEOService } from '../../sharedComponents/SEO/SEO.service';
+import {HelperFunctions} from "../../utils/HelperFunctions.class";
 
 
 @Component({
@@ -95,8 +96,6 @@
   private reloadDataproviders: boolean = true;
   private reloadRelatedDatasources: boolean = true;
 
-  private nativeElement : Node;
-
   sub: any;
   piwiksub: any;
   subInfo: any;
@@ -103,8 +102,7 @@
   relatedDatasourcesSub: any;
   properties:EnvProperties;
 
-  constructor (private element: ElementRef,
-               private _dataproviderService: DataProviderService,
+  constructor (private _dataproviderService: DataProviderService,
                private _piwikService:PiwikService,
                private route: ActivatedRoute,
                private _meta: Meta,
@@ -142,9 +140,7 @@
        this.getDataProviderInfo(this.datasourceId);
       }
 
-      if (typeof document !== 'undefined') {
-        this.element.nativeElement.scrollIntoView();
-      }
+      HelperFunctions.scroll();
    });
  }
 
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/dataset/dataset.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/dataset/dataset.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/dataset/dataset.component.ts	(revision 55570)
@@ -1,5 +1,5 @@
 import {Component, ViewChild}         from '@angular/core';
-import {ElementRef, Input}            from '@angular/core';
+import {Input}            from '@angular/core';
 import {ActivatedRoute, Router}       from '@angular/router';
 import {Title, Meta}                  from '@angular/platform-browser';
 
@@ -12,6 +12,7 @@
 import {DatasetService}               from './dataset.service';
 import {PiwikService}                 from '../../utils/piwik/piwik.service';
 import { SEOService } from '../../sharedComponents/SEO/SEO.service';
+import {HelperFunctions} from "../../utils/HelperFunctions.class";
 
 
 @Component({
@@ -61,8 +62,7 @@
     sub: any; piwiksub: any; infoSub: any;
     properties:EnvProperties;
 
-    constructor (private element: ElementRef,
-                 private _datasetService: DatasetService,
+    constructor (private _datasetService: DatasetService,
                  private _piwikService:PiwikService,
                  private  route: ActivatedRoute,
                  private _meta: Meta,
@@ -202,12 +202,6 @@
       return Array.from(map.keys());
     }
 
-    public scroll() {
-      if (typeof document !== 'undefined') {
-         this.element.nativeElement.scrollIntoView();
-      }
-    }
-
     private handleError(message: string, error) {
         console.error("Research Data Landing Page: "+message, error);
     }
@@ -223,4 +217,8 @@
       }
       return totalPages;
     }
+
+    public scroll() {
+      HelperFunctions.scroll();
+    }
 }
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/organization/organization.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/organization/organization.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/organization/organization.component.ts	(revision 55570)
@@ -27,6 +27,7 @@
 import {StringUtils}                    from '../../utils/string-utils.class';
 import {EnvProperties}                  from '../../utils/properties/env-properties';
 import { SEOService } from '../../sharedComponents/SEO/SEO.service';
+import {HelperFunctions} from "../../utils/HelperFunctions.class";
 
 @Component({
     selector: 'organization',
@@ -48,6 +49,7 @@
     public csvProjectParamsHead: string;
     public csvPublicationParamsHead: string;
     public csvParamsTail: string;
+    public csvAffiliatedPublications: string;
 
     // Active tab variable for responsiveness
     public activeTab: string = "Publications";
@@ -141,15 +143,14 @@
                 this.warningMessage="No valid organization id";
             }
 
-            if (typeof document !== 'undefined') {
-               this.element.nativeElement.scrollIntoView();
-            }
+          HelperFunctions.scroll();
 
-            this.csvParamsTail = '" and relorganizationid exact "'+this.organizationId+'" ))';
+          this.csvParamsTail = '" and relorganizationid exact "'+this.organizationId+'" ))';
 
         });
 
         this.downloadURLAPI =this.properties.csvAPIURL;
+        this.csvAffiliatedPublications = this.downloadURLAPI+"?format=csv&type=publications&fq=(((oaftype exact result) and (resulttypeid exact publication)) and (relorganizationid exact \""+this.organizationId+"\"))";
         this.csvProjectParamsHead = 'format=csv&type=projects&fq=( (oaftype exact project)and (funder exact "';
         //this.csvPublicationParamsHead = 'format=csv-special&type=publications&page=0&query=((((oaftype exact result) and (resulttypeid exact publication)) and (funderid exact ';
     }
@@ -376,10 +377,10 @@
                                   let url: string;
                                   if(!title) {
                                       //url = this.downloadURLAPI+"projects/"+projects[index].id+"?type=publications&format=csv-special";//&size="+data;
-                                      url = this.downloadURLAPI+"?format=csv-special&type=publications&fq=(((oaftype exact result) and (resulttypeid exact publication)) and (relprojectid exact '"+projects[index].id+"'))"
+                                      url = this.downloadURLAPI+"?format=csv-special&type=publications&fq=(((oaftype exact result) and (resulttypeid exact publication)) and (relprojectid exact \""+projects[index].id+"\"))"
                                   } else {
                                       //url = this.downloadURLAPI+"projects/"+projects[index].id+"/publications?format=csv-special-notitle";//&size="+data;
-                                      url = this.downloadURLAPI+"?format=csv-special-notitle&type=publications&fq=(((oaftype exact result) and (resulttypeid exact publication)) and (relprojectid exact '"+projects[index].id+"'))"
+                                      url = this.downloadURLAPI+"?format=csv-special-notitle&type=publications&fq=(((oaftype exact result) and (resulttypeid exact publication)) and (relprojectid exact \""+projects[index].id+"\"))"
                                   }
 
                                   if(data == 0 && (counter > 1 || title)) {   // if no publications for this project
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/organization/organization.component.html
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/organization/organization.component.html	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/organization/organization.component.html	(revision 55570)
@@ -143,7 +143,7 @@
 <!--                      url = this.downloadURLAPI+"format=csv-special&type=publications&fq=(((oaftype exact result) and (resulttypeid exact publication)) and (relprojectid exact '"+projects[index].id+"'))"-->
 
                         <!-- <a class="clickable" (click)="downloadFile(downloadURLAPI+'/organizations/'+organizationId+'?type=publications&format=csv')"> -->
-                        <a class="clickable" (click)="downloadFile(downloadURLAPI+'?format=csv&type=publications&fq=(((oaftype exact result) and (resulttypeid exact publication)) and (relorganizationid exact '+organizationId+'))', 'organization-publications-report')">
+                        <a class="clickable" (click)="downloadFile(csvAffiliatedPublications, 'organization-publications-report')">
                             <span  class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="download" ratio="1"><polyline fill="none" stroke="#000" points="14,10 9.5,14.5 5,10"></polyline><rect x="3" y="17" width="13" height="1"></rect><line fill="none" stroke="#000" x1="9.5" y1="13.91" x2="9.5" y2="3"></line></svg></span>
                             <span class="uk-icon-download"> Publications of organization (CSV) - based on the affiliation information.</span>
                         </a>
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/project/project.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/project/project.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/project/project.component.ts	(revision 55570)
@@ -1,5 +1,5 @@
 import {Component, ViewChild}         from '@angular/core';
-import {ElementRef, Input}            from '@angular/core';
+import {Input}            from '@angular/core';
 import {ActivatedRoute, Router}       from '@angular/router';
 import {Params}                       from '@angular/router';
 import {Title, Meta}                  from '@angular/platform-browser';
@@ -27,6 +27,7 @@
 import {PiwikService}                 from '../../utils/piwik/piwik.service';
 import {EnvProperties}                from '../../utils/properties/env-properties';
 import { SEOService } from '../../sharedComponents/SEO/SEO.service';
+import {HelperFunctions} from "../../utils/HelperFunctions.class";
 
 @Component({
     selector: 'project',
@@ -101,8 +102,7 @@
 
   sub: any; piwiksub: any; infoSub: any; downloadFilePiwikSub: any;
 properties:EnvProperties;
-  constructor ( private element: ElementRef,
-                private _projectService: ProjectService,
+  constructor ( private _projectService: ProjectService,
                 private _piwikService:PiwikService,
                 private  route: ActivatedRoute,
                 private _searchPublicationsService: SearchPublicationsService,
@@ -156,14 +156,12 @@
       this.downloadURLAPI = this.properties.csvAPIURL;
 
       this.createClipboard();
-      this.csvParams = "?format=csv-special&type=publications&fq=(((oaftype exact result) and (resulttypeid exact publication)) and (relprojectid exact "+this.projectId+"))";
-      this.csvParamsDatasets = "?format=csv-special&type=datasets&fq=(((oaftype exact result) and (resulttypeid exact dataset)) and (relprojectid exact "+this.projectId+"))";
-      this.csvParamsSoftware = "?format=csv-special&type=software&fq=(((oaftype exact result) and (resulttypeid exact software)) and (relprojectid exact "+this.projectId+"))";
-      this.csvParamsOrps = "?format=csv-special&type=other&fq=(((oaftype exact result) and (resulttypeid exact other)) and (relprojectid exact "+this.projectId+"))";
+      this.csvParams = "?format=csv-special&type=publications&fq=(((oaftype exact result) and (resulttypeid exact publication)) and (relprojectid exact \""+this.projectId+"\"))";
+      this.csvParamsDatasets = "?format=csv-special&type=datasets&fq=(((oaftype exact result) and (resulttypeid exact dataset)) and (relprojectid exact \""+this.projectId+"\"))";
+      this.csvParamsSoftware = "?format=csv-special&type=software&fq=(((oaftype exact result) and (resulttypeid exact software)) and (relprojectid exact \""+this.projectId+"\"))";
+      this.csvParamsOrps = "?format=csv-special&type=other&fq=(((oaftype exact result) and (resulttypeid exact other)) and (relprojectid exact \""+this.projectId+"\"))";
 
-      if (typeof document !== 'undefined') {
-         this.element.nativeElement.scrollIntoView();
-      }
+      HelperFunctions.scroll();
   });
 }
 
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/landing-utils/fundedBy.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/landing-utils/fundedBy.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/landing-utils/fundedBy.component.ts	(revision 55570)
@@ -1,4 +1,5 @@
-import {Component, Input, ElementRef} from '@angular/core';
+import {Component, Input} from '@angular/core';
+import {HelperFunctions} from "../../utils/HelperFunctions.class";
 
 @Component({
     selector: 'fundedBy',
@@ -71,7 +72,7 @@
     public threshold: number = 5;
     public showNum: number = 5;
 
-    constructor (private element: ElementRef) {}
+    constructor () {}
 
     ngOnInit() {}
 
@@ -124,8 +125,6 @@
     }
 
     public scroll() {
-      if (typeof document !== 'undefined') {
-         this.element.nativeElement.scrollIntoView();
-      }
+      HelperFunctions.scroll();
     }
 }
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/landing-utils/showAuthors.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/landing-utils/showAuthors.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/landing-utils/showAuthors.component.ts	(revision 55570)
@@ -1,5 +1,6 @@
-import {Component, Input, ElementRef} from '@angular/core';
+import {Component, Input} from '@angular/core';
 import {RouterHelper} from '../../utils/routerHelper.class';
+import {HelperFunctions} from "../../utils/HelperFunctions.class";
 
 @Component({
     selector: 'showAuthors',
@@ -46,7 +47,7 @@
     public showAll: boolean = false;
     public routerHelper:RouterHelper = new RouterHelper();
 
-    constructor (private element: ElementRef) {
+    constructor () {
     }
 
     ngOnInit() {
@@ -57,8 +58,6 @@
     }
 
     public scroll() {
-      if (typeof document !== 'undefined') {
-         this.element.nativeElement.scrollIntoView();
-      }
+      HelperFunctions.scroll();
     }
 }
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/email/email.service.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/email/email.service.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/email/email.service.ts	(revision 55570)
@@ -2,6 +2,7 @@
 import {Http, Response, Headers, RequestOptions} from '@angular/http';
 import {Email} from './email';
 import {CustomOptions} from '../../services/servicesUtils/customOptions.class';
+import {EmailRecaptcha} from "../entities/EmailRecaptcha";
 
 @Injectable()
 export class EmailService {
@@ -16,4 +17,12 @@
                    .map(request => request.json());
     }
 
+    contact(url: string, email: Email, recaptcha: string) {
+        const data: EmailRecaptcha = new EmailRecaptcha();
+        data.email = email;
+        data.recaptcha = recaptcha;
+        return this.http.post(url, data)
+            .map(request => request.json());
+    }
+
 }
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/entities/EmailRecaptcha.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/entities/EmailRecaptcha.ts	(nonexistent)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/entities/EmailRecaptcha.ts	(revision 55570)
@@ -0,0 +1,6 @@
+import {Email} from "../email/email";
+
+export class EmailRecaptcha {
+  email: Email = null;
+  recaptcha: string = null;
+}
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/landing-utils/searchingProjectsInTab.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/landing-utils/searchingProjectsInTab.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/landing-utils/searchingProjectsInTab.component.ts	(revision 55570)
@@ -69,7 +69,7 @@
     ngOnInit() {
 
             if(this.organizationId) {
-                this.linkToSearchProjects = this.properties.searchLinkToAdvancedPublications;//+"?organization="+this.organizationId+"or=and";;
+                this.linkToSearchProjects = this.properties.searchLinkToAdvancedProjects;//+"?organization="+this.organizationId+"or=and";;
                 if(this.fetchProjects.searchUtils.totalResults > 0) {
                   this.search(false,"");
                 }
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/landing-utils/availableOn.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/landing-utils/availableOn.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/landing-utils/availableOn.component.ts	(revision 55570)
@@ -1,4 +1,5 @@
-import {Component, Input, ElementRef} from '@angular/core';
+import {Component, Input} from '@angular/core';
+import {HelperFunctions} from "../../utils/HelperFunctions.class";
 
 @Component({
     selector: 'availableOn',
@@ -64,13 +65,11 @@
     public threshold: number = 5;
     public showNum: number = 5;
 
-    constructor (private element: ElementRef) {}
+    constructor () {}
 
     ngOnInit() {}
 
     public scroll() {
-      if (typeof document !== 'undefined') {
-         this.element.nativeElement.scrollIntoView();
-      }
+      HelperFunctions.scroll();
     }
 }
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/email/contact-form.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/email/contact-form.ts	(nonexistent)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/email/contact-form.ts	(revision 55570)
@@ -0,0 +1,9 @@
+export class ContactForm {
+  name: string = '';
+  surname: string = '';
+  email: string = '';
+  affiliation: string = '';
+  community: string = '';
+  message: string = '';
+  recaptcha: string = null;
+}
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/properties/searchFields.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/properties/searchFields.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/properties/searchFields.ts	(revision 55570)
@@ -134,6 +134,7 @@
 
       public ADVANCED_SEARCH_OPERATORS:[{name:string, id:string}] = [{name:"AND",id:"and"},{name:"OR",id:"or"},{name:"NOT",id:"not"}];
 
+      public COMMUNITIES_SEARCH_FIELDS:string[] = ["type","status","role"];
      constructor (){
      }
      getFieldName(fieldId:string,fieldType:string):string{
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/login/utils/guardHelper.class.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/login/utils/guardHelper.class.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/login/utils/guardHelper.class.ts	(revision 55570)
@@ -5,5 +5,5 @@
    public static NOT_CONNECT_ADMIN = 4;
    public static NO_COMMUNITY = 5;
    public static NOT_SUBSCRIBER = 6;
-
+   public static ACTION_REQUIRES_LOGIN = 7;
 }
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/claims/linking/selected/metadataPreview.component.html
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/claims/linking/selected/metadataPreview.component.html	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/claims/linking/selected/metadataPreview.component.html	(revision 55570)
@@ -250,6 +250,6 @@
     </div>
   </div>
 
-  <modal-alert (alertOutput)="confirmClose($event)">
+  <modal-alert (alertOutput)="confirmClose()">
   </modal-alert>
 </div>
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/sharedComponents/sidebar/sideBar.module.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/sharedComponents/sidebar/sideBar.module.ts	(nonexistent)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/sharedComponents/sidebar/sideBar.module.ts	(revision 55570)
@@ -0,0 +1,22 @@
+import {NgModule} from '@angular/core';
+import {CommonModule} from '@angular/common';
+
+import {RouterModule} from "@angular/router";
+
+import {SideBarComponent} from './sideBar.component';
+
+@NgModule({
+  imports: [
+    CommonModule,
+    RouterModule
+  ],
+  declarations: [
+    SideBarComponent
+  ],
+  providers: [],
+  exports: [
+    SideBarComponent
+  ]
+})
+export class SideBarModule {
+}
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/errorMessages.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/errorMessages.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/errorMessages.component.ts	(revision 55570)
@@ -4,32 +4,32 @@
 @Component({
     selector: 'errorMessages',
     template: `
-      <div *ngIf="status.some(checkErroCode(errorCodes.LOADING))"
+      <div *ngIf="status.some(checkErrorCode(errorCodes.LOADING))"
             [class]="(tab_error_class ? '' : 'uk-animation-fade') + ' uk-margin-top  uk-width-1-1'" role="alert"><span class="loading-gif  uk-align-center" ></span></div>
-      <div *ngIf="status.every(checkErroCode(errorCodes.NONE))"
+      <div *ngIf="status.every(checkErrorCode(errorCodes.NONE))"
             [class]="(tab_error_class ? 'uk-margin-top' : 'uk-animation-fade') + ' uk-alert uk-alert-primary'" role="alert">No {{type}} available</div>
-      <div *ngIf="status.every(checkErroCode(errorCodes.ERROR)) ||
-                  (status.some(checkErroCode(errorCodes.ERROR)) && (!status.every(checkErroCode(errorCodes.DONE)) || !status.every(checkErroCode(errorCodes.LOADING))))"
+      <div *ngIf="status.every(checkErrorCode(errorCodes.ERROR)) ||
+                  (status.some(checkErrorCode(errorCodes.ERROR)) && (!status.every(checkErrorCode(errorCodes.DONE)) || !status.every(checkErrorCode(errorCodes.LOADING))))"
             [class]="(tab_error_class ? 'uk-margin-top' : 'uk-animation-fade') + ' uk-alert uk-alert-warning'" role="alert">
-        An Error Occured
+        An Error Occurred
       </div>
-      <div *ngIf="status.every(checkErroCode(errorCodes.NOT_AVAILABLE)) ||
-                  (status.some(checkErroCode(errorCodes.NOT_AVAILABLE)) && (!status.every(checkErroCode(errorCodes.DONE)) || !status.every(checkErroCode(errorCodes.LOADING))))"
+      <div *ngIf="status.every(checkErrorCode(errorCodes.NOT_AVAILABLE)) ||
+                  (status.some(checkErrorCode(errorCodes.NOT_AVAILABLE)) && (!status.every(checkErrorCode(errorCodes.DONE)) || !status.every(checkErrorCode(errorCodes.LOADING))))"
             [class]="(tab_error_class ? 'uk-margin-top' : 'uk-animation-fade') + ' uk-alert uk-alert-warning'" role="alert">
-        Service temprorarily unavailable. Please try again later.
+        Service temporarily unavailable. Please try again later.
       </div>
-      <div *ngIf="status.every(checkErroCode(errorCodes.NOT_FOUND)) ||
-                  (status.some(checkErroCode(errorCodes.NOT_FOUND)) && (!status.every(checkErroCode(errorCodes.DONE)) || !status.every(checkErroCode(errorCodes.LOADING))))"
+      <div *ngIf="status.every(checkErrorCode(errorCodes.NOT_FOUND)) ||
+                  (status.some(checkErrorCode(errorCodes.NOT_FOUND)) && (!status.every(checkErrorCode(errorCodes.DONE)) || !status.every(checkErrorCode(errorCodes.LOADING))))"
             [class]="(tab_error_class ? 'uk-margin-top' : 'uk-animation-fade') + ' uk-alert uk-alert-warning'" role="alert">
         No {{type}} found
       </div>
-      <div *ngIf="status.every(checkErroCode(errorCodes.OUT_OF_BOUND))"
+      <div *ngIf="status.every(checkErrorCode(errorCodes.OUT_OF_BOUND))"
             [class]="(tab_error_class ? 'uk-margin-top' : 'uk-animation-fade') + ' uk-alert uk-alert-warning'" role="alert">Requested page out of bounds
       </div>
-      <div *ngIf="status.some(checkErroCode(errorCodes.NOT_SAVED))"
+      <div *ngIf="status.some(checkErrorCode(errorCodes.NOT_SAVED))"
             [class]="(tab_error_class ? 'uk-margin-top' : 'uk-animation-fade') + ' uk-alert uk-alert-warning'" role="alert">Changes could not be saved
       </div>
-      <div *ngIf="status.some(checkErroCode(errorCodes.FORBIDDEN))"
+      <div *ngIf="status.some(checkErrorCode(errorCodes.FORBIDDEN))"
             [class]="(tab_error_class ? 'uk-margin-top' : 'uk-animation-fade') + ' uk-alert uk-alert-danger'" role="alert">You are not allowed to access this page
       </div>
     `
@@ -54,22 +54,22 @@
 
       ngOnDestroy() {}
 
-      public checkErroCode(code: number) {
+      public checkErrorCode(code: number) {
         return function(status: number) {
           return (status == code);
         }
       }
 
-      public getErrorCode(status: string) {
-        if(status == '401') {
+      public getErrorCode(status: any) {
+        if(status == '401' || status == 401) {
           return this.errorCodes.FORBIDDEN;
-        } else if(status == "403") {
+        } else if(status == "403" || status == 403) {
           return this.errorCodes.FORBIDDEN;
-        } else if(status == "204") {
+        } else if(status == "204" || status == 204) {
           return this.errorCodes.NONE;
-        } else if(status == '404') {
+        } else if(status == '404' || status == 404) {
           return this.errorCodes.NOT_FOUND;
-        } else if(status == '500') {
+        } else if(status == '500'|| status == 500) {
           return this.errorCodes.ERROR;
         } else {
           return this.errorCodes.NOT_AVAILABLE;
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/manage/manage.module.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/manage/manage.module.ts	(nonexistent)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/manage/manage.module.ts	(revision 55570)
@@ -0,0 +1,19 @@
+import { NgModule}            from '@angular/core';
+import { CommonModule }        from '@angular/common';
+import { RouterModule } from '@angular/router';
+
+import {ManageComponent} from './manage.component';
+import {AlertModalModule} from '../modal/alertModal.module';
+
+@NgModule({
+  imports: [
+    CommonModule,   RouterModule, AlertModalModule
+  ],
+  declarations: [
+    ManageComponent
+  ],
+  exports: [
+    ManageComponent
+  ]
+})
+export class ManageModule { }
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/reload/reload.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/reload/reload.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/reload/reload.component.ts	(revision 55570)
@@ -1,11 +1,7 @@
-import {Component, Input, Output, EventEmitter, ViewChild, ElementRef} from '@angular/core';
-import {Observable}       from 'rxjs/Observable';
+import {Component} from '@angular/core';
 import {ActivatedRoute, Router} from '@angular/router';
-import {Location} from '@angular/common';
-
-import {ErrorCodes} from '../utils/properties/errorCodes';
-import {RouterHelper} from '../utils/routerHelper.class';
 import {Session} from '../login/utils/helper.class';
+import {HelperFunctions} from "../utils/HelperFunctions.class";
 
 @Component({
     selector: 'reload',
@@ -23,18 +19,11 @@
 })
 export class ReloadComponent {
 
-  constructor (private element: ElementRef,
-    private route: ActivatedRoute,
-      private _router: Router,
-       private location: Location
-    ) {
+  constructor (private route: ActivatedRoute, private _router: Router) {}
 
-   }
+  public ngOnInit() {
+      HelperFunctions.scroll();
 
-  public ngOnInit() {
-    if (typeof document !== 'undefined') {
-      this.element.nativeElement.scrollIntoView();
-    }
       var URL = Session.getReloadUrl();
 
         if(URL && URL["path"] && URL["path"] != null && URL["path"] != ""){
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/publication/publication.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/publication/publication.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/publication/publication.component.ts	(revision 55570)
@@ -1,5 +1,5 @@
 import {Component, ViewChild}         from '@angular/core';
-import {ElementRef, Input}            from '@angular/core';
+import {Input}            from '@angular/core';
 import {ActivatedRoute, Router}       from '@angular/router';
 import {Title, Meta}                  from '@angular/platform-browser';
 
@@ -12,6 +12,7 @@
 import {PiwikService}                 from '../../utils/piwik/piwik.service';
 import {PublicationService}           from './publication.service';
 import { SEOService } from '../../sharedComponents/SEO/SEO.service';
+import {HelperFunctions} from "../../utils/HelperFunctions.class";
 
 
 @Component({
@@ -72,8 +73,7 @@
   sub: any; piwiksub: any; infoSub: any;
   properties:EnvProperties;
 
-  constructor ( private element: ElementRef,
-                private _publicationService: PublicationService,
+  constructor ( private _publicationService: PublicationService,
                 private _piwikService:PiwikService,
                 private route: ActivatedRoute,
                 private _meta: Meta,
@@ -293,9 +293,7 @@
     }
 
     public scroll() {
-      if (typeof document !== 'undefined') {
-         this.element.nativeElement.scrollIntoView();
-      }
+      HelperFunctions.scroll();
     }
 /*
     start(i: number, bioentitiesPage: number) {
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/landing-utils/publishedIn.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/landing-utils/publishedIn.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/landing-utils/publishedIn.component.ts	(revision 55570)
@@ -1,4 +1,5 @@
-import {Component, Input, ElementRef} from '@angular/core';
+import {Component, Input} from '@angular/core';
+import {HelperFunctions} from "../../utils/HelperFunctions.class";
 
 @Component({
     selector: 'publishedIn',
@@ -54,14 +55,12 @@
 
     public showAll: boolean = false;
 
-    constructor (private element: ElementRef) {}
+    constructor () {}
 
     ngOnInit() {}
 
     public scroll() {
-      if (typeof document !== 'undefined') {
-         this.element.nativeElement.scrollIntoView();
-      }
+      HelperFunctions.scroll();
     }
     public getKeys( map) {
       return Array.from(map.keys());
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/subscribe/subscribe.service.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/subscribe/subscribe.service.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/subscribe/subscribe.service.ts	(revision 55570)
@@ -44,6 +44,10 @@
        return this.http.post(url+"/community/"+pid+"/subscribers/delete", JSON.stringify([email]), this.getAuthOptionsWithBody())
            .map(res => <any> res.json());
      }
+     getCommunitiesSubscribedTo(email:string, url:string){
+      return this.http.get(url+"/subscriber/communities?email="+email)
+                     .map(res => <any> res.json());
+     }
 
      public getAuthOptionsWithBody():RequestOptions{
      let headers = new Headers();
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/login/user.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/login/user.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/login/user.component.ts	(revision 55570)
@@ -1,4 +1,4 @@
-import {Component, ElementRef}        from '@angular/core';
+import {Component, ElementRef, Input}        from '@angular/core';
 import {ActivatedRoute, Router}       from '@angular/router';
 import {Title, Meta}                  from '@angular/platform-browser';
 
@@ -25,6 +25,7 @@
     public routerHelper:RouterHelper = new RouterHelper();
     public loginUrl;
     properties:EnvProperties;
+    @Input() mainComponent = false;
 
     constructor( private router: Router,
                  private route: ActivatedRoute,
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/modal/alert.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/modal/alert.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/modal/alert.ts	(revision 55570)
@@ -1,8 +1,5 @@
-import {Component, ViewEncapsulation, ComponentRef, ElementRef, Input, EventEmitter, Output} from '@angular/core';
-// import { DynamicComponentLoader} from '@angular/core';
+import {Component, ViewEncapsulation, ElementRef, EventEmitter, Output} from '@angular/core';
 
-import {Open} from './open.component';
-
 @Component({
   selector: 'modal-alert',
   template: `
@@ -9,7 +6,7 @@
   <div [class]="(!isOpen)?'uk-modal ':'uk-modal uk-open uk-animation-fade'" uk-modal  [open]="!isOpen" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
     <div class="uk-modal-dialog  uk-modal-body" role="">
          <div class="uk-modal-title" [hidden]=!alertHeader>
-        <a href="" class="uk-modal-close uk-close uk-float-right" (click)='cancel()' ></a>
+        <button class="uk-modal-close-default uk-float-right" (click)='cancel()' uk-close></button>
            <h4 class="modal-title text-center" id="myModalLabel">{{alertTitle}}</h4>
         </div>
         <div class="uk-margin  ">
@@ -18,14 +15,22 @@
           </div>
           <ng-content></ng-content>
         </div>
-        <div class="  uk-text-right" [hidden]=!alertFooter>
+        <div *ngIf="okButtonLeft" class="uk-text-right" [hidden]=!alertFooter>
         <span [hidden]=!okButton >
-          <button class=" uk-button uk-button-default  " (click)="ok()">{{okButtonText}}</button>
-          </span>
-          <span [hidden]=!cancelButton>
-          <button class=" uk-button uk-button-default" (click)="cancel()">{{cancelButtonText}}</button>
-          </span>
+          <button class="uk-button uk-button-default" (click)="ok()">{{okButtonText}}</button>
+        </span>
+        <span [hidden]=!cancelButton>
+          <button class="uk-button uk-button-default" (click)="cancel()">{{cancelButtonText}}</button>
+        </span>
         </div>
+        <div *ngIf="!okButtonLeft" class="uk-text-right" [hidden]=!alertFooter>
+         <span [hidden]=!cancelButton>
+          <button class="uk-button uk-button-default" (click)="cancel()">{{cancelButtonText}}</button>
+        </span>  
+        <span [hidden]=!okButton >
+          <button class="uk-button portal-button" (click)="ok()">{{okButtonText}}</button>
+        </span>
+        </div>
 
     </div>
   </div>
@@ -84,6 +89,8 @@
     * if the value is true alert will be visible or else it will be hidden.
     */
   public isOpen:boolean=false;
+
+  public okButtonLeft: boolean = true;
   /**
     * Emitted when a ok button was clicked
     * or when Ok method is called.
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/sharedComponents/sidebar/sideBar.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/sharedComponents/sidebar/sideBar.component.ts	(nonexistent)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/sharedComponents/sidebar/sideBar.component.ts	(revision 55570)
@@ -0,0 +1,13 @@
+import {Component, Input} from '@angular/core';
+import {SideMenuItem} from "../menu";
+
+@Component({
+  selector: 'sidebar',
+  templateUrl: 'sideBar.component.html'
+})
+export class SideBarComponent {
+  @Input() communityId: string = '';
+  @Input() menuItems: SideMenuItem[] = [];
+
+  constructor() {}
+}
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/htmlProjectReport/htmlProjectReport.service.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/htmlProjectReport/htmlProjectReport.service.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/htmlProjectReport/htmlProjectReport.service.ts	(revision 55570)
@@ -27,7 +27,7 @@
         }
 
         let url = csvAPIURL;
-        url += '?format=html&type='+requestType+'&fq=(((oaftype exact result) and (resulttypeid exact '+resultTypeId+')) and (relprojectid exact "'+id+'"))';
+        url += '?format=html&type='+requestType+'&fq=(((oaftype exact result) and (resulttypeid exact "'+resultTypeId+'")) and (relprojectid exact "'+id+'"))';
 
         let key = url;
 
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/landing-utils/showIdentifiers.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/landing-utils/showIdentifiers.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/landing-utils/showIdentifiers.component.ts	(revision 55570)
@@ -1,4 +1,5 @@
-import {Component, Input, ElementRef} from '@angular/core';
+import {Component, Input} from '@angular/core';
+import {HelperFunctions} from "../../utils/HelperFunctions.class";
 
 @Component({
     selector: 'showIdentifiers',
@@ -47,7 +48,7 @@
     public sizeOfPreviousIdentifiers: number = -1;
     public pageSize: number = 10;
 
-    constructor (private element: ElementRef) {
+    constructor () {
         this.doiURL = "https://dx.doi.org/";
         this.pmcURL = "http://europepmc.org/articles/";
         this.handleURL = "http://hdl.handle.net/";
@@ -84,9 +85,7 @@
     }
 
     public scroll() {
-      if (typeof document !== 'undefined') {
-         this.element.nativeElement.scrollIntoView();
-      }
+      HelperFunctions.scroll();
     }
     public getKeys( map) {
       return Array.from(map.keys());
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/software/software.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/software/software.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/landingPages/software/software.component.ts	(revision 55570)
@@ -1,5 +1,5 @@
 import {Component, ViewChild}         from '@angular/core';
-import {ElementRef, Input}            from '@angular/core';
+import {Input}            from '@angular/core';
 import {ActivatedRoute, Router}       from '@angular/router';
 import {Title, Meta}                  from '@angular/platform-browser';
 
@@ -12,6 +12,7 @@
 import {PiwikService}                 from '../../utils/piwik/piwik.service';
 import {EnvProperties}                from '../../utils/properties/env-properties';
 import { SEOService } from '../../sharedComponents/SEO/SEO.service';
+import {HelperFunctions} from "../../utils/HelperFunctions.class";
 
 @Component({
     selector: 'software',
@@ -56,8 +57,7 @@
     sub: any; piwiksub: any; infoSub: any;
     properties:EnvProperties;
 
-    constructor (private element: ElementRef,
-                 private _softwareService: SoftwareService,
+    constructor (private _softwareService: SoftwareService,
                  private _piwikService:PiwikService,
                  private  route: ActivatedRoute,
                  private _meta: Meta,
@@ -196,9 +196,7 @@
     }
 
     public scroll() {
-      if (typeof document !== 'undefined') {
-         this.element.nativeElement.scrollIntoView();
-      }
+      HelperFunctions.scroll();
     }
 
     private handleError(message: string, error) {
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/email/composer.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/email/composer.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/email/composer.ts	(revision 55570)
@@ -1,5 +1,6 @@
 import {Email} from "./email";
 import {Body} from "./body";
+import {ContactForm} from "./contact-form";
 
 export class Composer {
   private static noteBodySize = "14px";
@@ -48,6 +49,22 @@
       return email;
   }
 
+  public static composeEmailForNewCommunity(contactForm: ContactForm, admins: any): Email {
+    let email: Email = new Email();
+
+    email.subject = "RCD: Request for new community";
+    email.body = "<div style='font-size:" + this.noteBodySize + "'>"
+               + "<span><b>Name</b>: " + contactForm.name + "</span><br>"
+               + "<span><b>Surname</b>: " + contactForm.surname + "</span><br>"
+               + "<span><b>Email</b>: " + contactForm.email + "</span><br>"
+               + "<span><b>Affiliation</b>: " + contactForm.affiliation + "</span><br>"
+               + "<span><b>Community Name</b>: " + contactForm.community + "</span>"
+               + "<p>" + contactForm.message + "</p>"
+               + "</div>";
+    email.recipients = admins;
+    return email;
+  }
+
   public static composeEmailToInformOldManagersForTheNewOnes(communityName: string, communityId: string, firstVersionOfManagers: any, managers: any) : Email {
       let email: Email = new Email();
 
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/entities/searchResult.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/entities/searchResult.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/entities/searchResult.ts	(revision 55570)
@@ -1,3 +1,5 @@
+import {CommunityInfo} from "../../connect/community/communityInfo";
+
 export class SearchResult {
     title: { "name": string, "accessMode": string, "sc39": string};
     id:string;
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/properties/env-properties.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/properties/env-properties.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/properties/env-properties.ts	(revision 55570)
@@ -108,6 +108,7 @@
   searchLinkToOrp;
   searchLinkToOrganization;
   //Search pages
+  searchLinkToCommunities;
   searchLinkToPublications;
   searchLinkToDataProviders;
   searchLinkToProjects;
@@ -140,4 +141,10 @@
   claimsInformationLink;
 
   shareInZenodoPage;
+
+  // recaptcha site key
+  reCaptchaSiteKey;
+
+  // contact us recipients
+  admins;
 }
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/login/userMini.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/login/userMini.component.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/login/userMini.component.ts	(revision 55570)
@@ -33,6 +33,7 @@
                 <a *ngIf="item.route.length == 0 && item.url.length > 0" href="{{item.url}}" target="_blank"  >{{item.title}}</a>
               </li>
              </ng-container>
+             <li *ngIf="userMenuItems.length > 0" class="uk-nav-divider"></li>
               <li><a (click)="logOut()" id="logout" >Log out</a></li>
            </ul>
         </div>
@@ -61,6 +62,7 @@
      <a *ngIf="item.route.length == 0 && item.url.length > 0"  href="{{item.url}}" >{{item.title}}</a>
    </li>
   </ng-container>
+  <li *ngIf="userMenuItems.length > 0" class="uk-nav-divider"></li>
   <li><a (click)="logOut()" id="logout" >Log out</a></li>
  </ul>
 </li>
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/sharedComponents/navigationBar.component.html
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/sharedComponents/navigationBar.component.html	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/sharedComponents/navigationBar.component.html	(revision 55570)
@@ -11,12 +11,12 @@
            <img  src="{{logoPath}}logo-small-{{portal}}.png" alt="OpenAIRE" class="uk-responsive-height">
           </a>
           <a *ngIf="community && !homeurl" class="uk-navbar-item uk-logo"  [href]="'https://'+(environment =='beta'?'beta.':'')+community.id+'.openaire.eu'"  target="_blank">
-            <img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}"  class="uk-responsive-height">
-            <div  class="uk-margin-left uk-text-large"> {{community.name}} </div>
+            <img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}"  [alt]=community.name  class="uk-responsive-height">
+            <div *ngIf="!community.logoUrl || community.logoUrl.length == 0" class="uk-margin-left uk-text-large"> {{community.name}} </div>
            </a>
            <a *ngIf="community && homeurl" class="uk-navbar-item uk-logo"   routerLinkActive="uk-link" routerLink="/" >
-             <img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" alt=" " class="uk-responsive-height">
-             <div  class="uk-margin-left uk-text-large"> {{community.name}} </div>
+             <img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" [alt]=community.name class="uk-responsive-height">
+             <div *ngIf="!community.logoUrl || community.logoUrl.length == 0" class="uk-margin-left uk-text-large"> {{community.name}} </div>
             </a>
 
       </div>
@@ -103,7 +103,7 @@
 
 </div>
 <div class="tm-header uk-visible@m tm-header-transparent" uk-header="">
-   <div [class]="'uk-navbar-container uk-sticky uk-navbar-transparent '+portal+'-menu'" uk-sticky="" media="768" cls-active="uk-active uk-navbar-sticky" animation="uk-animation-slide-top" top=".tm-header + [class*=&quot;uk-section&quot;]" cls-inactive="uk-navbar-transparent" style="">
+   <div id="stickyNavbar" [class]="'uk-navbar-container uk-sticky uk-navbar-transparent '+portal+'-menu'" uk-sticky="" media="768" cls-active="uk-active uk-navbar-sticky" animation="uk-animation-slide-top" top=".tm-header + [class*=&quot;uk-section&quot;]" cls-inactive="uk-navbar-transparent" style="">
       <div class="uk-container uk-container-expand">
          <nav class="uk-navbar" uk-navbar="{&quot;align&quot;:&quot;left&quot;}">
             <div class="uk-navbar-left  uk-visible@l   uk-width-1-3">
@@ -113,13 +113,13 @@
 
                <a *ngIf="community  && homeurl" routerLinkActive="uk-link" routerLink="/"  class="uk-logo uk-navbar-item">
 
-                 <img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" alt=" " class="uk-responsive-height">
-                 <div class="uk-margin-left uk-text-large"> {{community.name}} </div>
+                 <img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}"  [alt]=community.name class="uk-responsive-height">
+                 <div *ngIf="!community.logoUrl || community.logoUrl.length == 0" class="uk-margin-left uk-text-large"> {{community.name}} </div>
                </a>
                <a *ngIf="community  && !homeurl" [href]="'https://'+(environment =='beta'?'beta.':'')+community.id+'.openaire.eu'" target="_blank"  class="uk-logo uk-navbar-item">
 
-                 <img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" alt=" " class="uk-responsive-height">
-                 <div class="uk-margin-left uk-text-large"> {{community.name}} </div>
+                 <img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}"  [alt]=community.name class="uk-responsive-height">
+                 <div *ngIf="!community.logoUrl || community.logoUrl.length == 0" class="uk-margin-left uk-text-large"> {{community.name}} </div>
                </a>
             </div>
             <div class="uk-navbar-left  uk-visible@m uk-hidden@l uk-width-1-3">
@@ -127,17 +127,17 @@
                  <img   src="{{logoPath}}logo-small-{{portal}}.png" alt="OpenAIRE" class="uk-responsive-height">
                </a>
                <a  *ngIf="community && homeurl" routerLinkActive="uk-link" routerLink="/"  class="uk-logo uk-navbar-item">
-                 <img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}"  alt=" " class="uk-responsive-height">
-                 <div class="uk-margin-left uk-text-large"> {{community.name}} </div>
+                 <img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}"   [alt]=community.name class="uk-responsive-height">
+                 <div *ngIf="!community.logoUrl || community.logoUrl.length == 0" class="uk-margin-left uk-text-large"> {{community.name}} </div>
                </a>
                <a  *ngIf="community && !homeurl"  [href]="'https://'+(environment =='beta'?'beta.':'')+community.id+'.openaire.eu'" target="_blank"  class="uk-logo uk-navbar-item">
-                 <img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}"  alt=" " class="uk-responsive-height">
-                 <div class="uk-margin-left uk-text-large"> {{community.name}} </div>
+                 <img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}"   [alt]=community.name class="uk-responsive-height">
+                 <div *ngIf="!community.logoUrl || community.logoUrl.length == 0" class="uk-margin-left uk-text-large"> {{community.name}} </div>
                </a>
 
             </div>
             <!-- <div   *ngIf="!onlyTop" class="uk-navbar-center"> -->
-            <div   *ngIf="!onlyTop" class="uk-navbar-right">
+            <div   *ngIf="!onlyTop" class="uk-navbar-right uk-position-top-right">
                <ul *ngIf= "isClient" class="uk-navbar-nav">
                  <ng-container *ngFor="let menu of menuItems">
                    <li class="uk-parent" *ngIf="isAtleastOneEnabled(menu.rootItem.entitiesRequired,showEntity) && isAtleastOneEnabled(menu.rootItem.routeRequired, showPage)">
@@ -149,7 +149,7 @@
 
                       <div *ngIf="menu.items.length > 0" class="uk-navbar-dropdown uk-navbar-dropdown-bottom-left" style="top: 80px; left: 0px;" id="{{menu.rootItem.id}}" (click)="onClick(menu.rootItem.id)">
                          <div class="uk-navbar-dropdown-grid uk-child-width-1-1 uk-grid uk-grid-stack" uk-grid="">
-                            <div class="uk-first-column">
+                            <div class="uk-first-column uk-height-max-medium uk-overflow-auto">
                                <ul class="uk-nav uk-navbar-dropdown-nav">
                                   <ng-container *ngFor="let submenu of menu.items">
                                       <li  *ngIf="isEnabled(submenu.entitiesRequired,showEntity) && isEnabled(submenu.routeRequired, showPage) && (submenu.route.length > 0 || submenu.url.length > 0)">
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/sharedComponents/sidebar/sideBar.component.html
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/sharedComponents/sidebar/sideBar.component.html	(nonexistent)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/sharedComponents/sidebar/sideBar.component.html	(revision 55570)
@@ -0,0 +1,36 @@
+<ul class="uk-nav uk-nav-default sidebar">
+  <li class="uk-nav-header uk-parent" *ngFor="let menu of menuItems">
+    <a *ngIf="menu.rootItem.route && menu.rootItem.route != ''"
+       [routerLink]="menu.rootItem.route"  routerLinkActive="active" [queryParams]=menu.rootItem.params>
+      <span><span class="uk-margin-small-right uk-icon" [attr.uk-icon]=menu.ukIcon></span> {{menu.rootItem.title}}</span>
+    </a>
+    <a *ngIf="(!menu.rootItem.route || menu.rootItem.route == '') && (menu.rootItem.url && menu.rootItem.url != '')"
+       [href]="menu.rootItem.url"  routerLinkActive="active" target="_blank">
+      <span><span class="uk-margin-small-right uk-icon" [attr.uk-icon]=menu.ukIcon></span> {{menu.rootItem.title}}</span>
+    </a>
+    <span *ngIf="!menu.rootItem.route || menu.rootItem.route == ''"><span class="uk-margin-small-right uk-icon" [attr.uk-icon]=menu.ukIcon></span> {{menu.rootItem.title}}</span>
+    <ul *ngIf="menu.items.length > 0" class="uk-nav-sub">
+      <li *ngFor="let item of menu.items">
+        <a *ngIf="item.rootItem.route && item.rootItem.route != ''" [routerLink]="item.rootItem.route"  routerLinkActive="active" [queryParams]=item.rootItem.params>
+          <span>{{item.rootItem.title}}</span>
+        </a>
+        <a *ngIf="(!item.rootItem.route || item.rootItem.route == '') && (item.rootItem.url && item.rootItem.url != '')"
+           [href]="item.rootItem.url"  routerLinkActive="active" target="_blank">
+          <span>{{item.rootItem.title}}</span>
+        </a>
+        <ul *ngIf="item.items.length > 0" class="uk-nav-sub">
+          <li *ngFor="let subItem of item.items">
+            <a *ngIf="subItem.route && subItem.route != ''" [routerLink]="subItem.route" routerLinkActive="active" [queryParams]=subItem.params>
+              <span>{{subItem.title}}</span>
+            </a>
+            <a *ngIf="(!subItem.route || subItem.route == '') && (subItem.url && subItem.url != '')"
+               [href]="subItem.url"  routerLinkActive="active" target="_blank">
+              <span>{{subItem.title}}</span>
+            </a>
+            <span *ngIf="!subItem.route || subItem.route == ''">{{subItem.title}}</span>
+          </li>
+        </ul>
+      </li>
+    </ul>
+  </li>
+</ul>
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/manage/manage.component.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/manage/manage.component.ts	(nonexistent)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/manage/manage.component.ts	(revision 55570)
@@ -0,0 +1,20 @@
+import { Component, Input} from '@angular/core';
+@Component({
+    selector: 'manage',
+    template: `
+
+        <a [href]="'https://beta.admin.connect.openaire.eu/dashboard?communityId='+communityId"
+        [class]=" ((buttonSizeSmall)?'uk-button-small':'')+' uk-button  uk-button-primary'"
+         target="_blank">
+            Manage
+        </a>
+
+
+    `
+})
+
+export class ManageComponent {
+   @Input() communityId:string;
+   @Input() buttonSizeSmall = true;
+   constructor() {}
+}
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/HelperFunctions.class.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/HelperFunctions.class.ts	(nonexistent)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/utils/HelperFunctions.class.ts	(revision 55570)
@@ -0,0 +1,11 @@
+export class HelperFunctions {
+  //Use this class function to create queryParams Objects in format {key1:value1} or {key1:value1,key2:value2,key3:value3,...} for  multiple parameters
+  constructor() {}
+
+  public static scroll() {
+    if (typeof document !== 'undefined') {
+      //this.element.nativeElement.scrollIntoView();
+      window.scrollTo(0, 0);
+    }
+  }
+}
\ No newline at end of file
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/login/user.component.html
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/login/user.component.html	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/login/user.component.html	(revision 55570)
@@ -1,5 +1,5 @@
 
-<div id="tm-main" class=" uk-section  uk-margin-small-top tm-middle"   >
+<div [id]="(mainComponent)?'tm-main':''" [class]="(mainComponent)?'uk-section  uk-margin-small-top tm-middle':''"   >
   <div uk-grid uk-grid>
    <div class="tm-main uk-width-1-1@s uk-width-1-1@m  uk-width-1-1@l uk-row-first ">
 
@@ -48,9 +48,7 @@
 <div *ngIf="errorCode == '5'" class="uk-alert uk-alert-warning">
   There is no research community selected.
 </div>
-<div *ngIf="errorCode == '6'" class="uk-alert uk-alert-warning">
-  For this action you have to subscribe to research community first. Subscribe  <a  routerLink="/">here</a>.
-</div>
+
 <div *ngIf="!loggedIn && errorMessage.length > 0" class="uk-alert uk-alert-danger">{{errorMessage}}</div>
 
 
Index: modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/sharedComponents/menu.ts
===================================================================
--- modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/sharedComponents/menu.ts	(revision 55569)
+++ modules/uoa-services-library/branches/newlinking/ng-openaire-library/src/app/sharedComponents/menu.ts	(revision 55570)
@@ -1,25 +1,33 @@
 export class MenuItem {
-    id:string = ""; // for root menu in order to close the dropdown when clicked
-    title: string = "";
-    url:string = ""; // external url
-    route:string = ""; // internal  url - using angular routing and components
-    needsAuthorization:boolean = false; // needs admin rights - mainly for user menu at this point
-    entitiesRequired:string[] = []; // openaire entities used in page "publication, dataset, organization, software, project, datasource"
-    routeRequired:string[] = []; // the routes that if aren't enable the menu item doesn't make sense
-    params:any = {};
-    constructor(id:string, title:string, url:string, route:string, needsAuthorization:boolean, entitiesRequired:string[],routeRequired:string[], params){
-      this.id = id;
-      this.title = title;
-      this.url = url;
-      this.route = route;
-      this.needsAuthorization = needsAuthorization;
-      this.entitiesRequired = entitiesRequired;
-      this.routeRequired =  routeRequired;
-      this.params = params;
-    }
+  id: string = ""; // for root menu in order to close the dropdown when clicked
+  title: string = "";
+  url: string = ""; // external url
+  route: string = ""; // internal  url - using angular routing and components
+  needsAuthorization: boolean = false; // needs admin rights - mainly for user menu at this point
+  entitiesRequired: string[] = []; // openaire entities used in page "publication, dataset, organization, software, project, datasource"
+  routeRequired: string[] = []; // the routes that if aren't enable the menu item doesn't make sense
+  params: any = {};
 
+  constructor(id: string, title: string, url: string, route: string, needsAuthorization: boolean, entitiesRequired: string[], routeRequired: string[], params) {
+    this.id = id;
+    this.title = title;
+    this.url = url;
+    this.route = route;
+    this.needsAuthorization = needsAuthorization;
+    this.entitiesRequired = entitiesRequired;
+    this.routeRequired = routeRequired;
+    this.params = params;
   }
-  export class RootMenuItem {
-       rootItem:MenuItem;
-       items:MenuItem[]=[];
-  }
+
+}
+
+export class RootMenuItem {
+  rootItem: MenuItem;
+  items: MenuItem[] = [];
+}
+
+export class SideMenuItem {
+  rootItem: MenuItem;
+  items: RootMenuItem[] = [];
+  ukIcon: string = '';
+}
