Skip to content

Commit abd1e9f

Browse files
committed
Updated ClassResponse html and styles; moved css to component. #2948
1 parent 9786664 commit abd1e9f

12 files changed

Lines changed: 198 additions & 286 deletions

File tree

src/main/webapp/site/src/messages.xlf

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5593,35 +5593,50 @@
55935593
<context context-type="linenumber">4</context>
55945594
</context-group>
55955595
</trans-unit>
5596+
<trans-unit datatype="html" id="f1affa088d785794802225dbc56ee2ff3d785f87">
5597+
<source>Post attachment</source>
5598+
<context-group purpose="location">
5599+
<context context-type="sourcefile">../../wise5/components/discussion/class-response/class-response.component.html</context>
5600+
<context context-type="linenumber">25</context>
5601+
</context-group>
5602+
</trans-unit>
55965603
<trans-unit datatype="html" id="d7acc4c320f2cec1d3d4e86dfa25ac5f5e6783b9">
55975604
<source> Delete </source>
55985605
<context-group purpose="location">
55995606
<context context-type="sourcefile">../../wise5/components/discussion/class-response/class-response.component.html</context>
5600-
<context context-type="linenumber">36</context>
5607+
<context context-type="linenumber">37</context>
56015608
</context-group>
56025609
</trans-unit>
56035610
<trans-unit datatype="html" id="f524c5795e54443e0f5c72ab2a19075cc9718bea">
56045611
<source>Delete this post so students will not see it</source>
56055612
<context-group purpose="location">
56065613
<context context-type="sourcefile">../../wise5/components/discussion/class-response/class-response.component.html</context>
5607-
<context context-type="linenumber">33</context>
5614+
<context context-type="linenumber">34</context>
5615+
</context-group>
5616+
<context-group purpose="location">
5617+
<context context-type="sourcefile">../../wise5/components/discussion/class-response/class-response.component.html</context>
5618+
<context context-type="linenumber">92</context>
56085619
</context-group>
56095620
</trans-unit>
56105621
<trans-unit datatype="html" id="d7f72f04c70b2b96fbd7fe3141ac1d37180cd293">
56115622
<source> Undo Delete </source>
56125623
<context-group purpose="location">
56135624
<context context-type="sourcefile">../../wise5/components/discussion/class-response/class-response.component.html</context>
5614-
<context context-type="linenumber">47</context>
5625+
<context context-type="linenumber">48</context>
56155626
</context-group>
56165627
</trans-unit>
56175628
<trans-unit datatype="html" id="36ef0871b0f11b13ec0c34610f695b32a85f0bdf">
56185629
<source>Make this post viewable to students</source>
56195630
<context-group purpose="location">
56205631
<context context-type="sourcefile">../../wise5/components/discussion/class-response/class-response.component.html</context>
5621-
<context context-type="linenumber">44</context>
5632+
<context context-type="linenumber">45</context>
5633+
</context-group>
5634+
<context-group purpose="location">
5635+
<context context-type="sourcefile">../../wise5/components/discussion/class-response/class-response.component.html</context>
5636+
<context context-type="linenumber">112</context>
56225637
</context-group>
56235638
</trans-unit>
5624-
<trans-unit datatype="html" id="16e248e3afa08f186eb693c218786aef600454fe">
5639+
<trans-unit datatype="html" id="44f8132ed48105af852b8d21db511dfc43914bea">
56255640
<source> Comments (<x equiv-text="{{ response.replies.length }}" id="INTERPOLATION"/>) </source>
56265641
<context-group purpose="location">
56275642
<context context-type="sourcefile">../../wise5/components/discussion/class-response/class-response.component.html</context>
@@ -5632,46 +5647,46 @@
56325647
<source>Comments (<x equiv-text="{{ response.replies.length }}" id="INTERPOLATION"/>)</source>
56335648
<context-group purpose="location">
56345649
<context context-type="sourcefile">../../wise5/components/discussion/class-response/class-response.component.html</context>
5635-
<context context-type="linenumber">62</context>
5650+
<context context-type="linenumber">63</context>
56365651
</context-group>
56375652
</trans-unit>
5638-
<trans-unit datatype="html" id="a3cf13c419f9f37a2b338ed0617d72137051b910">
5653+
<trans-unit datatype="html" id="7aafd81526e4dbfbfe16413c3e1350f66939ec96">
56395654
<source> Delete </source>
56405655
<context-group purpose="location">
56415656
<context context-type="sourcefile">../../wise5/components/discussion/class-response/class-response.component.html</context>
5642-
<context context-type="linenumber">97</context>
5657+
<context context-type="linenumber">94</context>
56435658
</context-group>
56445659
</trans-unit>
5645-
<trans-unit datatype="html" id="f1eaf1ba5c96f5aea47d2d3067eeeb32120831fc">
5660+
<trans-unit datatype="html" id="02c1d5b1e28ebc2ffda15aefc9e8f281bb2d8b46">
56465661
<source> Parent Deleted </source>
56475662
<context-group purpose="location">
56485663
<context context-type="sourcefile">../../wise5/components/discussion/class-response/class-response.component.html</context>
5649-
<context context-type="linenumber">106</context>
5664+
<context context-type="linenumber">103</context>
56505665
</context-group>
56515666
</trans-unit>
56525667
<trans-unit datatype="html" id="49ab78663d368b2e86c7b44c46e10636f5c0d6eb">
56535668
<source>Students will not see this post</source>
56545669
<context-group purpose="location">
56555670
<context context-type="sourcefile">../../wise5/components/discussion/class-response/class-response.component.html</context>
5656-
<context context-type="linenumber">103</context>
5671+
<context context-type="linenumber">101</context>
56575672
</context-group>
56585673
</trans-unit>
5659-
<trans-unit datatype="html" id="e76562563d96af320c4b1278cf8e35c8a02ab58b">
5674+
<trans-unit datatype="html" id="df53535d31be0673e662796139ade095bd430358">
56605675
<source> Undo Delete </source>
56615676
<context-group purpose="location">
56625677
<context context-type="sourcefile">../../wise5/components/discussion/class-response/class-response.component.html</context>
5663-
<context context-type="linenumber">116</context>
5678+
<context context-type="linenumber">114</context>
56645679
</context-group>
56655680
</trans-unit>
56665681
<trans-unit datatype="html" id="73c0a017e42353ac091f4a487c3d9ada970c7dce">
56675682
<source>Add Comment</source>
56685683
<context-group purpose="location">
56695684
<context context-type="sourcefile">../../wise5/components/discussion/class-response/class-response.component.html</context>
5670-
<context context-type="linenumber">131</context>
5685+
<context context-type="linenumber">127</context>
56715686
</context-group>
56725687
<context-group purpose="location">
56735688
<context context-type="sourcefile">../../wise5/components/discussion/class-response/class-response.component.html</context>
5674-
<context context-type="linenumber">133</context>
5689+
<context context-type="linenumber">129</context>
56755690
</context-group>
56765691
</trans-unit>
56775692
<trans-unit datatype="html" id="74b04b602d4148d1cb5de4da90c0e91ec9bae5ac">

