1 | <div *ngIf="!working">
|
---|
2 | <mat-card appHoverElevation class="margin-bottom-xl">
|
---|
3 | <mat-card-title>{{ question.title }}</mat-card-title>
|
---|
4 | <mat-card-subtitle
|
---|
5 | [innerHTML]="
|
---|
6 | 'question-preview-subtitle'
|
---|
7 | | translate
|
---|
8 | : {
|
---|
9 | createdOn: question.createdOn | momentDate: 'LLLL',
|
---|
10 | lastActive: question.lastActiveOn | momentDate: 'LLLL',
|
---|
11 | views: question.views
|
---|
12 | }
|
---|
13 | "
|
---|
14 | ></mat-card-subtitle>
|
---|
15 | <mat-card-content>
|
---|
16 | <mat-chip-list>
|
---|
17 | <mat-chip *ngFor="let category of question.categories">
|
---|
18 | {{ category.name }}
|
---|
19 | </mat-chip>
|
---|
20 | </mat-chip-list>
|
---|
21 |
|
---|
22 | <div class="margin-top-lg" [innerHTML]="question.text"></div>
|
---|
23 | <div class="align-right">
|
---|
24 | <app-student-card
|
---|
25 | [indexNumber]="question.student.index"
|
---|
26 | [imageUrl]="question.student.imageUrl"
|
---|
27 | [uid]="question.student.uid"
|
---|
28 | [reputation]="question.student.reputation"
|
---|
29 | [subtitle]="'question-asked-by-subtitle' | translate: { date: question.createdOn | momentDate: 'LL' }"
|
---|
30 | ></app-student-card>
|
---|
31 | </div>
|
---|
32 | </mat-card-content>
|
---|
33 | <mat-card-actions>
|
---|
34 | <app-button appShareLink [buttonType]="ButtonType.Basic">{{ 'share-link' | translate }}</app-button>
|
---|
35 | </mat-card-actions>
|
---|
36 | </mat-card>
|
---|
37 |
|
---|
38 | <h1 class="mat-headline">{{ 'question-answers' | translate: { answerCount: question.answers.length } }}</h1>
|
---|
39 | <mat-button-toggle-group>
|
---|
40 | <mat-button-toggle>{{ 'answer-sort-oldest' | translate }}</mat-button-toggle>
|
---|
41 | <mat-button-toggle>{{ 'answer-sort-votes' | translate }}</mat-button-toggle>
|
---|
42 | </mat-button-toggle-group>
|
---|
43 |
|
---|
44 | <ng-container *ngFor="let answer of question.answers">
|
---|
45 | <mat-card appHoverElevation class="margin-x-md">
|
---|
46 | <mat-card-content>
|
---|
47 | <div fxLayout="row wrap" fxLayoutAlign="space-around none">
|
---|
48 | <app-vote [voteCount]="answer.upvotesCount" [correct]="answer.correctAnswer" fxFlex="6%"></app-vote>
|
---|
49 | <div fxFlex="92%">
|
---|
50 | <div [innerHTML]="answer.text"></div>
|
---|
51 | <div class="align-right">
|
---|
52 | <app-student-card
|
---|
53 | [indexNumber]="answer.student.index"
|
---|
54 | [imageUrl]="answer.student.imageUrl"
|
---|
55 | [uid]="answer.student.uid"
|
---|
56 | [reputation]="answer.student.reputation"
|
---|
57 | [subtitle]="'question-answered-by-subtitle' | translate: { date: answer.createdOn | momentDate: 'LL' }"
|
---|
58 | ></app-student-card>
|
---|
59 | </div>
|
---|
60 |
|
---|
61 | <hr />
|
---|
62 | <div *ngFor="let answerResponse of answer.answerResponses">
|
---|
63 | {{ answerResponse.text }}
|
---|
64 | <mat-chip class="cursor" selected>{{ answerResponse.student.index }}</mat-chip> -
|
---|
65 | {{ answerResponse.createdOn | momentDate: 'LL' }}
|
---|
66 | <hr />
|
---|
67 | </div>
|
---|
68 | </div>
|
---|
69 | </div>
|
---|
70 | </mat-card-content>
|
---|
71 | <mat-card-actions> </mat-card-actions>
|
---|
72 | </mat-card>
|
---|
73 | </ng-container>
|
---|
74 | </div>
|
---|