From 2b7c5da3d7049f327f97ac9b274d5d71f6206284 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Tue, 18 Jul 2023 15:27:02 +0300 Subject: [PATCH 1/2] Input: Add * for required fields with type array. Scroll to top in open of a modal. --- sharedComponents/input/input.component.ts | 2 +- utils/modal/alert.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sharedComponents/input/input.component.ts b/sharedComponents/input/input.component.ts index 55acecd8..18036a87 100644 --- a/sharedComponents/input/input.component.ts +++ b/sharedComponents/input/input.component.ts @@ -566,7 +566,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang } })); } - if (this.formAsControl?.validator) { + if (this.formAsControl?.validator || this.formAsArray?.validator) { let validator = this.formControl.validator({} as AbstractControl); this.required = (validator && validator.required); } diff --git a/utils/modal/alert.ts b/utils/modal/alert.ts index 4173ae39..27e6c0a4 100644 --- a/utils/modal/alert.ts +++ b/utils/modal/alert.ts @@ -205,6 +205,9 @@ export class AlertModal implements OnInit, AfterViewInit, OnDestroy { open() { if(typeof UIkit !== "undefined") { UIkit.modal(this.element.nativeElement).show(); + if(this.overflowBody) { + this.bodyElement.nativeElement.scrollTo(0, 0); + } } } From 39876e4ce6e436d8dea3f88ca4d26673e25c1d7c Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Wed, 19 Jul 2023 12:20:49 +0300 Subject: [PATCH 2/2] landing & search: match top row info between the 2 as much as possible --- .../landing-utils/entity-metadata.component.ts | 8 ++++---- .../landing-header/landing-header.component.ts | 3 +++ landingPages/landing-utils/showPublisher.component.ts | 10 ++++++---- landingPages/result/resultLanding.component.html | 3 ++- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/landingPages/landing-utils/entity-metadata.component.ts b/landingPages/landing-utils/entity-metadata.component.ts index f306d388..c15f50e0 100644 --- a/landingPages/landing-utils/entity-metadata.component.ts +++ b/landingPages/landing-utils/entity-metadata.component.ts @@ -151,7 +151,7 @@ import {RouterHelper} from "../../utils/routerHelper.class"; Thematic - + {{projectNames.slice(0,3).join(', ')}} @@ -238,9 +238,9 @@ export class EntityMetadataComponent { value = value + ' | ' + (project.acronym ? project.acronym : (project.title.length > 25 ? (project.title.slice(0, 25) + '...'): project.title)); } - if(project.code) { - value = value + ' (' + project.code + ')'; - } + // if(project.code) { + // value = value + ' (' + project.code + ')'; + // } return value; }); } diff --git a/landingPages/landing-utils/landing-header/landing-header.component.ts b/landingPages/landing-utils/landing-header/landing-header.component.ts index 11ab1c0c..adfe3268 100644 --- a/landingPages/landing-utils/landing-header/landing-header.component.ts +++ b/landingPages/landing-utils/landing-header/landing-header.component.ts @@ -21,6 +21,7 @@ import {AlertModal} from "../../../utils/modal/alert"; [languages]="languages" [programmingLanguages]="programmingLanguages" [compatibility]="compatibility" [aggregationStatus]="aggregationStatus" [thematic]="thematic" [type]="type" [prevPath]="prevPath" + [countries]="countries" [projects]="projects" >
@@ -61,4 +62,6 @@ export class LandingHeaderComponent { @Input() thematic: boolean; // data provider landing @Input() type; // data provider landing @Input() prevPath: string = ""; + @Input() countries; + @Input() projects; } diff --git a/landingPages/landing-utils/showPublisher.component.ts b/landingPages/landing-utils/showPublisher.component.ts index 004c146a..37c0838b 100644 --- a/landingPages/landing-utils/showPublisher.component.ts +++ b/landingPages/landing-utils/showPublisher.component.ts @@ -4,6 +4,12 @@ import {EnvProperties} from "../../utils/properties/env-properties"; @Component({ selector: 'showPublisher, [showPublisher]', template: ` + + {{publisher}} + + ) - - - - {{publisher}} ` }) diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index 6a93da39..0abe1f56 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -222,7 +222,8 @@ [date]="resultLandingInfo.dateofacceptance" [embargoEndDate]="resultLandingInfo.embargoEndDate" [publisher]="resultLandingInfo.publisher" [journal]="resultLandingInfo.journal" [languages]="resultLandingInfo.languages" [programmingLanguages]="resultLandingInfo.programmingLanguages" - [prevPath]="prevPath"> + [prevPath]="prevPath" [countries]="resultLandingInfo.countries" + [projects]="resultLandingInfo.fundedByProjects">