funky-framadate-front/src/app/pages/voting/voting-summary/voting-summary.component.html

86 lines
2.7 KiB
HTML

<h2 >Résumé</h2 >
<div class="preferred" >
<i class='fa fa-star' ></i >
Pour l'instant, le choix ayant reçu le plus grand nombre de votes ( {{config.currentPoll.choices_count.maxScore}} )
est :
<span class='preferred-result' >
{{preferred}}
</span >
</div >
<table >
<thead >
<tr *ngIf='config.currentPoll.choices && config.currentPoll.choices_count' >
<td >
Pseudo
</td >
<td
*ngFor='let k of getKeys(config.currentPoll.choices_count.counts )'
>
{{k}} )
{{config.currentPoll.choices_count.counts[k].choice_text}}
</td >
</tr >
<!-- somme des points, dont un demi point pour les "peut être" -->
</thead >
<tbody >
<tr
title='somme des points, dont un demi point pour les "peut être"' >
<td >
<i class='fa fa-plus-circle' ></i > points
</td >
<td
*ngFor='let k of getKeys(config.currentPoll.choices_count.counts )'
[ngClass]='{"has-max-score" : config.currentPoll.choices_count.maxScore === config.currentPoll.choices_count.counts[k].score}' >
{{config.currentPoll.choices_count.counts[k].score}}
</td >
</tr >
<tr class='details' >
<td >
<i class='fa fa-eye' ></i >
</td >
<td *ngFor='let k of getKeys(config.currentPoll.choices_count.counts )' >
id: {{k}}
<br >
yes {{config.currentPoll.choices_count.counts[k].yes.count}}
<br >
maybe
{{(config.currentPoll.choices_count.counts[k].yes.maybe ? config.currentPoll.choices_count.counts[k].yes.count * 0.5 : 0)}}
<br >
no {{(config.currentPoll.choices_count.counts[k].yes.maybe ? config.currentPoll.choices_count.counts[k].maybe.count * 0.5 : 0)}}
<br >
score :
{{(config.currentPoll.choices_count.counts[k].score)}}
</td >
</tr >
<tr
class='votes-of-the-person'
*ngFor='let voteStack of config.currentPoll.stacks'
>
<td >
<button
(click)='config.loadVoteStack(voteStack)'
*ngIf="config.currentPoll.poll.modificationPolicy === 'everybody'"
class='btn btn--primary pull-left btn--small'
>
<i class='fa fa-pencil' ></i >
</button >
{{voteStack.pseudo}}
</td >
<td *ngFor='let v of getKeys(voteStack.votes)' >
<span *ngIf='voteStack.votes[v].value' >
id {{v}} )
{{voteStack.votes[v].value}}
</span >
</td >
</tr >
<!-- bottom line shows each answer details-->
</tbody >
</table >