Fix curator full screen modal

This commit is contained in:
Konstantinos Triantafyllou 2022-07-04 22:11:59 +03:00
parent 0ce5eace2c
commit 4d8897d743
4 changed files with 14 additions and 20 deletions

View File

@ -37,7 +37,7 @@
Biography
</div>
<div>
<div *ngIf="!viewingMore">{{_format(curator.bio)}}</div>
<div *ngIf="!viewingMore">{{format(curator.bio)}}</div>
<div *ngIf="viewingMore">{{curator.bio}}</div>
<div *ngIf="curator.bio.length >= maxCharacters" class="uk-text-right uk-margin-small-top">
<a *ngIf="curator.bio.length >= maxCharacters"
@ -100,13 +100,9 @@
</div>
</div>
</ng-template>
<fs-modal #fsModal>
<fs-modal #fsModal classTitle="">
<div *ngIf="curatorInModal" class="uk-width-1-1 uk-height-1-1">
<div class="uk-container uk-container-large uk-section">
<h2 class="uk-text-capitalize uk-text-center">
{{communityId}} Curator
</h2>
<div class="uk-margin-large-top uk-grid uk-grid-large" uk-grid>
<div class="uk-width-1-3@m">
<h2>

View File

@ -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'");

@ -1 +1 @@
Subproject commit ffd997dfcb94725c1a17097fe2c6224f0c272cca
Subproject commit de829d2bccc33b4231c1c1349dd449a2dfb1f8c4

@ -1 +1 @@
Subproject commit 25f7f7dd34fae80d1e2e25935c2f2772c5800e70
Subproject commit 8f8b85e69d5c505ed59b12b8b70348096f339775