Skip to content
Snippets Groups Projects
Commit 13d443a2 authored by Lukas Haase's avatar Lukas Haase
Browse files

add score tooltop for students, add up down votes for questionwall

parent 8815fe6a
No related merge requests found
This diff is collapsed.
......@@ -303,7 +303,7 @@
<span class="scoreCreator" matTooltip="{{
('comment-page.upvote' | translate) + ' ' + upvotes + ' | ' +
('comment-page.downvote' | translate) + ' ' + downvotes
}}">{{comment.score}}</span>
}}">{{score}}</span>
</div>
</div>
<ars-row #commentExpander
......@@ -426,7 +426,10 @@
[ngClass]="{'upVoted' : hasVoted === 1}">keyboard_arrow_up
</mat-icon>
</button>
<span class="score">{{comment.score}}</span>
<span class="score" matTooltip="{{
('comment-page.upvote' | translate) + ' ' + upvotes + ' | ' +
('comment-page.downvote' | translate) + ' ' + downvotes
}}">{{score}}</span>
<button mat-icon-button
(click)="voteDown(comment)"
*ngIf="!disabled"
......
......@@ -68,6 +68,7 @@ export class CommentComponent implements OnInit, AfterViewInit, OnDestroy {
voteInterval;
upvotes;
downvotes;
score;
constructor(protected authenticationService: AuthenticationService,
private route: ActivatedRoute,
......@@ -109,6 +110,7 @@ export class CommentComponent implements OnInit, AfterViewInit, OnDestroy {
this.commentService.getComment(this.comment.id).subscribe(e=>{
this.upvotes=e.upvotes;
this.downvotes=e.downvotes;
this.score=e.score;
});
}
},1000);
......
......@@ -142,10 +142,11 @@
<ars-col ars-btn-wrp [xp]="32" [extra]="true" class="questionwall-comment-btn">
<button ars-btn (click)="likeComment(commentFocus)" matRipple>
<i>thumb_up</i>
<p style="padding-left:22px;">{{commentFocus.comment.score}}</p>
<p style="padding-left:22px;">{{commentFocus.comment.upvotes}}</p>
</button>
<button ars-btn (click)="dislikeComment(commentFocus)" matRipple>
<i>thumb_down</i>
<p style="padding-left:22px;">{{commentFocus.comment.downvotes}}</p>
</button>
</ars-col>
<ars-fill></ars-fill>
......@@ -258,10 +259,11 @@
<ars-col ars-btn-wrp [xp]="16" [extra]="true" class="questionwall-comment-btn">
<button ars-btn (click)="likeComment(comment)" matRipple>
<i>thumb_up</i>
<p style="padding-left:4px;">{{comment.comment.score}}</p>
<p style="padding-left:4px;">{{comment.comment.upvotes}}</p>
</button>
<button ars-btn (click)="dislikeComment(comment)" matRipple>
<i>thumb_down</i>
<p style="padding-left:4px;">{{comment.comment.downvotes}}</p>
</button>
</ars-col>
<ars-fill (click)="focusComment(comment)" style="cursor:pointer"></ars-fill>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment