|
1 | | -<mat-card class="discussion-post"> |
2 | | - <div class="discussion-post__contents"> |
3 | | - <div fxLayout="row" fxLayoutAlign="start center"> |
4 | | - <div class="discussion-post__avatar"> |
5 | | - <mat-icon class="md-48" |
6 | | - style="color: {{getAvatarColorForWorkgroupId(response.workgroupId)}};"> |
7 | | - account_circle |
8 | | - </mat-icon> |
9 | | - </div> |
10 | | - <div flex> |
11 | | - <div class="discussion-post__user">{{ response.usernames }}</div> |
12 | | - <div class="discussion-post__date"> |
13 | | - <span class="component__actions__more" |
| 1 | +<mat-card class="class-response"> |
| 2 | + <div class="contents"> |
| 3 | + <div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px"> |
| 4 | + <mat-icon class="md-48" |
| 5 | + style="color: {{getAvatarColorForWorkgroupId(response.workgroupId)}};"> |
| 6 | + account_circle |
| 7 | + </mat-icon> |
| 8 | + <div> |
| 9 | + <div class="mat-body-2">{{ response.usernames }}</div> |
| 10 | + <div class="mat-caption secondary-text"> |
| 11 | + <span class="more-info" |
14 | 12 | matTooltip="{{adjustClientSaveTime(response.serverSaveTime) | amDateFormat:'ddd, MMM D YYYY, h:mm a'}}" |
15 | 13 | matTooltipPosition="right"> |
16 | 14 | {{ adjustClientSaveTime(response.serverSaveTime) | amTimeAgo }} |
17 | 15 | </span> |
18 | 16 | </div> |
19 | 17 | </div> |
20 | 18 | </div> |
21 | | - <div class="discussion-post__content" |
| 19 | + <div class="post" |
22 | 20 | [innerHTML]="response.studentData.responseTextHTML"> |
23 | 21 | </div> |
24 | 22 | <img *ngFor="let attachment of response.studentData.attachments" |
25 | | - [src]="attachment.iconURL" alt="Image" class="discussion-post__attachment" /> |
| 23 | + [src]="attachment.iconURL" |
| 24 | + i18n-alt |
| 25 | + alt="Post attachment" |
| 26 | + class="attachment" /> |
26 | 27 | <div fxLayoutAlign="end center" *ngIf="mode === 'grading' || mode === 'gradingRevision'"> |
27 | 28 | <br /> |
28 | 29 | <button |
29 | 30 | *ngIf="response.latestInappropriateFlagAnnotation == null || response.latestInappropriateFlagAnnotation.data == null || response.latestInappropriateFlagAnnotation.data.action != 'Delete'" |
30 | 31 | mat-raised-button |
31 | | - class="delete-button" |
| 32 | + class="warn" |
32 | 33 | (click)="delete(response)" |
33 | 34 | matTooltip="Delete this post so students will not see it" |
34 | 35 | matTooltipPosition="above" |
|
39 | 40 | <button |
40 | 41 | *ngIf="response.latestInappropriateFlagAnnotation != null && response.latestInappropriateFlagAnnotation.data.action === 'Delete'" |
41 | 42 | mat-raised-button |
42 | | - class="delete-button" |
| 43 | + class="warn" |
43 | 44 | (click)="undoDelete(response)" |
44 | 45 | matTooltip="Make this post viewable to students" |
45 | 46 | matTooltipPosition="above" |
|
50 | 51 | </div> |
51 | 52 | </div> |
52 | 53 | <mat-divider *ngIf="mode === 'student' || response.replies.length > 0"></mat-divider> |
53 | | - <div class="discussion-comments"> |
54 | | - <div class="discussion-comments__contents" *ngIf="response.replies.length > 0"> |
55 | | - <div class="discussion-comments__header" matSubheader> |
56 | | - <span *ngIf="response.replies.length === 1" i18n> |
57 | | - Comments ({{ response.replies.length }}) |
58 | | - </span> |
59 | | - <a *ngIf="response.replies.length > 1" |
60 | | - (click)="toggleExpanded()" |
61 | | - fxLayoutAlign="start center"> |
62 | | - <span i18n>Comments ({{ response.replies.length }})</span> |
63 | | - <mat-icon>{{expanded ? "expand_less" : "expand_more"}}</mat-icon> |
64 | | - </a> |
65 | | - </div> |
66 | | - <mat-list class="discussion-comments__list"> |
67 | | - <mat-list-item class="discussion-reply" [ngClass]="{'animate-show': !isLast}" |
68 | | - *ngFor="let reply of repliesToShow"> |
69 | | - <div class="discussion-post__avatar--reply discussion-post__avatar"> |
70 | | - <mat-icon class="mat-24" |
71 | | - style="color: {{getAvatarColorForWorkgroupId(reply.workgroupId)}}"> |
72 | | - account_circle |
73 | | - </mat-icon> |
74 | | - </div> |
75 | | - <div class="discussion-reply__details"> |
76 | | - <h3 class="discussion-post__user discussion-post__user--reply"> |
77 | | - {{ reply.usernames }} |
78 | | - <span class="discussion-post__date discussion-post__date--reply component__actions__more" |
79 | | - matTooltip="{{adjustClientSaveTime(reply.serverSaveTime) | amDateFormat:'ddd, MMM D YYYY, h:mm a'}}" |
80 | | - matTooltipPosition="right"> |
81 | | - {{ adjustClientSaveTime(reply.serverSaveTime) | amTimeAgo }} |
82 | | - </span> |
83 | | - </h3> |
84 | | - <div class="discusstion-reply__content" |
85 | | - [innerHTML]="reply.studentData.responseHTML"> |
86 | | - </div> |
87 | | - </div> |
88 | | - <div fxFlex></div> |
89 | | - <div *ngIf="mode === 'grading' || mode === 'gradingRevision'"> |
90 | | - <button |
91 | | - *ngIf="(response.latestInappropriateFlagAnnotation == null || response.latestInappropriateFlagAnnotation.data.action !== 'Delete') && (reply.latestInappropriateFlagAnnotation == null || reply.latestInappropriateFlagAnnotation.data.action != 'Delete')" |
92 | | - mat-raised-button |
93 | | - class="delete-button" |
94 | | - (click)="delete(reply)" |
95 | | - matTooltip="Delete this post so students will not see it" |
96 | | - matTooltipPosition="above" |
97 | | - i18n> |
98 | | - Delete |
99 | | - </button> |
100 | | - <span |
101 | | - *ngIf="response.latestInappropriateFlagAnnotation != null && response.latestInappropriateFlagAnnotation.data.action === 'Delete'" |
102 | | - class="parent-deleted-message" |
103 | | - matTooltip="Students will not see this post" |
104 | | - matTooltipPosition="above" |
105 | | - i18n-matTooltip |
106 | | - i18n> |
107 | | - Parent Deleted |
108 | | - </span> |
109 | | - <button |
110 | | - *ngIf="reply.latestInappropriateFlagAnnotation != null && reply.latestInappropriateFlagAnnotation.data.action === 'Delete'" |
111 | | - mat-raised-button |
112 | | - class="delete-button" |
113 | | - (click)="undoDelete(reply)" |
114 | | - matTooltip="Make this post viewable to students" |
115 | | - matTooltipPosition="above" |
116 | | - i18n> |
117 | | - Undo Delete |
118 | | - </button> |
119 | | - </div> |
120 | | - </mat-list-item> |
121 | | - </mat-list> |
122 | | - <mat-divider></mat-divider> |
123 | | - </div> |
124 | | - <div class="discussion-new-reply" fxLayout="row" |
125 | | - *ngIf="mode === 'student' && !isdisabled"> |
126 | | - <div class="input-container discussion-new-reply__input-container"> |
127 | | - <textarea |
128 | | - class="input--textarea discussion-reply__input" |
129 | | - [(ngModel)]="response.replyText" |
130 | | - (keyup)="replyEntered($event)" |
131 | | - placeholder="Add Comment" |
132 | | - i18n-placeholder |
133 | | - aria-label="Add Comment" |
134 | | - i18n-aria-label |
135 | | - cdkTextareaAutosize> |
136 | | - </textarea> |
137 | | - </div> |
| 54 | + <div class="notice-bg-bg" *ngIf="response.replies.length > 0"> |
| 55 | + <div class="comments-header" matSubheader> |
| 56 | + <span *ngIf="response.replies.length === 1" i18n> |
| 57 | + Comments ({{ response.replies.length }}) |
| 58 | + </span> |
| 59 | + <a *ngIf="response.replies.length > 1" |
| 60 | + [routerLink]="" |
| 61 | + (click)="toggleExpanded()" |
| 62 | + fxLayoutAlign="start center"> |
| 63 | + <span i18n>Comments ({{ response.replies.length }})</span> |
| 64 | + <mat-icon>{{expanded ? "expand_less" : "expand_more"}}</mat-icon> |
| 65 | + </a> |
138 | 66 | </div> |
| 67 | + <mat-list class="comments"> |
| 68 | + <mat-list-item [ngClass]="{'animate-show': !isLast}" |
| 69 | + *ngFor="let reply of repliesToShow"> |
| 70 | + <mat-icon matListAvatar |
| 71 | + class="mat-40" |
| 72 | + style="color: {{getAvatarColorForWorkgroupId(reply.workgroupId)}}"> |
| 73 | + account_circle |
| 74 | + </mat-icon> |
| 75 | + <h3 matLine> |
| 76 | + <span class="mat-body-2">{{ reply.usernames }}</span> |
| 77 | + <span class="more-info secondary-text mat-caption" |
| 78 | + matTooltip="{{adjustClientSaveTime(reply.serverSaveTime) | amDateFormat:'ddd, MMM D YYYY, h:mm a'}}" |
| 79 | + matTooltipPosition="right"> |
| 80 | + {{ adjustClientSaveTime(reply.serverSaveTime) | amTimeAgo }} |
| 81 | + </span> |
| 82 | + </h3> |
| 83 | + <p matLine [innerHTML]="reply.studentData.responseHTML"></p> |
| 84 | + <div fxFlex></div> |
| 85 | + <div *ngIf="mode === 'grading' || mode === 'gradingRevision'"> |
| 86 | + <button |
| 87 | + *ngIf="(response.latestInappropriateFlagAnnotation == null || response.latestInappropriateFlagAnnotation.data.action !== 'Delete') && (reply.latestInappropriateFlagAnnotation == null || reply.latestInappropriateFlagAnnotation.data.action != 'Delete')" |
| 88 | + mat-raised-button |
| 89 | + class="warn" |
| 90 | + (click)="delete(reply)" |
| 91 | + i18n-matTooltip |
| 92 | + matTooltip="Delete this post so students will not see it" |
| 93 | + matTooltipPosition="above" |
| 94 | + i18n> |
| 95 | + Delete |
| 96 | + </button> |
| 97 | + <span |
| 98 | + *ngIf="response.latestInappropriateFlagAnnotation != null && response.latestInappropriateFlagAnnotation.data.action === 'Delete'" |
| 99 | + class="warn" |
| 100 | + i18n-matTooltip |
| 101 | + matTooltip="Students will not see this post" |
| 102 | + matTooltipPosition="above" |
| 103 | + i18n> |
| 104 | + Parent Deleted |
| 105 | + </span> |
| 106 | + <button |
| 107 | + *ngIf="reply.latestInappropriateFlagAnnotation != null && reply.latestInappropriateFlagAnnotation.data.action === 'Delete'" |
| 108 | + mat-raised-button |
| 109 | + class="warn" |
| 110 | + (click)="undoDelete(reply)" |
| 111 | + i18n-matTooltip |
| 112 | + matTooltip="Make this post viewable to students" |
| 113 | + matTooltipPosition="above" |
| 114 | + i18n> |
| 115 | + Undo Delete |
| 116 | + </button> |
| 117 | + </div> |
| 118 | + </mat-list-item> |
| 119 | + </mat-list> |
| 120 | + <mat-divider></mat-divider> |
| 121 | + </div> |
| 122 | + <div class="new-reply" fxLayout="row" |
| 123 | + *ngIf="mode === 'student' && !isdisabled"> |
| 124 | + <textarea class="new-reply-input" |
| 125 | + [(ngModel)]="response.replyText" |
| 126 | + (keyup)="replyEntered($event)" |
| 127 | + placeholder="Add Comment" |
| 128 | + i18n-placeholder |
| 129 | + aria-label="Add Comment" |
| 130 | + i18n-aria-label |
| 131 | + cdkTextareaAutosize> |
| 132 | + </textarea> |
139 | 133 | </div> |
140 | 134 | </mat-card> |
0 commit comments