Change html for subjects in case of getting more than 10

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@51570 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
sofia.baltzi 2018-03-29 11:00:53 +00:00
parent d67d7108e3
commit 76d8ef7d80
1 changed files with 21 additions and 4 deletions

View File

@ -19,11 +19,28 @@
<p> {{community.description}}</p>
</div>
</blockquote>
<p *ngIf="community.subjects != null">
<span *ngFor='let subject of community.subjects; let i = index'>
<span *ngIf="subject != ''" class="uk-label">{{subject}}</span>&nbsp;
<div *ngIf="community.subjects != null">
<span *ngFor="let subject of community.subjects.slice(0,10) let i=index">
<span *ngIf="subject != ''" class="uk-label">{{subject}}</span>
<!-- <span *ngIf=" i<9 && i<(community.subjects.length-1)">&nbsp;</span> -->
</span>
</p>
<span *ngIf="showAll">
<span *ngFor="let subject of community.subjects.slice(10) let i=index">
<span *ngIf="subject != ''" class="uk-label">{{subject}}</span>
<!-- <span *ngIf="i<(community.subjects.length-1)">&nbsp;</span> -->
</span>
</span>
<span *ngIf="!showAll && community.subjects.length > 10">
<a (click)="showAll = !showAll;">
show more
</a>
</span>
<span *ngIf="showAll">
<a (click)="showAll = !showAll;">
show less
</a>
</span>
</div>
<p>
<span *ngIf="community.managers != null && community.managers[0] != ''"> Curated by:
<span *ngFor='let manager of community.managers; let i = index'>{{manager.substr(0, manager.indexOf('@'))}}<span *ngIf="manager.includes('@') == 0">{{manager}}</span><span *ngIf="i<(community.managers.length-1)">,</span>