From b9494edd77e2d4086d5f77b55870b5d42ba5b2dc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lukas=20Mau=C3=9F?= <lukas.mauss@mni.thm.de>
Date: Mon, 28 Jan 2019 19:35:23 +0100
Subject: [PATCH] Add description-expansion-panel to participants room page

---
 .../room-participant-page.component.html        | 17 +++++++++++------
 .../room-participant-page.component.scss        |  5 +++++
 src/assets/i18n/participant/de.json             |  3 ++-
 src/assets/i18n/participant/en.json             |  3 ++-
 4 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/src/app/components/participant/room-participant-page/room-participant-page.component.html b/src/app/components/participant/room-participant-page/room-participant-page.component.html
index 852645373..7ea506d0a 100644
--- a/src/app/components/participant/room-participant-page/room-participant-page.component.html
+++ b/src/app/components/participant/room-participant-page/room-participant-page.component.html
@@ -8,26 +8,31 @@
       </mat-card-header>
       <mat-divider></mat-divider>
       <mat-card-content fxLayoutAlign="center">
-        <p>
-          {{ room.description }}
-        </p>
+        <mat-expansion-panel *ngIf="!room.description == ''" class="mat-elevation-z0">
+          <mat-expansion-panel-header>
+            <h4>{{ 'room-page.description' | translate }}</h4>
+          </mat-expansion-panel-header>
+          <p>
+            {{ room.description }}
+          </p>
+        </mat-expansion-panel>
       </mat-card-content>
       <mat-divider></mat-divider>
       <mat-grid-list cols="3" rowHeight="2:1">
         <mat-grid-tile>
-          <button mat-icon-button color="accent" matTooltip="{{ 'room-page.create-comment' | translate}}"
+          <button mat-icon-button color="primary" matTooltip="{{ 'room-page.create-comment' | translate}}"
                   routerLink="/participant/room/{{ room.id }}/create-comment">
             <mat-icon>question_answer</mat-icon>
           </button>
         </mat-grid-tile>
         <mat-grid-tile>
-          <button mat-icon-button color="accent" matTooltip="{{ 'room-page.give-feedback' | translate}}"
+          <button mat-icon-button color="primary" matTooltip="{{ 'room-page.give-feedback' | translate}}"
                   routerLink="/participant/room/{{ room.id }}/feedback-barometer">
             <mat-icon>thumbs_up_down</mat-icon>
           </button>
         </mat-grid-tile>
         <mat-grid-tile>
-          <button mat-icon-button color="accent" matTooltip="Lernstand"
+          <button mat-icon-button color="primary" matTooltip="Lernstand"
                   routerLink="/participant/room/{{ room.shortId }}/statistics">
             <mat-icon>insert_chart</mat-icon>
           </button>
diff --git a/src/app/components/participant/room-participant-page/room-participant-page.component.scss b/src/app/components/participant/room-participant-page/room-participant-page.component.scss
index 5753b0c5a..d4ccac48f 100644
--- a/src/app/components/participant/room-participant-page/room-participant-page.component.scss
+++ b/src/app/components/participant/room-participant-page/room-participant-page.component.scss
@@ -19,3 +19,8 @@ button {
   max-width: 30%;
   min-width: 30%;
 }
+
+mat-expansion-panel {
+  background-color: #fff8e1!important;
+  min-width: 200px;
+}
diff --git a/src/assets/i18n/participant/de.json b/src/assets/i18n/participant/de.json
index 56155b18b..39c6bf456 100644
--- a/src/assets/i18n/participant/de.json
+++ b/src/assets/i18n/participant/de.json
@@ -13,7 +13,8 @@
     "give-feedback": "Feedback geben",
     "live-feedback": "Live Feedback",
     "answer-statistics": "Statistiken",
-    "default-content-group": "Standard"
+    "default-content-group": "Standard",
+    "description": "Beschreibung"
   },
   "comment-page": {
     "enter-title": "Geben Sie einen Titel ein",
diff --git a/src/assets/i18n/participant/en.json b/src/assets/i18n/participant/en.json
index 9d9a97deb..0d3126785 100644
--- a/src/assets/i18n/participant/en.json
+++ b/src/assets/i18n/participant/en.json
@@ -13,7 +13,8 @@
     "give-feedback": "Give feedback",
     "live-feedback": "Live feedback",
     "answer-statistics": "Statistics",
-    "default-content-group": "Default"
+    "default-content-group": "Default",
+    "description": "Description"
   },
   "comment-page": {
     "enter-title": "Enter a title",
-- 
GitLab