From 60e6880659576d62b8004e83ea488d34c5a7be8f Mon Sep 17 00:00:00 2001
From: Hagen <hagen.dressler@mni.thm.de>
Date: Tue, 13 Mar 2018 12:57:41 +0100
Subject: [PATCH] Edit logic of component comment-list

---
 src/app/comment-list/comment-list.component.html | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/app/comment-list/comment-list.component.html b/src/app/comment-list/comment-list.component.html
index 53058da0a..aa36d3c01 100644
--- a/src/app/comment-list/comment-list.component.html
+++ b/src/app/comment-list/comment-list.component.html
@@ -7,14 +7,14 @@
 
             {{comment.body}}
 
-            <div class="body-buttons" *ngIf="userRole === userRoleTemp">
-              <button *ngIf="!comment.read" mat-fab color="warn" matTooltip="Is not read" (click)="setRead(comment)">
+            <div class="body-buttons">
+              <button *ngIf="!comment.read" mat-fab color="warn" matTooltip="Is not read" (click)="userRole === userRoleTemp && setRead(comment)">
                 <mat-icon>clear</mat-icon>
               </button>
-              <button *ngIf="comment.read" mat-fab color="primary" matTooltip="Is read" (click)="setRead(comment)">
+              <button *ngIf="comment.read" mat-fab color="primary" matTooltip="Is read" (click)="userRole === userRoleTemp && setRead(comment)">
                 <mat-icon>check</mat-icon>
               </button>
-              <button class="trash-icon" mat-fab color="primary" matTooltip="Delete" (click)="delete(comment)">
+              <button *ngIf="userRole === userRoleTemp" class="trash-icon" mat-fab color="primary" matTooltip="Delete" (click)="delete(comment)">
                 <mat-icon>delete</mat-icon>
               </button>
             </div>
-- 
GitLab