Index: modules/uoa-connect-portal/trunk/src/app/searchPages/communities/searchCommunities.component.ts
===================================================================
--- modules/uoa-connect-portal/trunk/src/app/searchPages/communities/searchCommunities.component.ts	(revision 58566)
+++ modules/uoa-connect-portal/trunk/src/app/searchPages/communities/searchCommunities.component.ts	(revision 58567)
@@ -5,7 +5,7 @@
 import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
 import {SearchPageComponent} from "../../openaireLibrary/searchPages/searchUtils/searchPage.component";
 import {ActivatedRoute} from "@angular/router";
-import {Filter, Value} from "../../openaireLibrary/searchPages/searchUtils/searchHelperClasses.class";
+import {AdvancedField, Filter, Value} from "../../openaireLibrary/searchPages/searchUtils/searchHelperClasses.class";
 import {SearchFields} from "../../openaireLibrary/utils/properties/searchFields";
 import {CommunitiesService} from "../../openaireLibrary/connect/communities/communities.service";
 import {Session, User} from "../../openaireLibrary/login/utils/helper.class";
@@ -15,22 +15,28 @@
 import {HelperFunctions} from "../../openaireLibrary/utils/HelperFunctions.class";
 import {UserManagementService} from "../../openaireLibrary/services/user-management.service";
 import {Breadcrumb} from "../../openaireLibrary/utils/breadcrumbs/breadcrumbs.component";
