From 76a4f90449dcdf2de3d8a6e6e289420b6944aadc Mon Sep 17 00:00:00 2001 From: Philipp Sautner <philipp.sautner@mni.thm.de> Date: Wed, 24 Mar 2021 08:30:49 +0100 Subject: [PATCH] Changes filter options --- .../question-wall/question-wall.component.html | 11 ++++------- .../question-wall/question-wall.component.ts | 11 +++-------- src/assets/i18n/creator/de.json | 2 +- src/assets/i18n/participant/de.json | 2 +- src/assets/i18n/participant/en.json | 2 +- 5 files changed, 10 insertions(+), 18 deletions(-) diff --git a/src/app/components/shared/questionwall/question-wall/question-wall.component.html b/src/app/components/shared/questionwall/question-wall/question-wall.component.html index fd3184488..45aba22b7 100644 --- a/src/app/components/shared/questionwall/question-wall/question-wall.component.html +++ b/src/app/components/shared/questionwall/question-wall/question-wall.component.html @@ -22,13 +22,10 @@ <mat-icon class="star">grade</mat-icon> <span>{{'question-wall.filter-favorite' | translate}}</span> </button> - <button mat-menu-item (click)="filterApproved()" aria-labelledby="filter-lbl-approved"> - <mat-icon>done</mat-icon> - <span>{{'question-wall.filter-approved' | translate}}</span> - </button> - <button mat-menu-item (click)="filterDisapproved()" aria-labelledby="filter-lbl-disapproved"> - <mat-icon>clear</mat-icon> - <span>{{'question-wall.filter-disapproved' | translate}}</span> + + <button mat-menu-item (click)="filterBookmark()" aria-labelledby="filter-lbl-bookmark"> + <mat-icon>bookmark</mat-icon> + <span>{{'question-wall.filter-bookmark' | translate}}</span> </button> </mat-menu> <mat-menu #filterTagMenu> diff --git a/src/app/components/shared/questionwall/question-wall/question-wall.component.ts b/src/app/components/shared/questionwall/question-wall/question-wall.component.ts index bfa42e275..8e3123fe6 100644 --- a/src/app/components/shared/questionwall/question-wall/question-wall.component.ts +++ b/src/app/components/shared/questionwall/question-wall/question-wall.component.ts @@ -281,14 +281,9 @@ export class QuestionWallComponent implements OnInit, AfterViewInit, OnDestroy { x => x.comment.userNumber === user); } - filterApproved() { - this.filter('done', false, 'question-wall.filter-approved', '', - x => x.comment.correct === CorrectWrong.CORRECT); - } - - filterDisapproved() { - this.filter('block', false, 'question-wall.filter-disapproved', '', - x => x.comment.correct === CorrectWrong.WRONG); + filterBookmark() { + this.filter('bookmark', false, 'question-wall.filter-bookmark', '', + x => x.comment.bookmark); } filterTag(tag: string) { diff --git a/src/assets/i18n/creator/de.json b/src/assets/i18n/creator/de.json index 945f7c060..0e25e30e2 100644 --- a/src/assets/i18n/creator/de.json +++ b/src/assets/i18n/creator/de.json @@ -37,7 +37,7 @@ "filter-comments": "Fragen filtern", "filter-correct": "Bejahte Fragen", "filter-favorite": "Ausgezeichnete Fragen", - "filter-bookmark": "Lesezeichen", + "filter-bookmark": "Markierte Fragen", "filter-owner": "Meine Fragen", "filter-read": "Besprochene Fragen", "filter-reset": "Zurücksetzen", diff --git a/src/assets/i18n/participant/de.json b/src/assets/i18n/participant/de.json index 1fec06b0e..6e42c1227 100644 --- a/src/assets/i18n/participant/de.json +++ b/src/assets/i18n/participant/de.json @@ -163,7 +163,7 @@ "sort-old": "Älteste", "filter-user": "User", "filter-favorite": "Favoriten", - "filter-bookmark": "Merken", + "filter-bookmark": "Lesezeichen", "filter-approved": "Bejaht", "filter-disapproved": "Verneint", "filter-remove": "Filter entfernen", diff --git a/src/assets/i18n/participant/en.json b/src/assets/i18n/participant/en.json index cd890b9b5..1ca9ef9a0 100644 --- a/src/assets/i18n/participant/en.json +++ b/src/assets/i18n/participant/en.json @@ -171,7 +171,7 @@ "sort-old": "Oldest", "filter-user": "User", "filter-favorite": "Favorites", - "filter-bookmarked": "Bookmarked", + "filter-bookmark": "Bookmarked", "filter-approved": "Affirmed", "filter-disapproved": "Negated", "filter-remove": "Remove Filter", -- GitLab