funky-framadate-front/src/app/features/consultation/poll-results-detailed/poll-results-detailed.compo...

62 lines
1.4 KiB
HTML

<table>
<thead>
<tr>
<th>
Choix
</th>
<th *ngFor="let choice of poll.choices">
<!-- {{choice.id}}-->
<span class="label" *ngIf="poll.kind == 'text'">{{ choice.name }} </span>
<span class="label" *ngIf="poll.kind == 'date'">
{{ make_date(choice.name) | date: 'fullDate':'Europe/Paris':'fr_FR' }}
</span>
</th>
</tr>
</thead>
<tbody>
<tr class="stats">
<td>
Score
</td>
<td *ngFor="let choice of poll.choices">
{{ choice.score }}
</td>
</tr>
<tr class="stats">
<td>
Favori
</td>
<td *ngFor="let choice of poll.choices">
<span class="max_score" *ngIf="poll.max_score > 0 && choice.score == poll.max_score">
<i class="fa fa-star fa-2x"></i>
</span>
</td>
</tr>
<tr class="people">
<td>
Personnes
</td>
<td *ngFor="let choice of poll.choices"></td>
</tr>
<tr class="stacks" *ngFor="let stack of poll.stacks">
<td>
<div class="pseudo">
{{ stack.pseudo }}
</div>
<div class="date">
<sub> le {{ stack.created_at | date: 'short':'Europe/Paris':'fr_FR' }} </sub>
</div>
</td>
<ng-container *ngFor="let item of poll.choices">
<td *ngIf="!stackHasVotesForChoice(stack, item.id)"></td>
<td
*ngIf="stackHasVotesForChoice(stack, item.id)"
class="stack-vote background-{{ getValue(stack, item.id) }}"
>
{{ getValue(stack, item.id) }}
</td>
</ng-container>
</tr>
</tbody>
</table>