From 4d6a3917292c6eaef4340c5580ad541fad103384 Mon Sep 17 00:00:00 2001 From: Klaus Quibeldey-Cirkel <klaus.quibeldey-cirkel@mni.thm.de> Date: Mon, 19 Apr 2021 12:42:49 +0200 Subject: [PATCH] reduce options according to context --- .../shared/header/header.component.html | 46 +++++++++++++------ src/assets/i18n/creator/de.json | 4 +- src/assets/i18n/creator/en.json | 8 ++-- src/assets/i18n/home/de.json | 1 + src/assets/i18n/home/en.json | 1 + 5 files changed, 40 insertions(+), 20 deletions(-) diff --git a/src/app/components/shared/header/header.component.html b/src/app/components/shared/header/header.component.html index 0b563ffb9..2b33e587d 100644 --- a/src/app/components/shared/header/header.component.html +++ b/src/app/components/shared/header/header.component.html @@ -65,13 +65,25 @@ <!-- Moderator board / index --> - <ng-container *ngIf="router.url.endsWith('/moderator/comments')"> + <ng-container *ngIf="user && user.role > 0 && (router.url.endsWith('/moderator/comments') || router.url.includes('/comment/'))"> + + <button mat-menu-item + tabindex="0" + routerLink="creator/room/{{shortId}}/comments"> + <mat-icon> + forum + </mat-icon> + <span>{{'header.back-to-questionboard' | translate}}</span> + </button> + + </ng-container> + + <ng-container *ngIf="user && user.role == 0 && router.url.includes('/comment/')"> <button mat-menu-item tabindex="0" routerLink="participant/room/{{shortId}}/comments"> - <mat-icon - matTooltip="{{ 'header.back-to-questionboard' | translate }}"> + <mat-icon> forum </mat-icon> <span>{{'header.back-to-questionboard' | translate}}</span> @@ -83,11 +95,10 @@ <ng-container *ngIf="router.url.endsWith('/comments')"> <button mat-menu-item - *ngIf="user && user.role > 0 && !router.url.endsWith('moderator/comments')" + *ngIf="user && !router.url.endsWith('moderator/comments')" tabindex="0" (click)="navigateCreateQuestion();"> - <mat-icon - matTooltip="{{ 'header.create-question' | translate }}"> + <mat-icon> add </mat-icon> <span>{{'header.create-question' | translate}}</span> @@ -95,13 +106,22 @@ <ng-container *ngIf="user && user.role > 0"> + <button mat-menu-item + tabindex="0" + *ngIf="user && user.role > 0 && !router.url.includes('/participant/') && !router.url.endsWith('moderator/comments')" + routerLink="moderator/room/{{shortId}}/moderator/comments"> + <mat-icon> + visibility_off + </mat-icon> + <span>{{'header.moderationboard' | translate}}</span> + </button> + <button mat-menu-item tabindex="0" *ngIf="deviceType !== 'mobile' && !router.url.includes('/participant/')" routerLink="participant/room/{{shortId}}/comments/questionwall"> <mat-icon - svgIcon="beamer" - matTooltip="{{ 'header.questionwall-title' | translate }}"> + svgIcon="beamer"> comment </mat-icon> <span>{{'header.questionwall' | translate}}</span> @@ -135,7 +155,7 @@ </ng-container> <!-- Session --> - <ng-container *ngIf="!router.url.endsWith('/comments')"> + <ng-container *ngIf="!router.url.endsWith('/comments') && !router.url.includes('/comment/')"> <!-- app-room-participant-page --> <ng-container *ngIf="router.url.includes('/participant/room/')"> @@ -176,7 +196,7 @@ <!-- Room General Options - bot --> - <ng-container *ngIf="user && user.role > 0 && !router.url.includes('/participant')"> + <ng-container *ngIf="user && user.role > 0 && !router.url.includes('/participant') && !router.url.includes('/comment/')" > <button mat-menu-item *ngIf="user" @@ -197,12 +217,10 @@ </ng-container> <button mat-menu-item - *ngIf="user && user.role > 0" + *ngIf="user && user.role > 0 && !router.url.includes('/comment/')" tabindex="0" (click)="showQRDialog();"> - <mat-icon svgIcon="qrcode" - class="header-icons qrcode" - matTooltip="{{ 'header.QR' | translate }}"> + <mat-icon svgIcon="qrcode"> </mat-icon> <span>{{'header.room-qr' | translate}}</span> </button> diff --git a/src/assets/i18n/creator/de.json b/src/assets/i18n/creator/de.json index 14bc91055..47daf7137 100644 --- a/src/assets/i18n/creator/de.json +++ b/src/assets/i18n/creator/de.json @@ -132,7 +132,7 @@ "live-announcer-moderation": "Du befindest dich jetzt auf der Moderations-Seite. Um Informationen zu Tastenkombinationen zu erhalten drücke jetzt die Enter-Taste oder rufe die Ansage zu einem späteren Zeitpunkt mit der Escape-Taste auf.", "Markdown-hint": "Formatiere mit Markdown", "mark-correct": "Frage bejahen", - "mark-favorite": "Frage mit einem Stern markieren", + "mark-favorite": "Frage für einen Bonus markieren", "mark-bookmark": "Lesezeichen setzen", "mark-not-correct": "Markierung zurücknehmen", "mark-not-favorite": "Stern zurücknehmen", @@ -166,7 +166,7 @@ "edit-wrong-reset": "Markierung zurücksetzen", "edit-answer-create": "Beantworten / Kommentieren", "edit-answer-edit": "Antwort anzeigen / bearbeiten", - "edit-favorite": "Als interessant markieren", + "edit-favorite": "Für einen Bonus markieren", "edit-favorite-reset": "Markierung zurücksetzen", "edit-bookmark": "Lesezeichen setzen", "edit-bookmark-reset": "Markierung zurücksetzen" diff --git a/src/assets/i18n/creator/en.json b/src/assets/i18n/creator/en.json index 71480a239..4dbb3d550 100644 --- a/src/assets/i18n/creator/en.json +++ b/src/assets/i18n/creator/en.json @@ -101,7 +101,7 @@ "a11y-text_textForOneVote": "One Vote", "a11y-text_textForVotes": "Votes", "a11y-text_wrong": "The question was answered in the negative.", - "fullscreen": "Click for full view.", + "fullscreen": "Answer or comment question", "abort": "Cancel", "acknowledge": "Moves the question back to the public list", "your-answer": "Your answer", @@ -112,7 +112,7 @@ "delete-answer": "Delete", "really-delete-answer": "Do you really want to delete this answer?", "answer-deleted": "Answer has been deleted.", - "has-answer": "You have commented on the question.", + "has-answer": "You have answered the question. Click here to view or change your answer.", "ask-question-description": "Enter your question or message to the audience …", "cancel": "Cancel", "cancel-description": "Cancel", @@ -133,7 +133,7 @@ "live-announcer-moderation": "You are now on the moderation page. To get information about key combinations press the Enter key or call the announcement later with the Escape key.", "Markdown-hint": "Format with Markdown", "mark-correct": "Mark as correct", - "mark-favorite": "Mark as particularly interesting", + "mark-favorite": "Mark for bonus", "mark-bookmark": "Bookmark", "mark-not-correct": "Unmark", "mark-not-favorite": "Unmark", @@ -167,7 +167,7 @@ "edit-wrong-reset": "Remove marker", "edit-answer-create": "Answer or comment question", "edit-answer-edit": "View or edit answer", - "edit-favorite": "Mark as particularly interesting", + "edit-favorite": "Mark for bonus", "edit-favorite-reset": "Remove marker", "edit-bookmark": "Bookmark", "edit-bookmark-reset": "Remove marker" diff --git a/src/assets/i18n/home/de.json b/src/assets/i18n/home/de.json index c19745931..61dbdaed1 100644 --- a/src/assets/i18n/home/de.json +++ b/src/assets/i18n/home/de.json @@ -79,6 +79,7 @@ "export-questions": "Fragen speichern", "delete-questions": "Fragen löschen", "back-to-questionboard": "Fragenboard", + "moderationboard": "Zum Index", "create-question": "Frage stellen", "questionwall": "Fragenwand", "fullscreen": "Vollansicht", diff --git a/src/assets/i18n/home/en.json b/src/assets/i18n/home/en.json index 0765a4885..49407d991 100644 --- a/src/assets/i18n/home/en.json +++ b/src/assets/i18n/home/en.json @@ -80,6 +80,7 @@ "export-questions": "Save questions", "delete-questions": "Delete questions", "back-to-questionboard": "Question board", + "moderationboard": "To the index", "create-question": "Ask a question", "questionwall": "Question wall", "fullscreen": "Fullscreen", -- GitLab