From f88932c0303a727b330a3531df3b2a4e015b66b2 Mon Sep 17 00:00:00 2001 From: Stefan Plociennik <stefan.plociennik@mni.thm.de> Date: Wed, 28 Apr 2021 22:10:55 +0200 Subject: [PATCH] fixed merge --- .../topic-cloud-dialog.component.html | 54 +++++-------------- .../topic-cloud-dialog.component.ts | 30 ++--------- 2 files changed, 18 insertions(+), 66 deletions(-) diff --git a/src/app/components/shared/topic-cloud-dialog/topic-cloud-dialog.component.html b/src/app/components/shared/topic-cloud-dialog/topic-cloud-dialog.component.html index e25b7b839..fba3b163e 100644 --- a/src/app/components/shared/topic-cloud-dialog/topic-cloud-dialog.component.html +++ b/src/app/components/shared/topic-cloud-dialog/topic-cloud-dialog.component.html @@ -1,59 +1,33 @@ <mat-dialog-content> <mat-accordion> -<<<<<<< HEAD - - <mat-expansion-panel hideToggle *ngFor="let keyword of keywords"> - <mat-expansion-panel-header> - <mat-panel-title> - {{keyword.titel}} - </mat-panel-title> - - <!--<mat-panel-description> - This is a summary of the content - </mat-panel-description> --> - - </mat-expansion-panel-header> - - <div *ngFor="let question of keyword.questions"> - <p>{{question}}</p> - </div> - - <button mat-icon-button style="align-self:flex-end;" - (click)="deleteKeyWord(keyword.keywordID)"> - <mat-icon>delete</mat-icon> - </button> - - <button mat-icon-button style="align-self:flex-end;" - (click)="editKeyWord(keyword.keywordID)"> - <mat-icon>edit</mat-icon> - </button> - </mat-expansion-panel> -======= <mat-expansion-panel (opened)="panelOpenState = true" (closed)="panelOpenState = false" - *ngFor="let elem of array"> + *ngFor="let keyword of array"> <mat-expansion-panel-header class="color"> <mat-panel-title> - {{elem.keyword}} + {{keyword.keyword}} </mat-panel-title> <mat-panel-description> - {{elem.correspondingQuestions.length}} Questions + {{keyword.questions.length}} Questions </mat-panel-description> </mat-expansion-panel-header> - <p *ngFor="let question of elem.correspondingQuestions">{{question}}</p> - <!-- TODO: show buttons only to creator and moderators --> + <p *ngFor="let question of keyword.questions">{{question}}</p> + <mat-divider></mat-divider> - <button mat-icon-button> - <mat-icon class="primary">edit</mat-icon></button> - <button mat-icon-button> + + <!-- TODO: show buttons only to creator and moderators --> + <button mat-icon-button style="align-self:flex-end;" + (click)="editKeyWord(keyword.keywordID)"> + <mat-icon class="primary">edit</mat-icon> + </button> + + <button mat-icon-button style="align-self:flex-end;" + (click)="deleteKeyWord(keyword.keywordID)"> <mat-icon class="warn">delete</mat-icon> </button> <!-- TODO: add automatic translation --> </mat-expansion-panel> ->>>>>>> 3025e5d96c7ffef24a770c04bef8ebe9efc5fcc0 </mat-accordion> - - </mat-dialog-content> diff --git a/src/app/components/shared/topic-cloud-dialog/topic-cloud-dialog.component.ts b/src/app/components/shared/topic-cloud-dialog/topic-cloud-dialog.component.ts index 9ee3481e7..ee0807c38 100644 --- a/src/app/components/shared/topic-cloud-dialog/topic-cloud-dialog.component.ts +++ b/src/app/components/shared/topic-cloud-dialog/topic-cloud-dialog.component.ts @@ -6,33 +6,11 @@ import { Component, OnInit } from '@angular/core'; styleUrls: ['./topic-cloud-dialog.component.scss'] }) export class TopicCloudDialogComponent implements OnInit { - -<<<<<<< HEAD - public panelOpenState: boolean; - - keywords = [ - { - keywordID: '0', - titel: 'Frage', - questions: ['what is your question', 'where are u from'] - }, - { - keywordID: '1', - titel: 'Klausur', - questions: ['hast du gelernt', 'ein test'] - }, - { - keywordID: '2', - titel: 'Hobby', - questions: ['was ist dein Hobby', 'was ist dein Plan'] - } - ] - public panelOpenState = false; public array = [ { "keyword": "Cloud", - "correspondingQuestions": [ + "questions": [ "Wie genau ist die Cloud aufgebaut?", "Wieviel speicherplatz steht mir in der Cloud zur verfuegung?", "Sollen wir die Tag Cloud implementieren?" @@ -40,13 +18,13 @@ export class TopicCloudDialogComponent implements OnInit { }, { "keyword": "SWT", - "correspondingQuestions": [ + "questions": [ "Muss man fuer das Modul SWT bestanden haben?" ] }, { "keyword": "Frage", - "correspondingQuestions": [ + "questions": [ "Das ist eine Lange Frage mit dem Thema 'frage'", "Ich habe eine Frage, sind Fragen zum thema 'Frage' auch erlaubt?", "Ich wollte Fragen ob sie gerne Sachen gefragt werden", @@ -55,7 +33,7 @@ export class TopicCloudDialogComponent implements OnInit { }, { "keyword": "Klausur", - "correspondingQuestions": [ + "questions": [ "Darf man in der Klausur hilfmittel verwenden?", "An welchem Termin findet die Klausur statt?" ] -- GitLab