From f05fb64a2b27c2ded6e9027f2d9d9bd2361d5d5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Mau=C3=9F?= <lukas.mauss@mni.thm.de> Date: Wed, 28 Nov 2018 17:44:47 +0100 Subject: [PATCH] Fix list-statistic view finally --- .../list-statistic.component.html | 27 +++++++++---------- .../list-statistic.component.scss | 12 +++++++++ 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/src/app/components/shared/list-statistic/list-statistic.component.html b/src/app/components/shared/list-statistic/list-statistic.component.html index 7cd3b6b93..43271ddd5 100644 --- a/src/app/components/shared/list-statistic/list-statistic.component.html +++ b/src/app/components/shared/list-statistic/list-statistic.component.html @@ -1,16 +1,15 @@ -<div fxLayoutAlign="center" fxLayoutGap="10px"> - <table mat-table [dataSource]="dataSource" class="mat-elevation-z8"> +<table mat-table [dataSource]="dataSource" class="mat-elevation-z8"> - <ng-container matColumnDef="content"> - <mat-header-cell *matHeaderCellDef> Content </mat-header-cell> - <mat-cell *matCellDef="let cp"> {{cp.content}}</mat-cell> - </ng-container> + <ng-container matColumnDef="content"> + <mat-header-cell *matHeaderCellDef> Content </mat-header-cell> + <mat-cell *matCellDef="let cp"> {{cp.content}}</mat-cell> + </ng-container> - <ng-container matColumnDef="percentage"> - <mat-header-cell *matHeaderCellDef> Percentage </mat-header-cell> - <mat-cell *matCellDef="let cp"> {{cp.percent}}</mat-cell> - </ng-container> - <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row> - <mat-row *matRowDef="let row; columns: displayedColumns"></mat-row> - </table> -</div> + <ng-container matColumnDef="percentage"> + <mat-header-cell *matHeaderCellDef> Percentage </mat-header-cell> + <mat-cell *matCellDef="let cp"> {{cp.percent}}</mat-cell> + </ng-container> + + <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row> + <mat-row *matRowDef="let row; columns: displayedColumns"></mat-row> +</table> diff --git a/src/app/components/shared/list-statistic/list-statistic.component.scss b/src/app/components/shared/list-statistic/list-statistic.component.scss index e69de29bb..c657a769c 100644 --- a/src/app/components/shared/list-statistic/list-statistic.component.scss +++ b/src/app/components/shared/list-statistic/list-statistic.component.scss @@ -0,0 +1,12 @@ +table{ + width: 100%; +} + +.mat-column-percentage { + display: flex; + justify-content: flex-end; +} + +mat-header-cell { + color: #3f51b5; +} -- GitLab