|
38 | 38 | </button>
|
39 | 39 | </mat-card-content>
|
40 | 40 | </mat-card>
|
| 41 | +<div class="grid-container"> |
| 42 | + <ng-template ngFor let-attachment [ngForOf]="attachments"> |
| 43 | + <mat-card class="attachment-card"> |
| 44 | + <mat-card-content class="attachment-content"> |
| 45 | + <img |
| 46 | + data-cy="attachment-thumbnail" |
| 47 | + [src]="getImageUrl(attachment.thumbnail)" |
| 48 | + (click)="openAttachment(attachment.thumbnail)" |
| 49 | + /> |
41 | 50 |
|
42 |
| -<ng-template ngFor let-attachment [ngForOf]="attachments"> |
43 |
| - <mat-card class="attachment-card"> |
44 |
| - <mat-card-content> |
45 |
| - <img src="{{ attachment.thumbnail }}" /> |
46 |
| - |
47 |
| - <form (submit)="onSubmitCaption(attachment.id, caption.value)"> |
48 |
| - <mat-form-field> |
49 |
| - <mat-label>Caption</mat-label> |
50 |
| - <input |
51 |
| - matInput |
52 |
| - id="caption" |
53 |
| - value="{{ attachment.caption }}" |
54 |
| - #caption |
55 |
| - /> |
56 |
| - </mat-form-field> |
57 |
| - <button mat-button type="submit" color="primary" class="submit-button"> |
58 |
| - Submit |
| 51 | + <form (submit)="onSubmitCaption(attachment.id, caption.value)"> |
| 52 | + <mat-form-field> |
| 53 | + <mat-label>Caption</mat-label> |
| 54 | + <input |
| 55 | + matInput |
| 56 | + id="caption" |
| 57 | + value="{{ attachment.caption }}" |
| 58 | + #caption |
| 59 | + /> |
| 60 | + </mat-form-field> |
| 61 | + <button |
| 62 | + mat-stroked-button |
| 63 | + type="submit" |
| 64 | + color="primary" |
| 65 | + class="submit-button" |
| 66 | + > |
| 67 | + Submit |
| 68 | + </button> |
| 69 | + </form> |
| 70 | + </mat-card-content> |
| 71 | + <mat-card-actions> |
| 72 | + <button |
| 73 | + mat-button |
| 74 | + class="download-button" |
| 75 | + (click)="onDownloadAttachment(attachment)" |
| 76 | + > |
| 77 | + <mat-icon>download</mat-icon> |
| 78 | + Download |
| 79 | + </button> |
| 80 | + <button |
| 81 | + mat-button |
| 82 | + class="delete-button" |
| 83 | + (click)="onDeleteAttachment(attachment.id)" |
| 84 | + > |
| 85 | + <mat-icon>delete</mat-icon> |
| 86 | + Remove |
59 | 87 | </button>
|
60 |
| - </form> |
61 |
| - </mat-card-content> |
62 |
| - <mat-card-actions align="end"> |
63 |
| - <button |
64 |
| - mat-button |
65 |
| - class="download-button" |
66 |
| - (click)="onDownloadAttachment(attachment)" |
67 |
| - > |
68 |
| - <mat-icon>download</mat-icon> |
69 |
| - Download |
70 |
| - </button> |
71 |
| - <button |
72 |
| - mat-button |
73 |
| - class="delete-button" |
74 |
| - (click)="onDeleteAttachment(attachment.id)" |
75 |
| - > |
76 |
| - <mat-icon>delete</mat-icon> |
77 |
| - Remove |
78 |
| - </button> |
79 |
| - </mat-card-actions> |
80 |
| - </mat-card> |
81 |
| -</ng-template> |
| 88 | + </mat-card-actions> |
| 89 | + </mat-card> |
| 90 | + </ng-template> |
| 91 | +</div> |
0 commit comments