From 9572597c5ec32ac15c888b4880d52e4c4460a9f6 Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Wed, 22 Jun 2022 14:08:38 +0300 Subject: [PATCH] start on curators' modal info - awaiting finalization of the designs --- src/app/curators/curators.component.html | 65 ++++++++++++++++++++---- src/app/curators/curators.component.ts | 24 +++++++-- src/app/curators/curators.module.ts | 5 +- 3 files changed, 81 insertions(+), 13 deletions(-) diff --git a/src/app/curators/curators.component.html b/src/app/curators/curators.component.html index c808ec4..67cb9b9 100644 --- a/src/app/curators/curators.component.html +++ b/src/app/curators/curators.component.html @@ -7,10 +7,8 @@
-
- +
+

@@ -36,9 +34,23 @@

{{curator.name}}

- Biography + Biography
-
{{curator.bio}}}
+
+
{{_format(curator.bio)}}
+
{{curator.bio}}
+ +
+
@@ -104,9 +116,9 @@ Curator Photo + src="{{downloadUrl + curator.photo}}" alt="Curator Photo"> Curator Photo + src="../../assets/common-assets/curator-default.png" alt="Curator Photo">
{{curator.name}} @@ -147,3 +159,38 @@
+ +
+
+ Curator Photo + Curator Photo +

{{curatorInModal.name}}

+
+
+
+ Biography +
+
+ {{curatorInModal.bio}} +
+
+
+
+ Affiliations +
+
+ + + + + + + + +
+
+
+
diff --git a/src/app/curators/curators.component.ts b/src/app/curators/curators.component.ts index b6e10eb..afd30c9 100644 --- a/src/app/curators/curators.component.ts +++ b/src/app/curators/curators.component.ts @@ -1,4 +1,4 @@ -import {Component, Input} from '@angular/core'; +import {Component, Input, ViewChild} from '@angular/core'; import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties'; import {CuratorService} from "../openaireLibrary/connect/curators/curator.service"; import {Curator} from "../openaireLibrary/utils/entities/CuratorInfo"; @@ -13,6 +13,7 @@ import {Breadcrumb} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.compo import {Subscription} from "rxjs"; import {properties} from "../../environments/environment"; import {UserRegistryService} from "../openaireLibrary/services/user-registry.service"; +import {FullScreenModalComponent} from '../openaireLibrary/utils/modal/full-screen-modal/full-screen-modal.component'; @Component({ selector: 'curators', @@ -31,8 +32,10 @@ export class CuratorsComponent { public numberOfCurators: number = 5; public showMore = []; - public maxCharacters = 500; - + public maxCharacters = 450; + public viewingMore: boolean = false; + public curatorInModal; + public properties: EnvProperties; public pageContents = null; public divContents = null; @@ -43,6 +46,8 @@ export class CuratorsComponent { public breadcrumbs: Breadcrumb[] = [{name: 'Home', route: '/'}, {name: 'About - Curators'}]; subs: Subscription[] = []; + + @ViewChild('fsModal', { static: true }) fsModal: FullScreenModalComponent; constructor(private route: ActivatedRoute, private curatorsService: CuratorService, @@ -127,6 +132,19 @@ export class CuratorsComponent { return null; } } + + public viewMore() { + this.viewingMore = !this.viewingMore; + } + + public openFsModal(curator) { + this.curatorInModal = curator; + this.fsModal.open(); + } + + public closeFsModal() { + this.fsModal.close(); + } private updateDescription(description: string) { this._meta.updateTag({content: description}, "name='description'"); diff --git a/src/app/curators/curators.module.ts b/src/app/curators/curators.module.ts index 261a5a7..e86f062 100644 --- a/src/app/curators/curators.module.ts +++ b/src/app/curators/curators.module.ts @@ -13,13 +13,16 @@ import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOServi import {PiwikServiceModule} from "../openaireLibrary/utils/piwik/piwikService.module"; import {BreadcrumbsModule} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.module"; import {UrlPrefixModule} from "../openaireLibrary/utils/pipes/url-prefix.module"; +import {LoadingModule} from '../openaireLibrary/utils/loading/loading.module'; +import {FullScreenModalModule} from '../openaireLibrary/utils/modal/full-screen-modal/full-screen-modal.module'; @NgModule({ imports: [ CommonModule, FormsModule, RouterModule, CuratorsRoutingModule, AffiliationsModule, HelperModule, Schema2jsonldModule, SEOServiceModule, PiwikServiceModule, - BreadcrumbsModule, UrlPrefixModule + BreadcrumbsModule, UrlPrefixModule, LoadingModule, + FullScreenModalModule ], declarations: [ CuratorsComponent