From 4d8897d7433b55be2bedae42ab7f5283982636c9 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Mon, 4 Jul 2022 22:11:59 +0300 Subject: [PATCH] Fix curator full screen modal --- src/app/curators/curators.component.html | 8 ++------ src/app/curators/curators.component.ts | 22 ++++++++++------------ src/app/openaireLibrary | 2 +- src/assets/openaire-theme | 2 +- 4 files changed, 14 insertions(+), 20 deletions(-) diff --git a/src/app/curators/curators.component.html b/src/app/curators/curators.component.html index e9b4588..55f1cd8 100644 --- a/src/app/curators/curators.component.html +++ b/src/app/curators/curators.component.html @@ -37,7 +37,7 @@ Biography
-
{{_format(curator.bio)}}
+
{{format(curator.bio)}}
{{curator.bio}}
- - +
-

- {{communityId}} Curator -

diff --git a/src/app/curators/curators.component.ts b/src/app/curators/curators.component.ts index afd30c9..5bea392 100644 --- a/src/app/curators/curators.component.ts +++ b/src/app/curators/curators.component.ts @@ -14,6 +14,7 @@ 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'; +import {CommunityInfo} from "../openaireLibrary/connect/community/communityInfo"; @Component({ selector: 'curators', @@ -22,7 +23,7 @@ import {FullScreenModalComponent} from '../openaireLibrary/utils/modal/full-scre }) export class CuratorsComponent { @Input() longView = true; - communityId = null; + community: CommunityInfo; public downloadUrl = null; public showLoading = true; @@ -69,16 +70,16 @@ export class CuratorsComponent { if (!this.longView) { this.subs.push(this.communityService.getCommunityAsObservable().subscribe(community => { if (community) { - this.communityId = community.communityId; + this.community = community; this.getCurators(); } })); } else { this.subs.push(this.communityService.getCommunityAsObservable().subscribe(community => { if (community) { - this.communityId = community.communityId; + this.community = community; if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { - this.subs.push(this._piwikService.trackView(this.properties, this.pageTitle, PiwikHelper.getSiteId(this.communityId)).subscribe()); + this.subs.push(this._piwikService.trackView(this.properties, this.pageTitle, PiwikHelper.getSiteId(this.community.communityId)).subscribe()); } this.url = this.properties.domain + this._router.url; this.seoService.createLinkForCanonicalURL(this.url); @@ -100,7 +101,7 @@ export class CuratorsComponent { } private getCurators() { - this.subs.push(this.curatorsService.getCurators(this.properties, this.communityId).subscribe(curators => { + this.subs.push(this.curatorsService.getCurators(this.properties, this.community.communityId).subscribe(curators => { this.curators = curators; for (let i = 0; i < this.curators.length; i++) { this.showMore[i] = false; @@ -110,13 +111,13 @@ export class CuratorsComponent { } private getPageContents() { - this.subs.push(this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => { + this.subs.push(this.helper.getPageHelpContents(this.properties, this.community.communityId, this._router.url).subscribe(contents => { this.pageContents = contents; })); } private getDivContents() { - this.subs.push(this.helper.getDivHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => { + this.subs.push(this.helper.getDivHelpContents(this.properties, this.community.communityId, this._router.url).subscribe(contents => { this.divContents = contents; })); } @@ -125,7 +126,7 @@ export class CuratorsComponent { this.showMore[index] = !this.showMore[index]; } - _format(name: string) { + format(name: string) { if (name) { return (((name).length > this.maxCharacters) ? (name.substring(0, (this.maxCharacters - ('...').length)) + '...') : name); } else { @@ -139,12 +140,9 @@ export class CuratorsComponent { public openFsModal(curator) { this.curatorInModal = curator; + this.fsModal.title = this.community.shortTitle + ' 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/openaireLibrary b/src/app/openaireLibrary index ffd997d..de829d2 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit ffd997dfcb94725c1a17097fe2c6224f0c272cca +Subproject commit de829d2bccc33b4231c1c1349dd449a2dfb1f8c4 diff --git a/src/assets/openaire-theme b/src/assets/openaire-theme index 25f7f7d..8f8b85e 160000 --- a/src/assets/openaire-theme +++ b/src/assets/openaire-theme @@ -1 +1 @@ -Subproject commit 25f7f7dd34fae80d1e2e25935c2f2772c5800e70 +Subproject commit 8f8b85e69d5c505ed59b12b8b70348096f339775