|
|
|
@ -1,88 +1,71 @@
|
|
|
|
|
<div class="comments padded" id="comments">
|
|
|
|
|
<div class="comments" id="comments">
|
|
|
|
|
<div class="message-body" *ngIf="poll.is_archived">
|
|
|
|
|
⚰️ Ce sondage a expiré, il n'est plus possible d'y ajouter de votes ou de commentaires
|
|
|
|
|
</div>
|
|
|
|
|
<section class="comments-part" *ngIf="!poll.is_archived && poll.comments">
|
|
|
|
|
<h2 class="title is-2">
|
|
|
|
|
<!-- {{ poll.comments.length }}-->
|
|
|
|
|
{{ 'participation.comments_new' | translate }}
|
|
|
|
|
</h2>
|
|
|
|
|
|
|
|
|
|
<article class="message rounded-block" *ngFor="let comment of poll.comments">
|
|
|
|
|
<div class="header">
|
|
|
|
|
<p>
|
|
|
|
|
<em class="cname" *ngIf="comment.pseudo"> {{ comment.pseudo }} </em>
|
|
|
|
|
<em class="cname" *ngIf="!comment.pseudo"> (somebody) </em>
|
|
|
|
|
,
|
|
|
|
|
|
|
|
|
|
<span class="date date-days-ago">
|
|
|
|
|
{{
|
|
|
|
|
'date_delays.dipslay_comments_delay'
|
|
|
|
|
| translate
|
|
|
|
|
: {
|
|
|
|
|
counter_delay: calculateDaysAgoOfComment(comment.created_at),
|
|
|
|
|
time_unit: 'date_delays.days' | translate
|
|
|
|
|
}
|
|
|
|
|
}}
|
|
|
|
|
{{ calculateDaysAgoOfComment(comment.created_at) }} ,
|
|
|
|
|
</span>
|
|
|
|
|
<span class="date is-small">
|
|
|
|
|
{{ comment.created_at | date: 'short':'Europe/Paris' }}
|
|
|
|
|
</span>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="message-body">
|
|
|
|
|
<!-- comment list-->
|
|
|
|
|
<article class="message-comment" *ngFor="let comment of poll.comments">
|
|
|
|
|
<div class="message-text">
|
|
|
|
|
<div class="header">
|
|
|
|
|
<p class="chapo-paragraph-bold">
|
|
|
|
|
<em class="message-comment-pseudo" *ngIf="comment.pseudo"> {{ comment.pseudo }} </em>
|
|
|
|
|
<em class="message-comment-pseudo" *ngIf="!comment.pseudo"> (somebody) </em>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<p class="text">
|
|
|
|
|
{{ comment.text }}
|
|
|
|
|
</p>
|
|
|
|
|
<div class="left-point"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="date date-days-ago">
|
|
|
|
|
{{
|
|
|
|
|
'date_delays.dipslay_comments_delay'
|
|
|
|
|
| translate
|
|
|
|
|
: {
|
|
|
|
|
counter_delay: calculateDaysAgoOfComment(comment.created_at),
|
|
|
|
|
time_unit: 'date_delays.days' | translate
|
|
|
|
|
}
|
|
|
|
|
}}
|
|
|
|
|
<!-- {{ calculateDaysAgoOfComment(comment.created_at) }} ,-->
|
|
|
|
|
</div>
|
|
|
|
|
<span class="date is-small" *ngIf="display_comment_date">
|
|
|
|
|
{{ comment.created_at | date: 'short':'Europe/Paris' }}
|
|
|
|
|
</span>
|
|
|
|
|
</article>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<section class="add-comment" *ngIf="!poll.is_archived && vote_stack.owner">
|
|
|
|
|
<article class="message">
|
|
|
|
|
<section class="new-comment-section">
|
|
|
|
|
<div class="header">
|
|
|
|
|
<div class="field">
|
|
|
|
|
<!-- <span class="control has-icons-left has-icons-right">-->
|
|
|
|
|
<!-- <input-->
|
|
|
|
|
<!-- type="email"-->
|
|
|
|
|
<!-- name="cremail"-->
|
|
|
|
|
<!-- id="email_comment"-->
|
|
|
|
|
<!-- [(ngModel)]="vote_stack.owner.email"-->
|
|
|
|
|
<!-- required="required"-->
|
|
|
|
|
<!-- />-->
|
|
|
|
|
<!-- <span class="icon is-small is-left">-->
|
|
|
|
|
<!-- <i class="fa fa-envelope"></i>-->
|
|
|
|
|
<!-- </span>-->
|
|
|
|
|
<!-- </span>-->
|
|
|
|
|
<label for="comment_pseudo">
|
|
|
|
|
{{ 'participation.name_label' | translate }}
|
|
|
|
|
</label>
|
|
|
|
|
<span class="control has-icons-left">
|
|
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
class="margin-btm-x3"
|
|
|
|
|
name="crname"
|
|
|
|
|
[(ngModel)]="vote_stack.pseudo"
|
|
|
|
|
id="comment_pseudo"
|
|
|
|
|
required="required"
|
|
|
|
|
/>
|
|
|
|
|
<span class="icon is-small is-left">
|
|
|
|
|
<i class="fa fa-user"></i>
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- <label for="crname"><i class="fa fa-user" aria-hidden="true"></i> Votre nom / pseudo :</label>-->
|
|
|
|
|
|
|
|
|
|
<!-- <label for="cremail"><i class="fa fa-envelope" aria-hidden="true"></i> Votre email :</label>-->
|
|
|
|
|
<div class="field"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="message-body">
|
|
|
|
|
<label for="comment">
|
|
|
|
|
{{ 'participation.content_label' | translate }}
|
|
|
|
|
<div class="message-text-new rounded-block">
|
|
|
|
|
<h2 class="title is-5">
|
|
|
|
|
{{ 'participation.comments_new' | translate }}
|
|
|
|
|
</h2>
|
|
|
|
|
<p>
|
|
|
|
|
Votre commentaire sera directement visible sur la page du sondage.
|
|
|
|
|
</p>
|
|
|
|
|
<label for="comment_pseudo">
|
|
|
|
|
{{ 'participation.name_label' | translate }}
|
|
|
|
|
</label>
|
|
|
|
|
|
|
|
|
|
<span class="control has-icons-left">
|
|
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
name="crname"
|
|
|
|
|
[(ngModel)]="vote_stack.pseudo"
|
|
|
|
|
id="comment_pseudo"
|
|
|
|
|
required="required"
|
|
|
|
|
/>
|
|
|
|
|
<span class="icon is-small is-left">
|
|
|
|
|
<i class="fa fa-user"></i>
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
|
|
|
|
<br />
|
|
|
|
|
<textarea name="comment" id="comment" [(ngModel)]="vote_stack.comment"> </textarea>
|
|
|
|
|
<label for="new_comment">
|
|
|
|
|
{{ 'participation.content_label' | translate }}
|
|
|
|
|
</label>
|
|
|
|
|
<textarea name="comment" id="new_comment" [(ngModel)]="vote_stack.comment"> </textarea>
|
|
|
|
|
|
|
|
|
|
<input
|
|
|
|
|
type="submit"
|
|
|
|
@ -92,6 +75,6 @@
|
|
|
|
|
(click)="addComment()"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</article>
|
|
|
|
|
</section>
|
|
|
|
|
</section>
|
|
|
|
|
</div>
|
|
|
|
|