Add biography formal and default photo on curator.

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@56027 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2019-06-07 10:29:11 +00:00
parent 92bee0b7d6
commit 1083de3202
2 changed files with 21 additions and 13 deletions

View File

@ -12,12 +12,13 @@
<span class="uk-text-bold">Curators</span>
<span> ({{curators.length}})</span>
</h4>
<div *ngFor="let curator of curators let i=index;" class="uk-width-1-1 uk-card uk-card-default uk-card-body uk-margin-top uk-height-max-large uk-overflow-auto">
<div *ngFor="let curator of curators let i=index;" class="uk-width-1-1 uk-card uk-card-default uk-card-body uk-margin-top">
<div [class]="(curator.affiliations.length <= 2)?'uk-grid-divider':''" uk-grid>
<div class="uk-width-1-2 uk-first-column">
<div class="uk-flex uk-flex-middle">
<div>
<img class="uk-border-circle curator-photo" src="{{downloadUrl + curator.photo}}" alt="Curator Photo">
<img *ngIf="curator.photo && curator.photo !== ''" class="uk-border-circle curator-photo" src="{{downloadUrl + curator.photo}}" alt="Curator Photo">
<img *ngIf="!curator.photo || curator.photo == ''" class="uk-border-circle curator-photo" src="../../assets/common-assets/curator-default.png" alt="Curator Photo">
</div>
<div class="uk-width-expand uk-margin-left uk-text-bold">
{{curator.name}}
@ -42,7 +43,7 @@
<div class="uk-text-meta uk-margin-small-bottom">
Affiliations
</div>
<div *ngIf="(curator.affiliations.length > 5)" class="uk-position-relative uk-visible-toggle" tabindex="-1" uk-slider="center: true">
<div *ngIf="(curator.affiliations.length > 5)" class="uk-position-relative uk-visible-toggle" tabindex="-1" uk-slider>
<ul class="uk-slider-items">
<li *ngFor="let affiliation of curator.affiliations" class="uk-width-1-5">
<div class="uk-panel">
@ -71,21 +72,24 @@
</ul>
</div>
</div>
<div class="uk-width-1-1 uk-first-column uk-margin-top">
<div class="uk-width-1-1 uk-first-column uk-margin-top uk-height-max-large uk-overflow-auto">
<div class="uk-text-meta uk-margin-small-bottom">
Biography
</div>
<div class="uk-margin-top">
<span *ngIf="showMore[i]">
{{curator.bio}}
</span>
<span *ngIf="!showMore[i]">
{{_format(curator.bio)}}
</span>
<p *ngIf="showMore[i]" class="biography"> {{curator.bio}}}</p>
<p *ngIf="!showMore[i]" class="biography">{{_format(curator.bio)}}</p>
</div>
</div>
<div class="uk-width-1-1 uk-margin-top uk-text-right">
<a *ngIf="curator.bio.length > maxCharacters && !showMore[i]" class="uk-text-bold" (click)="toggle(i)">
Show more
</a>
<a *ngIf="curator.bio.length > maxCharacters && showMore[i]" class="uk-text-bold" (click)="toggle(i)">
Show less
</a>
</div>
</div>
</div>
</div>
</div>

View File

@ -5,6 +5,7 @@ import {Curator} from "../openaireLibrary/utils/entities/CuratorInfo";
import {ActivatedRoute} from "@angular/router";
import {CommunitiesService} from "../openaireLibrary/connect/communities/communities.service";
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
import {HelperFunctions} from "../openaireLibrary/utils/HelperFunctions.class";
@Component({
selector: 'showAuthors',
@ -46,6 +47,7 @@ export class CuratorsComponent {
this.showMore[i]= false;
}
this.showLoading = false;
HelperFunctions.scroll();
})
} else {
if(this.properties.environment == "development") {
@ -62,7 +64,8 @@ export class CuratorsComponent {
this.showMore[i]= false;
}
this.showLoading = false;
})
HelperFunctions.scroll();
});
})
});
} else {
@ -78,7 +81,8 @@ export class CuratorsComponent {
this.showMore[i]= false;
}
this.showLoading = false;
})
HelperFunctions.scroll();
});
})
}
}