+import {NewSearchPageComponent} from "../../openaireLibrary/searchPages/searchUtils/newSearchPage.component";
 
 @Component({
   selector: 'search-communities',
   template: `
-      <search-page pageTitle="OpenAIRE-Connect | Search Communities"
+      <new-search-page pageTitle="OpenAIRE-Connect | Search Communities"
                    [hasPrefix]=false [piwikSiteId]="piwikSiteId" 
                    searchFormClass="communitiesSearchForm"
                    [formPlaceholderText]="'Search for Research Gateways…'"
                    type="communities" entityType="community" [filters]="filters"
                    [results]="results" [searchUtils]="searchUtils"
-                   [showResultCount]=true [baseUrl]="baseUrl"
+                   [showResultCount]=true 
                    [disableForms]="disableForms"
-                   [lastIndex]=false [sort]=true
-                   [breadcrumbs]="breadcrumbs"
-                   [showType]="showType">
-      </search-page>
+                   [lastIndex]=false [sort]=true 
+                       [simpleView]="true"
+                       [fieldIds]="fieldIds" [fieldIdsMap]="fieldIdsMap" [selectedFields]="selectedFields"
+                       [simpleSearchLink]="searchLink" [entitiesSelection]="false" [showBreadcrumb]="true"
+      >
+      </new-search-page>
+      <!-- [baseUrl]="baseUrl"-->
+      <!--             [breadcrumbs]="breadcrumbs"
+                   [showType]="showType"-->
   `
 })
 export class SearchCommunitiesComponent {
@@ -45,11 +51,15 @@
   public searchUtils:SearchUtilsClass = new SearchUtilsClass();
   public disableForms: boolean = false;
   public baseUrl: string = null;
+  public fieldIds: string[] = ["q"];
   public refineFields: string[] =  this.searchFields.COMMUNITIES_SEARCH_FIELDS;
+  public fieldIdsMap = {["q"]:{name:"All fields", type:"keyword", param:"q", operator: "op", equalityOperator: "=", filterType: null}};
+  public selectedFields: AdvancedField[] = [new AdvancedField(this.fieldIds[0], "", this.fieldIdsMap[this.fieldIds[0]].name, this.fieldIdsMap[this.fieldIds[0]].type,"", "and")];
+  public searchLink;
   public showType = false;
   public breadcrumbs: Breadcrumb[] = [{name: 'home', route: '/'}, {name: 'communities'}];
   properties:EnvProperties;
-  @ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
+  @ViewChild (NewSearchPageComponent) searchPage : NewSearchPageComponent ;
   private user: User;
 
   constructor (private route: ActivatedRoute,
@@ -70,10 +80,11 @@
         });
     this.sub =  this.route.queryParams.subscribe(params => {
       this.searchPage.resultsPerPage = 10;
-      this.searchUtils.keyword = (params['keyword']?params['keyword']:'');
+      this.searchUtils.keyword = (params['fv0']?params['fv0']:'');
       this.searchUtils.page = (params['page'] === undefined) ? 1: + params['page'];
       this.searchUtils.sortBy = (params['sortBy'] === undefined)? '' : params['sortBy'];
       this.searchUtils.size = (params['size'] === undefined) ? this.searchPage.resultsPerPage: +params['size'];
+      this.searchUtils.baseUrl = this.baseUrl;
       this.searchPage.searchUtils = this.searchUtils;
       if(this.searchUtils.size != 5 && this.searchUtils.size != 10 && this.searchUtils.size != 20 && this.searchUtils.size != 50) {
         this.searchUtils.size = this.searchPage.resultsPerPage;
@@ -82,7 +93,11 @@
         this.searchUtils.sortBy = "";
       }
       this.searchPage.refineFields = this.refineFields;
-      let queryParams = this.searchPage.getQueryParamsFromUrl(params);
+      this.searchLink = this.properties.searchLinkToCommunities;
+      this.selectedFields[0] = new AdvancedField(this.fieldIds[0], "", this.fieldIdsMap[this.fieldIds[0]].name, this.fieldIdsMap[this.fieldIds[0]].type,this.searchUtils.keyword, "and");
+      this.searchPage.prepareSearchPage(this.fieldIds, this.selectedFields, this.refineFields,[], this.fieldIdsMap,null,params, "community", null);
+
+      let queryParams = params;//this.searchPage.getQueryParamsFromUrl(params);
       if(typeof document !== 'undefined') {
         this.userManagementService.getUserInfo().subscribe(user => {
           this.user = user;
@@ -108,7 +123,7 @@
    *
    * @param params
    */
-  private initCommunities(params: Map<string, string>) {
+  private initCommunities(params) {
     this.subResults = this._communitiesService.getCommunitiesState().subscribe(
         data => {
           if(!data){
@@ -203,8 +218,11 @@
     this.checkFilters(params);
     this.sort();
     this.searchUtils.totalResults = this.results.length;
-    this.searchPage.checkSelectedFilters(this.filters);
-    this.searchPage.updateBaseUrlWithParameters(this.filters);
+    // this.searchPage.checkSelectedFilters(this.filters);
+    // this.searchPage.updateBaseUrlWithParameters(this.filters);
+    // this.searchPage.buildPageURLParameters(this.filters, [], false);
+    this.filters = this.searchPage.prepareFiltersToShow(this.filters,this.searchUtils.totalResults);
+
     this.results = this.results.slice((this.searchUtils.page-1)*this.searchUtils.size, (this.searchUtils.page*this.searchUtils.size));
     this.searchUtils.status = this.errorCodes.DONE;
     if(this.searchUtils.totalResults == 0 ){
@@ -286,11 +304,11 @@
    * @param filterId
    * @param params
    */
-  private applyFilter(filterId: string, params: Map<string, string>): CommunityInfo[] {
+  private applyFilter(filterId: string, params): CommunityInfo[] {
     let results:CommunityInfo[] = [];
     let values: string[] = [];
-    if(params.get(filterId) != undefined) {
-      values = (StringUtils.URIDecode(params.get(filterId))).split(/,(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,-1);
+    if(params[filterId] != undefined) {
+      values = (StringUtils.URIDecode(params[filterId])).split(/,(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,-1);
     }
     if(filterId == 'type') {
       for (let i = 0; i < this.results.length; i++) {
Index: modules/uoa-connect-portal/trunk/src/app/searchPages/communities/searchCommunities.module.ts
===================================================================
--- modules/uoa-connect-portal/trunk/src/app/searchPages/communities/searchCommunities.module.ts	(revision 58566)
+++ modules/uoa-connect-portal/trunk/src/app/searchPages/communities/searchCommunities.module.ts	(revision 58567)
@@ -6,12 +6,13 @@
 import {SearchFormModule} from "../../openaireLibrary/searchPages/searchUtils/searchForm.module";
 import {SearchCommunitiesRoutingModule} from "./searchCommunities-routing.module";
 import {PreviousRouteRecorder} from "../../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
+import {NewSearchPageModule} from "../../openaireLibrary/searchPages/searchUtils/newSearchPage.module";
 
 @NgModule({
   imports: [
     CommonModule, FormsModule,
     SearchFormModule, SearchPageModule,
-    SearchCommunitiesRoutingModule
+    SearchCommunitiesRoutingModule, NewSearchPageModule
   ],
   declarations: [
     SearchCommunitiesComponent
