funky-framadate-front/mocks/old-stuff/pages/voting/voting-summary/voting-summary.component.html

150 lines
5.0 KiB
HTML
Raw Normal View History

<h2>Résumé</h2>
<div class="heading">
2020-04-21 10:50:26 +02:00
<div class="col-xs-6">
2020-05-12 19:16:23 +02:00
<h1 id="title">{{ config.currentPoll.poll.question }}</h1>
<p>{{ config.currentPoll.poll.description }}</p>
2020-04-21 10:50:26 +02:00
<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">
2020-05-12 19:16:23 +02:00
<i class="fa fa-users" aria-hidden="true"></i>
2020-04-21 10:50:26 +02:00
{{ config.currentPoll.stacks.length }} votants, {{ config.currentPoll.choices.length }} choix,
</div>
</div>
</div>
<div class="preferred">
2020-05-12 19:16:23 +02:00
<i class="fa fa-star" aria-hidden="true"></i>
2020-04-21 10:50:26 +02: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>
:
<span class="preferred-result">
{{ preferred }}
</span>
</div>
2020-04-21 10:50:26 +02:00
<div class="table-container">
<table class="table is-striped is-bordered is-hoverable">
<thead>
<tr *ngIf="config.currentPoll.choices && config.currentPoll.choices_count">
<td>
Pseudo
</td>
<td *ngFor="let choice of config.currentPoll.choices">
{{ 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"'>
2020-05-12 19:16:23 +02:00
<td><i class="fa fa-plus-circle" aria-hidden="true"></i> points</td>
2020-04-21 10:50:26 +02: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 >-->
<td *ngFor="let choice of config.currentPoll.choices">
{{ pollconfig.choices_count.counts[this.pollconfig.choices[2].id].score }}
</td>
</tr>
<tr class="details">
<td>
2020-05-12 19:16:23 +02:00
<i class="fa fa-eye" aria-hidden="true"></i>
2020-04-21 10:50:26 +02:00
</td>
<td *ngFor="let choice of config.currentPoll.choices">
id: {{ choice.id }}
<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
2020-04-21 10:50:26 +02:00
<!-- <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[choice.id].score)}}-->
</td>
</tr>
<tr class="votes-of-the-person" *ngFor="let voteStack of config.currentPoll.stacks">
<td>
<!-- // TODO show modify if this is our own vote-->
2020-04-21 10:50:26 +02:00
<button
(click)="config.loadVoteStack(voteStack)"
*ngIf="config.currentPoll.poll.modificationPolicy === 'everybody'"
class="btn btn--primary pull-left btn--small"
>
2020-05-12 19:16:23 +02:00
<i class="fa fa-edit" aria-hidden="true"></i>
2020-04-21 10:50:26 +02:00
</button>
{{ voteStack.pseudo }}
</td>
<td *ngFor="let v of getKeys(voteStack.votes)">
<span *ngIf="voteStack.votes[v].value">
<img
*ngIf="voteStack.votes[v].value == 'yes'"
2020-05-12 19:16:23 +02:00
src="../../../../assets/img/icon_voter_YES.svg"
2020-04-21 10:50:26 +02:00
alt="yes"
/>
<img
*ngIf="voteStack.votes[v].value == 'maybe'"
2020-05-12 19:16:23 +02:00
src="../../../../assets/img/icon_voter_MAYBE.svg"
2020-04-21 10:50:26 +02:00
alt="yes"
/>
</span>
</td>
</tr>
<!-- bottom line shows each answer details-->
</tbody>
</table>
</div>
2020-05-12 19:16:23 +02:00
<button *ngIf="config.isAdmin" type="button" (click)="toggleModalDialogVisibility()" pButton label="Show">
2020-04-21 10:50:26 +02:00
show admin confirmation modal
2020-05-12 19:16:23 +02:00
<i class="fa fa-external-link" aria-hidden="true"></i>
</button>
<p-dialog
[visible]="displayConfirmVoteModalAdmin"
2020-04-21 10:50:26 +02:00
[modal]="true"
[baseZIndex]="10000"
[draggable]="false"
[resizable]="false"
[showHeader]="false"
[transitionOptions]="'200ms'"
>
2020-04-21 10:50:26 +02:00
<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>
2020-04-22 12:56:18 +02:00
<app-copy-text [textToCopy]="config.urlAdmin"></app-copy-text>
2020-04-21 10:50:26 +02:00
<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)="toggleModalDialogVisibility()"
2020-04-21 10:50:26 +02:00
label="Revenir au sondage"
class="btn btn--primary btn--default btn--purple btn--black-text"
></button>
</div>
</p-dialog>