funky-framadate-front/src/app/features/consultation/consultation.component.html

112 lines
3.4 KiB
HTML
Raw Normal View History

2021-04-21 12:43:05 +02:00
<section class="loading_poll" *ngIf="fetching"></section>
<section class="poll_loaded padded" *ngIf="!fetching && poll">
2021-04-26 10:32:42 +02:00
<!-- messages-->
<article 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>
</article>
<article class="message is-info" *ngIf="poll.votes.length == 0">
<div class="message-body">
aucun vote pour le moment
</div>
</article>
2021-04-26 11:27:44 +02:00
<!-- actions-->
<div id="export_and_share">
<div class="sharing" *ngIf="poll">
<h3 class="margin-top-x8">
Partager le sondage
<i class="fa fa-share" aria-hidden="true"></i>
</h3>
<p class="nobold text-14" for="copyLink">
Pour partager le sondage, vous pouvez diffuser ce lien :
<a href="{{ poll.urlPublic }}">
{{ poll.urlPublic }}
</a>
</p>
<app-copy-text [textToCopy]="poll.urlPublic"></app-copy-text>
<h3 class="margin-top-x6 margin-btm-x3">
Exporter/Imprimer
</h3>
<button class="export export-csv" (click)="exportCSV()">
<i class="fa fa-file-calc-o" aria-hidden="true"></i>
Exporter en .csv
</button>
<button class="btn btn--primary" (click)="exportJson()">
<i class="fa fa-file-archive-o" aria-hidden="true"></i>
export json
</button>
<button class="export export-print" (click)="print()">
<i class="fa fa-print"></i>
Imprimer le sondage
</button>
</div>
</div>
2021-04-26 10:32:42 +02:00
<!-- affichage des possibilités de réponse -->
2021-04-21 12:43:05 +02:00
<div class="columns">
<div class="column">
<div class="card">
<header class="card-header">
2021-04-24 12:52:51 +02:00
<p class="card-header-title is-1 title">{{ poll.title }}</p>
2021-04-21 12:43:05 +02:00
<!-- <p class="card-header-icon">author : {{ poll.owner?.pseudo }}</p>-->
</header>
2021-04-24 12:52:51 +02:00
2021-04-21 12:43:05 +02:00
<div class="card-content">
<div class="content">
2021-04-24 12:52:51 +02:00
<p class="title is-2">{{ poll.description }}</p>
<button
class="btn is-info"
(click)="isCompactMode = !isCompactMode"
[ngClass]="{ 'is-primary': isCompactMode, 'is-default': !isCompactMode }"
>
changer d'affichage
</button>
2021-04-21 12:43:05 +02:00
<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>
2021-04-26 11:27:44 +02:00
<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>
<div class="columns">
<div class="column">
<app-comments [poll]="poll"></app-comments>
2020-05-12 19:16:23 +02:00
</div>
</div>
2021-04-26 11:27:44 +02:00
<div class="bar-votestack">
<button
class="btn btn-block submit-votestack"
(click)="addVoteStack()"
[disabled]="!myTempVoteStack"
[ngClass]="{ 'btn--primary': myTempVoteStack }"
*ngIf="!myVoteStack || !myVoteStack.id"
>
<i class="fa fa-paper-plane" aria-hidden="true"></i> Envoyer
</button>
<button
class="btn btn--primary btn-block submit-votestack update"
(click)="updateVote(myVoteStack)"
*ngIf="myVoteStack && myVoteStack.id"
>
<i class="fa fa-edit" aria-hidden="true"></i> Mettre à jour
</button>
</div>
2021-04-21 12:43:05 +02:00
<footer class="card-footer" *ngIf="!isArchived">
2021-04-24 12:31:34 +02:00
TODO links
2021-04-21 12:43:05 +02:00
</footer>
2020-05-12 19:16:23 +02:00
</div>
</div>
2020-06-18 16:15:26 +02:00
</div>
2021-04-21 12:43:05 +02:00
</section>