65 lines
1.5 KiB
HTML
65 lines
1.5 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.id }}
|
|
{{ 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"
|
|
[ngClass]="{ 'background-yes': poll.max_score > 0 && choice.score == poll.max_score }"
|
|
>
|
|
<span class="max_score background-yes" *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 vote of stack.votes">
|
|
<td *ngIf="vote.value" class="stack-vote background-{{ vote.value }}">
|
|
{{ vote.choice_id }})
|
|
{{ vote.value }}
|
|
</td>
|
|
</ng-container>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|