diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index d725407d1f9c5d23968594665de26ccca53edec6..1364c4b066fb22ad795087d85b0652a6f4a4ea2f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -58,7 +58,7 @@ const routes: Routes = [ data: { roles: [UserRole.CREATOR] } }, { - path: 'creator/room/:roomId/content-list/:id', + path: 'creator/room/:roomId/:id', component: ContentDetailComponent, canActivate: [AuthenticationGuard], data: { roles: [UserRole.CREATOR] } diff --git a/src/app/content-list/content-list.component.ts b/src/app/content-list/content-list.component.ts index 65866388af42a28c285a154e5c6506812ec2eb03..71828d595d1ed8e9c4241c78180bbda297ddbdb7 100644 --- a/src/app/content-list/content-list.component.ts +++ b/src/app/content-list/content-list.component.ts @@ -10,14 +10,14 @@ import { Content } from '../content'; export class ContentListComponent implements OnInit { contents: Content[]; - constructor(private contentCreationService: ContentService) { } + constructor(private ContentService: ContentService) { } ngOnInit() { this.getContents(); } getContents(): void { - this.contentCreationService.getContents() + this.ContentService.getContents() .subscribe(contents => { this.contents = contents; }); diff --git a/src/app/content.ts b/src/app/content.ts index 80fcce7c94d571b1c33d157c6cbdec12c5d83bea..8ed673db700a2ddfa93167eaa794b4ca40513704 100644 --- a/src/app/content.ts +++ b/src/app/content.ts @@ -15,5 +15,5 @@ export class Content { body: string; round: number; format: Format; - // formatAttributes: Map<string, string>; + // formatAttributes: Map<string, string>; } diff --git a/src/app/creator-room/creator-room.component.html b/src/app/creator-room/creator-room.component.html index 5fb5684dfd815c3a7f7744859df3b7a0601b007d..0cc2f6c50e540198f048ec96935cf7b3daab4ed6 100644 --- a/src/app/creator-room/creator-room.component.html +++ b/src/app/creator-room/creator-room.component.html @@ -17,14 +17,15 @@ {{ room.description }} </p> </mat-card-content> + <mat-divider></mat-divider> + + <app-content-list></app-content-list> + <mat-divider></mat-divider> <mat-card-actions> <button mat-button color="primary" matTooltip="Create new content" routerLink="/creator/room/{{room.id}}/content-creation"> Create content </button> - <button mat-button color="primary" matTooltip="See contents" routerLink="/creator/room/{{room.id}}/content-list"> - Contents - </button> <button mat-button color="primary" matTooltip="See room comments" routerLink="/creator/room/{{room.id}}/comments"> Comments diff --git a/src/app/in-memory-data.service.ts b/src/app/in-memory-data.service.ts index 45201f21437f038ea46ff950ae44965672bc4226..0666d391a24fc83fca10832dc647cc34df1e56c4 100644 --- a/src/app/in-memory-data.service.ts +++ b/src/app/in-memory-data.service.ts @@ -84,20 +84,20 @@ export class InMemoryDataService implements InMemoryDbService { const contents = [ { - id: '11', + id: '1', revision: '1', roomId: '1', - subject: 'bla', + subject: 'Textaufgabe 1', body: 'testcontent alpha beta', round: 1, format: Format.TEXT }, { - id: '12', + id: '2', revision: '2', roomId: '3', - subject: 'blub', - body: 'testcontenttttt', + subject: 'Textaufgabe 2', + body: 'Ein Mann kauft 20 Melonen. Eine Melone wiegt jeweils 5kg. <br> Berechnen Sie das Gesamtgewicht.', round: 5, format: Format.TEXT }