forked from tykayn/funky-framadate-front
display detailled array of answers
This commit is contained in:
parent
13dbe0f89b
commit
adc7c255d8
@ -15,7 +15,7 @@ import { ToastService } from '../../core/services/toast.service';
|
||||
styleUrls: ['./consultation.component.scss'],
|
||||
})
|
||||
export class ConsultationComponent implements OnInit, OnDestroy {
|
||||
public isCompactMode = true;
|
||||
public isCompactMode = false;
|
||||
public poll: Poll;
|
||||
public pollSlug: string;
|
||||
public pass_hash: string;
|
||||
|
@ -6,7 +6,10 @@
|
||||
</th>
|
||||
<th *ngFor="let choice of poll.choices">
|
||||
<!-- {{choice.id}}-->
|
||||
<span class="label" *ngIf="poll.kind == 'text'">{{ choice.name }} </span>
|
||||
<span class="label" *ngIf="poll.kind == 'text'">
|
||||
{{ choice.id }}
|
||||
{{ choice.name }}
|
||||
</span>
|
||||
<span class="label" *ngIf="poll.kind == 'date'">
|
||||
{{ make_date(choice.name) | date: 'fullDate':'Europe/Paris':'fr_FR' }}
|
||||
</span>
|
||||
@ -26,8 +29,11 @@
|
||||
<td>
|
||||
Favori
|
||||
</td>
|
||||
<td *ngFor="let choice of poll.choices">
|
||||
<span class="max_score" *ngIf="poll.max_score > 0 && choice.score == poll.max_score">
|
||||
<td
|
||||
*ngFor="let choice of poll.choices"
|
||||
[ngClass]="{ 'background-yes': poll.max_score > 0 && choice.score == poll.max_score }"
|
||||
>
|
||||
<span class="max_score background-yes" *ngIf="poll.max_score > 0 && choice.score == poll.max_score">
|
||||
<i class="fa fa-star fa-2x"></i>
|
||||
</span>
|
||||
</td>
|
||||
@ -47,13 +53,10 @@
|
||||
<sub> le {{ stack.created_at | date: 'short':'Europe/Paris':'fr_FR' }} </sub>
|
||||
</div>
|
||||
</td>
|
||||
<ng-container *ngFor="let item of poll.choices">
|
||||
<td *ngIf="!stackHasVotesForChoice(stack, item.id)"></td>
|
||||
<td
|
||||
*ngIf="stackHasVotesForChoice(stack, item.id)"
|
||||
class="stack-vote background-{{ getValue(stack, item.id) }}"
|
||||
>
|
||||
{{ getValue(stack, item.id) }}
|
||||
<ng-container *ngFor="let vote of stack.votes">
|
||||
<td *ngIf="vote.value" class="stack-vote background-{{ vote.value }}">
|
||||
{{ vote.choice_id }})
|
||||
{{ vote.value }}
|
||||
</td>
|
||||
</ng-container>
|
||||
</tr>
|
||||
|
Loading…
Reference in New Issue
Block a user