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

126 lines
4.0 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">
<div class="well debug">
<!-- infos locales storage-->
</div>
2021-04-26 10:32:42 +02:00
<!-- messages-->
2021-04-26 10:32:42 +02:00
<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>
2021-04-26 17:04:16 +02:00
<article class="message is-info" *ngIf="poll.stacks.length == 0">
2021-04-26 10:32:42 +02:00
<div class="message-body">
aucun vote pour le moment
</div>
</article>
<article class="message is-info" *ngIf="poll.modification_policy == 'self'">
<div class="message-body">
Vous ne pouvez modifier que votre propre vote à ce sondage
</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="replicate export-csv btn" (click)="duplicate()">
<i class="fa fa-copy" aria-hidden="true"></i>
Dupliquer
</button>
<button class="export export-csv btn" (click)="exportCSV()">
2021-04-26 11:27:44 +02:00
<i class="fa fa-file-calc-o" aria-hidden="true"></i>
Exporter en .csv
</button>
<button class="export export-json btn" (click)="exportJson()">
2021-04-26 11:27:44 +02:00
<i class="fa fa-file-archive-o" aria-hidden="true"></i>
export json
</button>
<button class="export export-print btn" (click)="print()">
2021-04-26 11:27:44 +02:00
<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-26 17:04:16 +02:00
<p class="descr">{{ poll.description }}</p>
2021-04-24 12:52:51 +02:00
<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>
<app-poll-results-compact *ngIf="isCompactMode" [poll]="poll"></app-poll-results-compact>
2021-04-26 11:27:44 +02:00
<app-poll-results-detailed *ngIf="!isCompactMode" [poll]="poll"></app-poll-results-detailed>
</div>
</div>
<div class="columns">
<div class="column">
<app-comments [poll]="poll" [vote_stack]="storageService.vote_stack"></app-comments>
2020-05-12 19:16:23 +02:00
</div>
</div>
2021-04-26 11:27:44 +02:00
<div class="bar-votestack" *ngIf="!isArchived">
2021-04-26 11:27:44 +02:00
<button
class="btn btn-block submit-votestack"
(click)="addVoteStack()"
[disabled]="!myTempVoteStack"
[ngClass]="{ 'btn--primary': myTempVoteStack }"
2021-04-29 10:17:13 +02:00
*ngIf="!storageService.vote_stack || !storageService.vote_stack.id"
2021-04-26 11:27:44 +02:00
>
<i class="fa fa-paper-plane" aria-hidden="true"></i> Envoyer
</button>
<button
class="btn btn--primary btn-block submit-votestack update"
(click)="updateVoteStack(storageService.vote_stack)"
2021-04-29 10:17:13 +02:00
*ngIf="storageService.vote_stack && storageService.vote_stack.id"
2021-04-26 11:27:44 +02:00
>
<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>