From 31fc8c9c5fb1c2a00dd42a772f611a66d648a854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Mau=C3=9F?= <lukas.mauss@mni.thm.de> Date: Tue, 5 Feb 2019 12:19:26 +0100 Subject: [PATCH] Show contentGroup-name as title --- .../creator/content-list/content-list.component.html | 10 +++++++++- .../creator/content-list/content-list.component.ts | 3 +++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/app/components/creator/content-list/content-list.component.html b/src/app/components/creator/content-list/content-list.component.html index d5d61dbc5..6d381866d 100644 --- a/src/app/components/creator/content-list/content-list.component.html +++ b/src/app/components/creator/content-list/content-list.component.html @@ -1,7 +1,9 @@ <div fxLayout="row" fxLayoutGap="20px" fxLayoutAlign="center"> <mat-card> <mat-card-header> - <h2 fxLayoutAlign="center">{{ 'content.contents' | translate}}</h2> + <mat-card-title> + <h2>{{ collectionName }}</h2> + </mat-card-title> </mat-card-header> <mat-divider></mat-divider> <div *ngIf="isLoading" fxLayout="column" fxLayoutAlign="center" fxLayoutGap="20px" fxFill> @@ -9,14 +11,20 @@ <mat-progress-spinner mode="indeterminate"></mat-progress-spinner> </div> </div> + <mat-grid-list cols="2" rowHeight="2:1"> + <mat-grid-tile> <button class="actionButton" mat-fab color="primary" matTooltip="Fragen präsentieren" routerLink="/creator/room/{{ roomId }}/contents"> <mat-icon>school</mat-icon> </button> + </mat-grid-tile> + <mat-grid-tile> <button class="actionButton" mat-fab color="primary" matTooltip="Neue Frage erstellen" routerLink="/creator/room/{{ roomId }}/create-content"> <mat-icon>note_add</mat-icon> </button> + </mat-grid-tile> + </mat-grid-list> <mat-divider></mat-divider> <mat-card-content> <mat-expansion-panel *ngFor="let content of contents"> diff --git a/src/app/components/creator/content-list/content-list.component.ts b/src/app/components/creator/content-list/content-list.component.ts index 22530e16c..5e6c37198 100644 --- a/src/app/components/creator/content-list/content-list.component.ts +++ b/src/app/components/creator/content-list/content-list.component.ts @@ -42,6 +42,8 @@ export class ContentListComponent implements OnInit { isLoading = true; + collectionName: string; + constructor(private contentService: ContentService, private roomService: RoomService, private route: ActivatedRoute, @@ -64,6 +66,7 @@ export class ContentListComponent implements OnInit { }); this.route.params.subscribe(params => { sessionStorage.setItem('collection', params['contentGroup']); + this.collectionName = params['contentGroup']; }); this.translateService.use(localStorage.getItem('currentLang')); this.isLoading = false; -- GitLab