From aa768b14c416d7b6c6bcce0880452162728d8065 Mon Sep 17 00:00:00 2001
From: Thomas Lenz <Thomas.Lenz@mni.thm.de>
Date: Thu, 15 Mar 2018 12:49:50 +0100
Subject: [PATCH] Implement creator's view

---
 .../creator-choice-content.component.html     | 45 +++++++++++++++++--
 .../creator-choice-content.component.scss     |  3 ++
 2 files changed, 45 insertions(+), 3 deletions(-)

diff --git a/src/app/creator-choice-content/creator-choice-content.component.html b/src/app/creator-choice-content/creator-choice-content.component.html
index 51cec6ad3..41b0944c3 100644
--- a/src/app/creator-choice-content/creator-choice-content.component.html
+++ b/src/app/creator-choice-content/creator-choice-content.component.html
@@ -1,3 +1,42 @@
-<p>
-  creator-choice-content works!
-</p>
+<div fxLayout="column" fxLayoutAlign="start" fxLayoutGap="20px" fxFill>
+  <div fxLayout="row" fxLayoutAlign="center">
+    <mat-card class="input-form" fxLayoutGap="20px">
+      <mat-card-header>
+        <mat-card-title>
+          <h3 class="subheading-2">{{ subject }}</h3>
+        </mat-card-title>
+        <mat-card-subtitle>
+          <div>
+            {{ body }}
+          </div>
+        </mat-card-subtitle>
+      </mat-card-header>
+      <mat-divider></mat-divider>
+      <mat-card-content>
+        <mat-list *ngFor="let answer of options; let i = index" [attr.data-index]="i">
+          <!-- <mat-checkbox color="primary">{{answer.label}}</mat-checkbox> -->
+          <div fxLayout="row">
+            <input matInput placeholder="Label" value="{{answer.label}}">
+            <input matInput placeholder="Points" value="{{answer.points}}">
+            <mat-checkbox color="primary" value="checked"></mat-checkbox>
+          </div>
+        </mat-list>
+        <mat-divider class="underListDivider"></mat-divider>
+        <h4>Add new answer:</h4>
+        <div fxLayout="row" fxLayoutGap="10px">
+          <mat-form-field>
+            <input [(ngModel)]="newLabel" matInput placeholder="Label" name="newLabel">
+          </mat-form-field>
+          <mat-form-field>
+            <input [(ngModel)]="newPoints" matInput placeholder="Points" name="newPoints">
+          </mat-form-field>
+          <mat-checkbox color="primary">Correct answer</mat-checkbox>
+        </div>
+      </mat-card-content>
+      <mat-card-actions fxLayoutAlign="center">
+        <button mat-raised-button color="primary" (click)="addAnswer()">Add answer</button>
+        <button mat-raised-button color="primary">Save content</button>
+      </mat-card-actions>
+    </mat-card>
+  </div>
+</div>
diff --git a/src/app/creator-choice-content/creator-choice-content.component.scss b/src/app/creator-choice-content/creator-choice-content.component.scss
index e69de29bb..f50ca6d2e 100644
--- a/src/app/creator-choice-content/creator-choice-content.component.scss
+++ b/src/app/creator-choice-content/creator-choice-content.component.scss
@@ -0,0 +1,3 @@
+.underListDivider{
+  margin-top: 10px;
+}
-- 
GitLab