99 lines
2.6 KiB
HTML
99 lines
2.6 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' && choice.name.indexOf('>>>') === -1">
|
|
{{ make_date(choice.name) | date: 'fullDate':'Europe/Paris':'fr_FR' }}
|
|
</span>
|
|
<span class="label" *ngIf="poll.kind == 'date' && choice.name.indexOf('>>>') !== -1">
|
|
{{ make_display_range_time(choice.name) }}
|
|
</span>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="stats">
|
|
<td>
|
|
Ajouter votre vote
|
|
<div>
|
|
<input
|
|
class="is-block"
|
|
type="text"
|
|
id="vote_pseudo_vote_stack_detailed"
|
|
placeholder="votre pseudo"
|
|
[(ngModel)]="storageService.vote_stack.pseudo"
|
|
/>
|
|
<button
|
|
class="btn btn-block submit-votestack is-primary"
|
|
(click)="addVoteStack()"
|
|
*ngIf="!storageService.vote_stack || !storageService.vote_stack.id"
|
|
>
|
|
<i class="fa fa-paper-plane" aria-hidden="true"></i> Envoyer
|
|
|
|
<!-- {{ storageService.vote_stack.votes.length }} réponses-->
|
|
</button>
|
|
<button
|
|
class="btn btn--primary btn-block submit-votestack update"
|
|
(click)="updateVoteStack()"
|
|
*ngIf="storageService.vote_stack && storageService.vote_stack.id"
|
|
>
|
|
<i class="fa fa-edit" aria-hidden="true"></i> Mettre à jour
|
|
</button>
|
|
</div>
|
|
</td>
|
|
<td *ngFor="let choice of poll.choices">
|
|
<app-choice-button [poll]="poll" [choice]="choice" [answerKind]="'YES'"></app-choice-button>
|
|
</td>
|
|
</tr>
|
|
<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 {{ make_date(stack.created_at) | date: 'short':'Europe/Paris':'fr_FR' }} </sub>
|
|
</div>
|
|
</td>
|
|
<ng-container *ngFor="let vote of stack.votes">
|
|
<td class="stack-vote background-{{ vote.value }}">
|
|
{{ vote.value }}
|
|
</td>
|
|
</ng-container>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|