From 0a56f6b7d1a55c91df6bb943bab0add65468f76c Mon Sep 17 00:00:00 2001
From: Lukas Kimpel <lukas.kimpel@mni.thm.de>
Date: Thu, 15 Mar 2018 19:11:49 +0100
Subject: [PATCH] Add component to view all contents of a room on participant
 side

---
 ...ipant-content-carousel-page.component.html | 18 +++++++++++++
 ...ipant-content-carousel-page.component.scss |  8 ++++++
 ...nt-content-carousel-page.component.spec.ts | 25 +++++++++++++++++++
 ...icipant-content-carousel-page.component.ts | 21 ++++++++++++++++
 4 files changed, 72 insertions(+)
 create mode 100644 src/app/participant-content-carousel-page/participant-content-carousel-page.component.html
 create mode 100644 src/app/participant-content-carousel-page/participant-content-carousel-page.component.scss
 create mode 100644 src/app/participant-content-carousel-page/participant-content-carousel-page.component.spec.ts
 create mode 100644 src/app/participant-content-carousel-page/participant-content-carousel-page.component.ts

diff --git a/src/app/participant-content-carousel-page/participant-content-carousel-page.component.html b/src/app/participant-content-carousel-page/participant-content-carousel-page.component.html
new file mode 100644
index 000000000..36032502c
--- /dev/null
+++ b/src/app/participant-content-carousel-page/participant-content-carousel-page.component.html
@@ -0,0 +1,18 @@
+<div fxLayout="column" fxLayoutAlign="start" fxLayoutGap="20px" fxFill>
+  <div fxLayout="row" fxLayoutAlign="center">
+    <mat-tab-group>
+      <!--
+      <mat-tab *ngFor="let content of contents">
+        <app-participant-choice-content *ngIf="content.format === ContentType.CHOICE"></app-participant-choice-content>
+        <app-participant-text-content *ngIf="content.format === ContentType.TEXT"></app-participant-text-content>
+      </mat-tab>
+      -->
+      <mat-tab label="Text">
+        <app-participant-text-content></app-participant-text-content>
+      </mat-tab>
+      <mat-tab label="Choice">
+        <app-participant-choice-content></app-participant-choice-content>
+      </mat-tab>
+    </mat-tab-group>
+  </div>
+</div>
diff --git a/src/app/participant-content-carousel-page/participant-content-carousel-page.component.scss b/src/app/participant-content-carousel-page/participant-content-carousel-page.component.scss
new file mode 100644
index 000000000..c006b4cc9
--- /dev/null
+++ b/src/app/participant-content-carousel-page/participant-content-carousel-page.component.scss
@@ -0,0 +1,8 @@
+mat-tab-group {
+  width: 100%;
+  max-width: 800px;
+}
+
+mat-tab-body {
+  padding: 20px;
+}
diff --git a/src/app/participant-content-carousel-page/participant-content-carousel-page.component.spec.ts b/src/app/participant-content-carousel-page/participant-content-carousel-page.component.spec.ts
new file mode 100644
index 000000000..6719ec8ee
--- /dev/null
+++ b/src/app/participant-content-carousel-page/participant-content-carousel-page.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { ParticipantContentCarouselPageComponent } from './participant-content-carousel-page.component';
+
+describe('ParticipantContentCarouselPageComponent', () => {
+  let component: ParticipantContentCarouselPageComponent;
+  let fixture: ComponentFixture<ParticipantContentCarouselPageComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ ParticipantContentCarouselPageComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(ParticipantContentCarouselPageComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/src/app/participant-content-carousel-page/participant-content-carousel-page.component.ts b/src/app/participant-content-carousel-page/participant-content-carousel-page.component.ts
new file mode 100644
index 000000000..5fa82c677
--- /dev/null
+++ b/src/app/participant-content-carousel-page/participant-content-carousel-page.component.ts
@@ -0,0 +1,21 @@
+import { Component, OnInit } from '@angular/core';
+import { Content } from '../content';
+import { ContentType } from '../content-type';
+
+@Component({
+  selector: 'app-participant-content-carousel-page',
+  templateUrl: './participant-content-carousel-page.component.html',
+  styleUrls: ['./participant-content-carousel-page.component.scss']
+})
+export class ParticipantContentCarouselPageComponent implements OnInit {
+  ContentType: ContentType;
+
+  contents: Content[];
+
+  constructor() {
+  }
+
+  ngOnInit() {
+  }
+
+}
-- 
GitLab