front end version 2 de framadate, un gestionnaire de sondage
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

155 lines
5.1 KiB

<section class="loading_poll" *ngIf="fetching"></section>
<section class="poll_loaded padded" *ngIf="!fetching && poll">
<!-- messages-->
<div class="message is-warning" *ngIf="isArchived">
<div class="message-body">
Ce sondage a expiré, il n'est plus possible d'y ajouter de votes ou de commentaires
</div>
</div>
<div class="message is-info" *ngIf="poll.modification_policy == 'self'">
<div class="message-body">
Vous ne pouvez modifier que votre propre vote à ce sondage
</div>
</div>
<!-- actions-->
<!-- affichage des possibilités de réponse -->
<div class="columns">
<div class="column">
<div class="card">
<header class="card-header padded">
<div class="columns">
<div class="column">
<p class="card-header-title is-1 title">{{ poll.title }}</p>
<p class="descr">{{ poll.description }}</p>
<div class="voters-count padded">
<i class="fa fa-users"></i> {{ poll.stacks.length }} votants
</div>
<p class="card-header-icon" *ngIf="poll.owner">author : {{ poll.owner?.pseudo }}</p>
</div>
<div class="column">
<button class="export export-print btn" (click)="print()">
<i class="fa fa-print"></i>
Imprimer le sondage
</button>
<button class="export export-csv btn" (click)="exportCSV()">
<i class="fa fa-file-calc-o" aria-hidden="true"></i>
Exporter en .csv
</button>
<button class="export export-json btn" (click)="exportJson()">
<i class="fa fa-file-archive-o" aria-hidden="true"></i>
export json
</button>
<button class="replicate duplicate btn" (click)="duplicate()">
<i class="fa fa-copy" aria-hidden="true"></i>
Dupliquer
</button>
<div id="export_and_share">
<div class="sharing" *ngIf="poll">
<div class="margin-top-x8">
Partager le sondage
<i class="fa fa-share" aria-hidden="true"></i>
</div>
<p class="nobold text-14" for="copyLink">
<a href="{{ pollService.getParticipationUrl() }}">
{{ pollService.getParticipationUrl() }} </a
><app-copy-text
[textToCopy]="pollService.getParticipationUrl()"
></app-copy-text>
</p>
</div>
</div>
</div>
</div>
</header>
<div class="card-content">
<div class="content">
<button
class="btn is-info"
(click)="isCompactMode = !isCompactMode"
[ngClass]="{ 'is-primary': isCompactMode, 'is-default': !isCompactMode }"
>
changer d'affichage
</button>
<div class="buttons has-addons is-small is-right">
<button class="button" [class.is-active]="isCompactMode" (click)="isCompactMode = true">
Compact
</button>
<button class="button" [class.is-active]="!isCompactMode" (click)="isCompactMode = false">
Detailed
</button>
</div>
<app-poll-results-compact *ngIf="isCompactMode" [poll]="poll"></app-poll-results-compact>
<app-poll-results-detailed *ngIf="!isCompactMode" [poll]="poll"></app-poll-results-detailed>
</div>
</div>
<!-- static buttons-->
<div class="padded">
<div class="message is-info" *ngIf="poll.stacks.length == 0">
<div class="message-body">
aucun vote pour le moment
</div>
</div>
<button
class="btn btn-block submit-votestack"
(click)="addVoteStack()"
[disabled]="!myTempVoteStack"
[ngClass]="{ 'btn--primary': myTempVoteStack }"
*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>
<div class="columns">
<div class="column">
<app-comments [poll]="poll" [vote_stack]="storageService.vote_stack"></app-comments>
</div>
</div>
<!-- fixed bottom buttons-->
<div class="bar-votestack" *ngIf="!isArchived">
<button
class="btn btn-block submit-votestack"
(click)="addVoteStack()"
[disabled]="!myTempVoteStack"
[ngClass]="{ 'btn--primary': myTempVoteStack }"
*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>
<!-- <footer class="card-footer" *ngIf="!isArchived">-->
<!-- TODO links-->
<!-- </footer>-->
</div>
</div>
</div>
</section>