src/main/webapp/site/src/style/themes/_apps.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,6 @@ $subhead-font-size-base: rem(1.600) !default;
9393
font-weight: 700;
9494
}
9595

96-
.more-info {
97-
border-bottom: 1px dotted;
98-
font-style: italic;
99-
}
100-
10196
.more {
10297
display: inline-block;
10398
}
Lines changed: 96 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,35 @@
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"
1412
matTooltip="{{adjustClientSaveTime(response.serverSaveTime) | amDateFormat:'ddd, MMM D YYYY, h:mm a'}}"
1513
matTooltipPosition="right">
1614
{{ adjustClientSaveTime(response.serverSaveTime) | amTimeAgo }}
1715
</span>
1816
</div>
1917
</div>
2018
</div>
21-
<div class="discussion-post__content"
19+
<div class="post"
2220
[innerHTML]="response.studentData.responseTextHTML">
2321
</div>
2422
<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" />
2627
<div fxLayoutAlign="end center" *ngIf="mode === 'grading' || mode === 'gradingRevision'">
2728
<br />
2829
<button
2930
*ngIf="response.latestInappropriateFlagAnnotation == null || response.latestInappropriateFlagAnnotation.data == null || response.latestInappropriateFlagAnnotation.data.action != 'Delete'"
3031
mat-raised-button
31-
class="delete-button"
32+
class="warn"
3233
(click)="delete(response)"
3334
matTooltip="Delete this post so students will not see it"
3435
matTooltipPosition="above"
@@ -39,7 +40,7 @@
3940
<button
4041
*ngIf="response.latestInappropriateFlagAnnotation != null && response.latestInappropriateFlagAnnotation.data.action === 'Delete'"
4142
mat-raised-button
42-
class="delete-button"
43+
class="warn"
4344
(click)="undoDelete(response)"
4445
matTooltip="Make this post viewable to students"
4546
matTooltipPosition="above"
@@ -50,91 +51,84 @@
5051
</div>
5152
</div>
5253
<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>
13866
</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>&nbsp;
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>
139133
</div>
140134
</mat-card>

0 commit comments

Comments
 (0)