|
1 |
| -<div [ngSwitch]="matView"> |
2 |
| - <div *ngSwitchCase="'logbook-headline'"> |
3 |
| - <ng-container *ngTemplateOutlet="logbookHeadline"></ng-container> |
4 |
| - </div> |
5 |
| - <div *ngSwitchCase="'logbook-module'"> |
6 |
| - <ng-container *ngTemplateOutlet="logbookModule"></ng-container> |
7 |
| - </div> |
8 |
| -</div> |
9 |
| - |
10 |
| -<ng-template #logbookModule> |
11 |
| - <mat-card [ngClass]="matView"> |
12 |
| - <mat-card-header> |
13 |
| - <mat-card-title #cardHeader style="font-size: 18px;">{{ logbook?.name }}</mat-card-title> |
14 |
| - <mat-card-subtitle>{{ logbook?.ownerGroup }}</mat-card-subtitle> |
15 |
| - <button mat-icon-button [matMenuTriggerFor]="menu" aria-label="Example icon-button with a menu" |
16 |
| - class="mat-fab-top-right" [disabled]="isActionAllowed.tooltips.edit" |
17 |
| - matTooltip="{{ isActionAllowed.tooltips.edit }}"> |
18 |
| - <mat-icon>more_vert</mat-icon> |
19 |
| - </button> |
20 |
| - <mat-menu #menu="matMenu"> |
21 |
| - <span [matTooltip]="isActionAllowed.tooltips.update"> |
22 |
| - <button mat-menu-item (click)="editLogbook()" [disabled]="isActionAllowed.tooltips.update"> |
23 |
| - <mat-icon>edit</mat-icon> |
24 |
| - <span>Edit</span> |
25 |
| - </button> |
26 |
| - </span> |
27 |
| - <span [matTooltip]="isActionAllowed.tooltips.delete"> |
28 |
| - <button mat-menu-item (click)="deleteLogbook()" [disabled]="isActionAllowed.tooltips.delete"> |
29 |
| - <mat-icon>delete</mat-icon> |
30 |
| - <span>Delete</span> |
31 |
| - </button> |
32 |
| - </span> |
33 |
| - </mat-menu> |
34 |
| - </mat-card-header> |
35 |
| - <div class="image-container"> |
36 |
| - <img (click)="selection($event)" [src]="imageToShow" alt="" [routerLink]="['/logbooks', logbook?.id, 'dashboard']" |
37 |
| - *ngIf=" !isImageLoading"> |
38 |
| - </div> |
39 |
| - <mat-card-content> |
40 |
| - <p> |
41 |
| - {{ logbook?.description }} |
42 |
| - </p> |
43 |
| - </mat-card-content> |
44 |
| - <mat-divider></mat-divider> |
45 |
| - <mat-card-actions class="mat-card-actions"> |
46 |
| - <button mat-button (click)="selection()" [routerLink]="['/logbooks', logbook?.id, 'dashboard']"> |
47 |
| - Open |
48 |
| - </button> |
49 |
| - </mat-card-actions> |
50 |
| - </mat-card> |
51 |
| -</ng-template> |
52 |
| - |
53 |
| -<ng-template #logbookHeadline> |
54 |
| - <mat-card [ngClass]="matView"> |
55 |
| - <div (dblclick)="selectOnDoubleClick()" class="card-container"> |
56 |
| - <mat-card-content class="title">{{ logbook?.name }}</mat-card-content> |
57 |
| - <mat-card-content class="description">{{ logbook?.description }}</mat-card-content> |
58 |
| - <mat-card-content class="owner">{{ logbook?.ownerGroup }}</mat-card-content> |
59 |
| - <mat-card-content class="date">{{ logbook?.createdAt | date }}</mat-card-content> |
60 |
| - <img [src]="imageToShow" alt="" *ngIf=" !isImageLoading"> |
61 |
| - </div> |
62 |
| - <button mat-icon-button [matMenuTriggerFor]="menuHeadline" aria-label="Example icon-button with a menu" |
| 1 | +<mat-card class="logbook-module"> |
| 2 | + <mat-card-header> |
| 3 | + <mat-card-title #cardHeader style="font-size: 18px;">{{ logbook?.name }}</mat-card-title> |
| 4 | + <mat-card-subtitle>{{ logbook?.ownerGroup }}</mat-card-subtitle> |
| 5 | + <button mat-icon-button [matMenuTriggerFor]="menu" aria-label="Example icon-button with a menu" |
63 | 6 | class="mat-fab-top-right" [disabled]="isActionAllowed.tooltips.edit"
|
64 | 7 | matTooltip="{{ isActionAllowed.tooltips.edit }}">
|
65 | 8 | <mat-icon>more_vert</mat-icon>
|
66 | 9 | </button>
|
67 |
| - <mat-menu #menuHeadline="matMenu"> |
| 10 | + <mat-menu #menu="matMenu"> |
68 | 11 | <span [matTooltip]="isActionAllowed.tooltips.update">
|
69 | 12 | <button mat-menu-item (click)="editLogbook()" [disabled]="isActionAllowed.tooltips.update">
|
70 | 13 | <mat-icon>edit</mat-icon>
|
|
78 | 21 | </button>
|
79 | 22 | </span>
|
80 | 23 | </mat-menu>
|
81 |
| - </mat-card> |
82 |
| -</ng-template> |
| 24 | + </mat-card-header> |
| 25 | + <div class="image-container"> |
| 26 | + <img (click)="selection($event)" [src]="imageToShow" alt="" [routerLink]="['/logbooks', logbook?.id, 'dashboard']" |
| 27 | + *ngIf=" !isImageLoading"> |
| 28 | + </div> |
| 29 | + <mat-card-content> |
| 30 | + <p> |
| 31 | + {{ logbook?.description }} |
| 32 | + </p> |
| 33 | + </mat-card-content> |
| 34 | + <mat-divider></mat-divider> |
| 35 | + <mat-card-actions class="mat-card-actions"> |
| 36 | + <button mat-button (click)="selection()" [routerLink]="['/logbooks', logbook?.id, 'dashboard']"> |
| 37 | + Open |
| 38 | + </button> |
| 39 | + </mat-card-actions> |
| 40 | +</mat-card> |
0 commit comments