2020-01-16 16:25:40 +01:00
|
|
|
<h2 >Résumé</h2 >
|
2020-02-04 11:21:00 +01:00
|
|
|
<div class='heading' >
|
|
|
|
<div class='col-xs-6' >
|
|
|
|
<h1 id='title' >{{config.currentPoll.poll.title}}</h1 >
|
|
|
|
<p >{{config.currentPoll.poll.description}}</p >
|
|
|
|
<span class="creationDate" >
|
|
|
|
Créé le {{config.currentPoll.poll.creationDate.date}}
|
|
|
|
</span >
|
|
|
|
<span class="expiracyDate" >
|
|
|
|
Expire le {{config.currentPoll.poll.expiracyDate.date}}
|
|
|
|
</span >
|
|
|
|
<div class="votants" >
|
|
|
|
<i class='fa fa-users' ></i >
|
|
|
|
{{config.currentPoll.stacks.length}} votants,
|
|
|
|
{{config.currentPoll.choices.length}} choix,
|
|
|
|
</div >
|
|
|
|
</div >
|
|
|
|
</div >
|
2020-01-16 16:25:40 +01:00
|
|
|
<div class="preferred" >
|
|
|
|
<i class='fa fa-star' ></i >
|
2020-01-30 12:55:40 +01:00
|
|
|
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 >
|
|
|
|
:
|
2020-01-16 16:25:40 +01:00
|
|
|
<span class='preferred-result' >
|
|
|
|
{{preferred}}
|
|
|
|
</span >
|
|
|
|
</div >
|
2020-01-30 13:05:20 +01:00
|
|
|
<table class='table is-striped is-bordered is-hoverable' >
|
2020-01-29 17:30:39 +01:00
|
|
|
<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
|
2020-01-30 12:55:40 +01:00
|
|
|
*ngFor='let choice of config.currentPoll.choices'
|
2020-01-30 11:19:17 +01:00
|
|
|
|
|
|
|
>
|
2020-01-30 12:55:40 +01:00
|
|
|
{{choice.text}}
|
2020-01-29 17:30:39 +01:00
|
|
|
</td >
|
|
|
|
</tr >
|
2020-01-29 17:52:04 +01:00
|
|
|
<!-- somme des points, dont un demi point pour les "peut être" -->
|
|
|
|
|
2020-01-29 17:30:39 +01:00
|
|
|
</thead >
|
|
|
|
<tbody >
|
2020-01-29 17:52:04 +01:00
|
|
|
<tr
|
|
|
|
|
|
|
|
title='somme des points, dont un demi point pour les "peut être"' >
|
|
|
|
<td >
|
|
|
|
<i class='fa fa-plus-circle' ></i > points
|
|
|
|
</td >
|
2020-01-30 12:55:40 +01:00
|
|
|
<!-- <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
|
2020-01-30 12:55:40 +01:00
|
|
|
*ngFor='let choice of config.currentPoll.choices'
|
|
|
|
>
|
2020-01-30 13:05:20 +01:00
|
|
|
{{pollconfig.choices_count.counts[this.pollconfig.choices[2].id].score}}
|
2020-01-30 11:19:17 +01:00
|
|
|
</td >
|
|
|
|
</tr >
|
|
|
|
<tr class='details' >
|
|
|
|
<td >
|
|
|
|
<i class='fa fa-eye' ></i >
|
|
|
|
</td >
|
2020-01-30 12:55:40 +01:00
|
|
|
<td *ngFor='let choice of config.currentPoll.choices' >
|
|
|
|
id: {{choice.id}}
|
2020-01-30 11:19:17 +01:00
|
|
|
<br >
|
2020-01-30 12:55:40 +01:00
|
|
|
<!-- 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
|
|
|
|
2020-01-30 12:55:40 +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 >
|
2020-01-30 12:55:40 +01:00
|
|
|
<!-- score :-->
|
|
|
|
<!-- {{(config.currentPoll.choices_count.counts[choice.id].score)}}-->
|
2020-01-30 11:19:17 +01:00
|
|
|
|
2020-01-29 17:52:04 +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 >
|
2020-02-04 12:51:18 +01:00
|
|
|
<!-- // TODO show modify if this is our own vote-->
|
2020-02-04 14:28:43 +01:00
|
|
|
|
2020-01-30 10:07:03 +01:00
|
|
|
<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 >
|
2020-02-04 12:51:18 +01:00
|
|
|
|
2020-01-16 16:25:40 +01:00
|
|
|
{{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' >
|
2020-01-30 12:55:40 +01:00
|
|
|
|
|
|
|
<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 >
|
2020-01-30 10:07:03 +01:00
|
|
|
<!-- bottom line shows each answer details-->
|
2020-01-29 17:52:04 +01:00
|
|
|
|
2020-01-29 17:30:39 +01:00
|
|
|
</tbody >
|
|
|
|
</table >
|
2020-04-02 17:49:10 +02:00
|
|
|
<button
|
|
|
|
*ngIf='config.isAdmin'
|
|
|
|
type="button"
|
|
|
|
(click)="showModalDialog()"
|
|
|
|
pButton
|
|
|
|
icon="pi pi-external-link"
|
|
|
|
label="Show" >
|
|
|
|
show admin confirmation modal
|
|
|
|
</button >
|
|
|
|
<p-dialog
|
|
|
|
[(visible)]="config.displayConfirmVoteModalAdmin"
|
|
|
|
[modal]="true"
|
|
|
|
[baseZIndex]="10000"
|
|
|
|
[draggable]="false"
|
|
|
|
[resizable]="false"
|
|
|
|
[showHeader]="false"
|
|
|
|
[transitionOptions]="'200ms'" >
|
|
|
|
<div style='max-width: 30em; padding: 2em 1em;' >
|
|
|
|
<h4 class='title' >
|
|
|
|
Participation validée !
|
|
|
|
</h4 >
|
|
|
|
<p class="margin-btm-x1" >
|
|
|
|
Votre vote a bien été pris en compte, mais faites attention, ce sondage n'autorise
|
|
|
|
l'édition de votre vote qu'avec le lien personnalisé suivant :
|
|
|
|
</p >
|
|
|
|
<br >
|
|
|
|
<a
|
|
|
|
href='{{config.urlAdmin}}'
|
|
|
|
class='text-ellipsis' >{{config.urlAdmin}}</a >
|
|
|
|
<framadate-copy-text [textToCopy]='config.urlAdmin' ></framadate-copy-text >
|
|
|
|
<br >
|
|
|
|
<p class="margin-btm-x6 margin-top-x2" >Conservez-le précieusement !</p >
|
|
|
|
<br >
|
|
|
|
<button
|
|
|
|
type="button btn--large btn btn--block"
|
|
|
|
pButton
|
|
|
|
icon="fa fa-check"
|
|
|
|
(click)="config.displayConfirmVoteModalAdmin=false"
|
|
|
|
label='Revenir au sondage'
|
|
|
|
class="btn btn--primary btn--default btn--purple btn--black-text" >
|
|
|
|
|
|
|
|
</button >
|
|
|
|
</div >
|
|
|
|
|
|
|
|
</p-dialog >
|