diff --git a/searchPages/searchUtils/advancedSearchForm.component.html b/searchPages/searchUtils/advancedSearchForm.component.html index 1002c8ca..dc12e1e1 100644 --- a/searchPages/searchUtils/advancedSearchForm.component.html +++ b/searchPages/searchUtils/advancedSearchForm.component.html @@ -131,36 +131,28 @@ -
-
-
-
+ +
+
-
-
+
+
+ [placeholder]="formPlaceholderText" role="searchbox" + [(ngModel)]="selectedFields[0].value" name="keyword"/>
-
-
+
diff --git a/searchPages/searchUtils/newSearchPage.component.html b/searchPages/searchUtils/newSearchPage.component.html index b8b7a27c..59dc94f3 100644 --- a/searchPages/searchUtils/newSearchPage.component.html +++ b/searchPages/searchUtils/newSearchPage.component.html @@ -3,20 +3,20 @@ - + - {{customFilter.valueName}} + {{customFilter.valueName}} - - + + - {{type.name}} - + {{type.name}} + @@ -26,12 +26,12 @@ - + + [class.uk-disabled]="disabled"> - {{filter.selectedFromAndToValues}} - + {{filter.selectedFromAndToValues}} + @@ -41,11 +41,11 @@ - - + + - {{value.name}} - + {{value.name}} + @@ -55,69 +55,54 @@ -
-
-
- -
- Filters -
- +
+ -
- + -
- -
- No filters available - Filters temporarily unavailable. Please try again later. -
-
    - - -
  • +
    + No filters available + Filters temporarily unavailable. Please try again later. +
    +
      +
    • - -
    • - - -
    • - -
    • - + + +
    • +
    • +
    • -
      - -
    • - -
    • -
      -
    + +
  • + +
  • +
    +
+
+
- +
+
+ +
+
-
+
-
- -
@@ -164,23 +147,16 @@
- -
- -
-
-
- - +
+ @@ -197,18 +173,13 @@ Filters ({{(selectedRangeFilters + selectedFilters)}}) - - - - - - - - -
+
+
- - - - - - -
+ [isDisabled]="disabled"> + [isDisabled]="disabled">
+
+ +
+ [isDisabled]="disabled">
@@ -352,7 +319,7 @@ + [isDisabled]="disabled">
+
  • -
    -
    +
    +
    + class="uk-alert-primary uk-padding-small uk-position-top-left uk-text-center"> Subscribed
    - -
    -
    - - restricted -
    -
    - - private -
    -
    - - {{result.visibility.toLowerCase()}} +
    + + restricted +
    +
    + + private +
    +
    + + {{result.visibility.toLowerCase()}} +
    -
    - + -
    - + -
    - Creation Date: - {{result.date | date:'dd-MM-yyyy'}} - {{result.creationDate | date:'dd-MM-yyyy'}} - - Type: - {{(result.type == 'ri') ? 'Research Initiative' : 'Research Community'}} - - - Type: - {{(result.type == 'ri') ? 'research initiative' : result.type}} - +
    +

    + {{result.description}} +

    -
    -
    - - {{_formatDescription(result.description)}} -
    +
    + Creation Date: + {{result.date | date:'dd-MM-yyyy'}} + {{result.creationDate | date:'dd-MM-yyyy'}} + + Type: + {{mapType(result.type)}} + + + Type: + {{mapType(result.type)}} +
    - - +
    +
    +
  • @@ -105,20 +92,6 @@
    - {{(result.title)?result.title:result.shortTitle}} logo - - - +
    diff --git a/searchPages/searchUtils/portal-search-result.component.ts b/searchPages/searchUtils/portal-search-result.component.ts index 0d81280d..96d9ef0c 100644 --- a/searchPages/searchUtils/portal-search-result.component.ts +++ b/searchPages/searchUtils/portal-search-result.component.ts @@ -6,7 +6,6 @@ import {CommunityInfo} from "../../connect/community/communityInfo"; import {Router} from "@angular/router"; import {LocalStorageService} from "../../services/localStorage.service"; import {Stakeholder, StakeholderInfo, Visibility} from "../../monitor/entities/stakeholder"; -import {StringUtils} from "../../utils/string-utils.class"; @Component({ selector: 'portal-search-result', @@ -21,13 +20,11 @@ export class PortalSearchResultComponent implements OnInit{ @Input() showLoading: boolean = false; @Input() custom_class: string = "search-results"; @Input() properties: EnvProperties; - @Input() maxCharacters: number = 150; @ViewChild('AlertModal') modal; visibilityIcon: Map = new Map ([ ["PRIVATE", 'lock'], ["RESTRICTED", 'group'] ]); - public urlParam: string; public errorCodes: ErrorCodes = new ErrorCodes(); public routerHelper: RouterHelper = new RouterHelper(); @@ -50,6 +47,18 @@ export class PortalSearchResultComponent implements OnInit{ }); } + mapType(type: string) { + if(type === 'ri') { + return 'Research Initiative'; + } else if(type === 'community') { + return 'Research Community' + } else if(type === 'organization') { + return 'Institution'; + } else { + return type; + } + } + hasPermission(result: CommunityInfo & StakeholderInfo) { if(this.type === "community") { return result.status === "all" || (result.status === "manager" && result.isManager); @@ -67,11 +76,6 @@ export class PortalSearchResultComponent implements OnInit{ return this.properties.environment != "development"; } - public _formatDescription(description) { - let descr: string = StringUtils.HTMLToString(description); - return (((descr).length > this.maxCharacters) ? (descr.substring(0, (this.maxCharacters - ('...').length)) + "...") : descr); - } - public confirmModalOpen(result: CommunityInfo & Stakeholder) { this.selected = result; this.modal.cancelButton = true; @@ -90,15 +94,13 @@ export class PortalSearchResultComponent implements OnInit{ } public getCommunityPageUrl(communityInfo: CommunityInfo): string { - let url = ''; if (this.isProduction()) { - url = 'https://' + this.getEnvironmentPrefix() + communityInfo.communityId + '.openaire.eu'; + return 'https://' + this.getEnvironmentPrefix() + communityInfo.communityId + '.openaire.eu'; } else { - url = this.router.createUrlTree(['/'], { + return this.router.createUrlTree(['/'], { queryParams: {'communityId': communityInfo.communityId} }).toString(); } - return url; } public getStakeholderPageUrl(stakeholder: Stakeholder) { diff --git a/searchPages/searchUtils/quick-selections.component.ts b/searchPages/searchUtils/quick-selections.component.ts index 9c9919d3..560d5257 100644 --- a/searchPages/searchUtils/quick-selections.component.ts +++ b/searchPages/searchUtils/quick-selections.component.ts @@ -29,12 +29,9 @@ import {ActivatedRoute, Router} from "@angular/router";
-
- +
+
` diff --git a/searchPages/searchUtils/searchFilter.component.html b/searchPages/searchUtils/searchFilter.component.html index 1cd21237..73b3f769 100644 --- a/searchPages/searchUtils/searchFilter.component.html +++ b/searchPages/searchUtils/searchFilter.component.html @@ -1,99 +1,93 @@ -
-
-
{{_formatTitle(filter.title,filter.values.length)}}
- - Clear - +
+
+
{{_formatTitle(filter.title, filter.values.length)}}
+ Clear
-