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

110 lines
3.7 KiB
HTML
Raw Normal View History

<h2 >Résumé</h2 >
<div class="preferred" >
<i class='fa fa-star' ></i >
Pour l'instant,
<span *ngIf='severalPreferred' >
les
</span > <span *ngIf='!severalPreferred' >
le
</span >
choix ayant reçu le plus grand nombre de votes ( {{config.currentPoll.choices_count.maxScore}} points )
<span *ngIf='severalPreferred' >
sont à égalité
</span > <span *ngIf='!severalPreferred' >
est
</span >
:
<span class='preferred-result' >
{{preferred}}
</span >
</div >
2020-01-29 17:30:39 +01:00
<table >
<thead >
2020-01-30 11:19:17 +01:00
<tr *ngIf='config.currentPoll.choices && config.currentPoll.choices_count' >
2020-01-29 17:30:39 +01:00
<td >
Pseudo
</td >
2020-01-30 11:19:17 +01:00
<td
*ngFor='let choice of config.currentPoll.choices'
2020-01-30 11:19:17 +01:00
>
<!-- {{choice.id}} )-->
{{choice.text}}
2020-01-29 17:30:39 +01:00
</td >
</tr >
<!-- somme des points, dont un demi point pour les "peut être" -->
2020-01-29 17:30:39 +01:00
</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 choice of config.currentPoll.choices'-->
<!-- [ngClass]='{"has-max-score" : config.currentPoll.choices_count.maxScore === config.currentPoll.choices_count.counts[choice.id].score}' >-->
<!-- {{config.currentPoll.choices[choice.id].score}}-->
<!-- </td >-->
2020-01-30 11:19:17 +01:00
<td
*ngFor='let choice of config.currentPoll.choices'
>
id: {{choice.id}}
<!-- {{config.currentPoll.choices[choice.id].score}}-->
2020-01-30 11:19:17 +01:00
</td >
</tr >
<tr class='details' >
<td >
<i class='fa fa-eye' ></i >
</td >
<td *ngFor='let choice of config.currentPoll.choices' >
id: {{choice.id}}
2020-01-30 11:19:17 +01:00
<br >
<!-- yes {{config.currentPoll.choices_count.counts[choice.id].yes.count}}-->
<!-- <br >-->
<!-- maybe-->
<!-- {{(config.currentPoll.choices_count.counts[k].yes.maybe ? config.currentPoll.choices_count.counts[k].yes.count * 0.5 : 0)}}-->
2020-01-30 11:19:17 +01:00
<!-- <br >-->
<!-- no {{(config.currentPoll.choices_count.counts[k].yes.maybe ? config.currentPoll.choices_count.counts[k].maybe.count * 0.5 : 0)}}-->
2020-01-30 11:19:17 +01:00
<br >
<!-- score :-->
<!-- {{(config.currentPoll.choices_count.counts[choice.id].score)}}-->
2020-01-30 11:19:17 +01:00
</td >
</tr >
2020-01-29 17:30:39 +01:00
<tr
class='votes-of-the-person'
2020-01-30 11:19:17 +01:00
*ngFor='let voteStack of config.currentPoll.stacks'
2020-01-29 17:30:39 +01:00
>
<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}}
2020-01-29 17:30:39 +01:00
</td >
<td *ngFor='let v of getKeys(voteStack.votes)' >
<span *ngIf='voteStack.votes[v].value' >
<img
*ngIf="voteStack.votes[v].value == 'yes'"
src='../../../../assets/img/votant-sur.svg'
alt='yes' >
<img
*ngIf="voteStack.votes[v].value == 'maybe'"
src='../../../../assets/img/votant-pas-sur.svg'
alt='yes' >
2020-01-29 17:30:39 +01:00
</span >
</td >
</tr >
<!-- bottom line shows each answer details-->
2020-01-29 17:30:39 +01:00
</tbody >
</table >