[Trunk|Admin]: Curator personal info page: Remove some text when name or websiteurl are more than 70 chars. Make logo smaller.

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@55948 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2019-06-03 08:25:11 +00:00
parent 302ffcf635
commit 3c4985ad8c
2 changed files with 9 additions and 4 deletions

View File

@ -84,12 +84,12 @@
</div>
<ul class="uk-list uk-list-divider uk-margin uk-height-max-large uk-overflow-auto">
<li *ngFor="let result of curator.affiliations; let i=index" class="uk-animation-fade uk-margin-auto uk-height-small uk-flex uk-flex-middle" uk-grid>
<div class="uk-width-1-5 uk-card uk-card-default uk-card-body affiliation-card uk-inline">
<img class="uk-border-rounded uk-position-center" src="{{result.logoUrl}}" width="80" height="80" alt="{{result.name}}">
<div class="uk-width-1-5 uk-card uk-card-default affiliation-card uk-card-body uk-inline">
<img class="uk-padding uk-position-center" src="{{result.logoUrl}}" width="80" height="80" alt="{{result.name}}">
</div>
<div class="uk-width-3-5">
<h3 class="uk-h3">{{result.name}}</h3>
<a href="{{result.websiteUrl}}" class="uk-margin-auto-top" target="_blank">{{result.websiteUrl}}</a>
<h3 class="uk-h3" title="{{result.name}}">{{_format(result.name)}}</h3>
<a href="{{result.websiteUrl}}" title="{{result.websiteUrl}}" class="uk-margin-auto-top" target="_blank">{{_format(result.websiteUrl)}}</a>
</div>
<div class="uk-width-1-5 uk-card">
<button class="uk-icon-button uk-icon uk-button-secondary" title="Edit" uk-icon="pencil" (click)="chooseAffiliation(i, 'edit')"></button>

View File

@ -37,6 +37,7 @@ export class CuratorComponent implements OnInit {
private file: File = null;
private enabled = true;
private index = 0;
private maxCharacters = 70;
constructor(private element: ElementRef,
private route: ActivatedRoute,
@ -300,4 +301,8 @@ export class CuratorComponent implements OnInit {
this.enabled = true;
}
}
_format(name: string){
return (((name).length > this.maxCharacters) ? (name.substring(0, (this.maxCharacters - ('...').length)) + '...') : name);
}
}