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

151 lines
4.9 KiB
HTML

<app-header [linkToHome]="false"></app-header>
<section class="poll_loaded consultation" *ngIf="!fetching && poll">
<div class="step contained-in-large-column">
<div class="rounded-block admin-share-link" *ngIf="poll.admin_key || show_admin_stuff">
<h1 class="title is-2">
{{ 'participation.share_title' | translate }}
</h1>
<p class="description">
{{ 'participation.share_description' | translate }}
</p>
<label for="public_share_link">
{{ 'success.link' | translate }}
</label>
<div class="columns">
<div class="column">
<input type="text" [value]="pollService.getParticipationUrl()" id="public_share_link" />
</div>
<div class="column is-narrow">
<app-copy-text [textToCopy]="pollService.getParticipationUrl()"></app-copy-text>
</div>
</div>
</div>
<section class="main-title-poll rounded-block">
<h2 class="title is-2">
{{ poll.title }}
</h2>
<button
class="pull-right button is-action"
(click)="displayOptions()"
[ngClass]="{ 'is-active': display_options_menu }"
>
{{ 'participation.menu_label' | translate }}
<i class="fa fa-chevron-down"></i>
</button>
<app-actions-menu [displayMenu]="display_options_menu" *ngIf="display_options_menu"></app-actions-menu>
<p class="description">
{{ poll.description }}
</p>
<button
class="vote-button is-primary button"
*ngIf="poll.votes_allowed"
[routerLink]="'/poll/' + poll.custom_url + '/consultation/vote'"
>
{{ 'participation.fav_title' | translate }}
</button>
<button
class="edit-poll-button button is-default"
routerLink="/administration/step/7"
*ngIf="poll.admin_key || show_admin_stuff"
>
{{ 'SENTENCES.change-the-poll' | translate }}
</button>
<span *ngIf="!poll.votes_allowed">
Les votes sont désactivés
</span>
</section>
<section class="favourite">
<h2 class="title is-3">
{{ 'participation.fav_choice' | translate }}
</h2>
<div class="rounded-block">
<div class="no-votes">
<div class="message is-info" *ngIf="poll.stacks.length == 0">
<div class="message-body">
{{ 'participation.no_votes_yet' | translate }}
<br />
{{ 'participation.fav_description_not_exist' | translate }}
</div>
</div>
</div>
<div class="has-votes" *ngIf="poll.stacks.length !== 0 && favChoicesList.length">
<div class="one-fav" *ngIf="favChoicesList.length == 1">
{{ 'participation.fav_description_one' | translate: { maxYesCount: maxYesCount } }}
</div>
<div class="several-fav" *ngIf="favChoicesList.length > 1">
{{ 'participation.fav_description_several' | translate }}
</div>
<div class="fav block has-background-yes">
<div class="fav-choice" *ngFor="let c of favChoicesList">
<div class="date-choice" *ngIf="poll.kind == 'date'">
{{ c.name | date }}
</div>
<div class="date-choice" *ngIf="poll.kind == 'text'">
{{ c.name }}
</div>
</div>
</div>
</div>
</div>
</section>
<section class="poll-answers">
<div class="columns">
<div class="column">
<h2 class="title is-3">
{{ 'participation.poll' | translate }}
</h2>
</div>
<div class="column">
<button class="button is-secondary pull-right" (click)="detailledDisplay = !detailledDisplay">
<span *ngIf="detailledDisplay">
<!-- <img class="icon" src="assets/icons/flag.svg" alt="icone magnifying" />-->
{{ 'participation.mode_comptact' | translate }}
</span>
<span *ngIf="!detailledDisplay">
<!-- <img class="icon" src="assets/icons/settings.svg" alt="icone magnifying" />-->
{{ 'participation.mode_detailed' | translate }}
</span>
</button>
</div>
</div>
<!--affichages différents des réponses-->
<div class="results-not-visible" *ngIf="poll.hideResults">
Résultats cachés aux visiteurs
</div>
<app-poll-results-dinum [poll]="poll" [detailledDisplay]="detailledDisplay"></app-poll-results-dinum>
</section>
<section class="poll-comments" id="comments_list">
<h2 class="title is-3">
{{ 'participation.comments' | translate }}
<a [routerLink]="[]" fragment="comments_list"> #</a>
</h2>
<!-- <app-comments [poll]="poll" [vote_stack]="storageService.vote_stack" *ngIf="poll.allow_comments" ></app-comments>-->
<app-comments [poll]="poll" [vote_stack]="storageService.vote_stack"></app-comments>
<div class="alert has-background-info" *ngIf="!poll.allow_comments">
Ce sondage ne permet pas d'ajouter de commentaires
</div>
</section>
</div>
</section>
<div class="step has-text-centered" class="loadin_poll" *ngIf="fetching">
<h1 class="title is-1">
Loading
</h1>
<br />
<i class="fa fa-spinner fa-spin fa-3x"></i>
<br /><br />
<img
class="stepper-app-logo fa-spin"
*ngIf="environment.appLogo"
src="{{ environment.appLogo }}"
alt="accueil {{ environment.appTitle }}"
/>
</div>