|
1 | | -<div (keyup)="onKeyPress($event)" tabindex="-1" role="button" class="adf-notification-history-container"> |
2 | | - <button mat-button |
3 | | - [matMenuTriggerFor]="menu" |
4 | | - aria-hidden="false" |
5 | | - [attr.aria-label]="'NOTIFICATIONS.OPEN_HISTORY' | translate" |
6 | | - title="{{ 'NOTIFICATIONS.OPEN_HISTORY' | translate }}" |
7 | | - class="adf-notification-history-menu_button" |
8 | | - id="adf-notification-history-open-button" |
9 | | - (menuOpened)="onMenuOpened()"> |
10 | | - <mat-icon matBadge="⁠" |
11 | | - [matBadgeHidden]="!notifications.length" |
12 | | - class="adf-notification-history-menu_button-icon" |
13 | | - matBadgeColor="accent" |
14 | | - matBadgeSize="small">notifications |
15 | | - </mat-icon> |
16 | | - </button> |
17 | | - <mat-menu #menu="matMenu" |
18 | | - [xPosition]="menuPositionX" |
19 | | - [yPosition]="menuPositionY" |
20 | | - id="adf-notification-history-menu" |
21 | | - class="adf-notification-history-menu adf-notification-history-menu-panel"> |
22 | | - <div class="adf-notification-history-list" |
23 | | - role="button" |
24 | | - tabindex="0" |
25 | | - (keyup.enter)="$event.stopPropagation()" |
26 | | - (click)="$event.stopPropagation()"> |
27 | | - <div mat-subheader role="menuitem"> |
28 | | - <span class="adf-notification-history-menu-title">{{ 'NOTIFICATIONS.TITLE' | translate }}</span> |
29 | | - <button *ngIf="notifications.length" |
30 | | - id="adf-notification-history-mark-as-read" |
31 | | - class="adf-notification-history-mark-as-read" |
32 | | - mat-icon-button |
33 | | - title="{{ 'NOTIFICATIONS.MARK_AS_READ' | translate }}" |
34 | | - (click)="markAsRead()"> |
35 | | - <mat-icon>done_all</mat-icon> |
36 | | - </button> |
37 | | - </div> |
| 1 | +<button mat-button |
| 2 | + [matMenuTriggerFor]="menu" |
| 3 | + aria-hidden="false" |
| 4 | + [attr.aria-label]="'NOTIFICATIONS.OPEN_HISTORY' | translate" |
| 5 | + title="{{ 'NOTIFICATIONS.OPEN_HISTORY' | translate }}" |
| 6 | + class="adf-notification-history-menu_button" |
| 7 | + id="adf-notification-history-open-button" |
| 8 | + (menuOpened)="onMenuOpened()"> |
| 9 | + <mat-icon matBadge="⁠" |
| 10 | + [matBadgeHidden]="!notifications.length" |
| 11 | + class="adf-notification-history-menu_button-icon" |
| 12 | + matBadgeColor="accent" |
| 13 | + matBadgeSize="small">notifications |
| 14 | + </mat-icon> |
| 15 | +</button> |
38 | 16 |
|
39 | | - <mat-divider /> |
| 17 | +<mat-menu #menu="matMenu" |
| 18 | + [xPosition]="menuPositionX" |
| 19 | + [yPosition]="menuPositionY" |
| 20 | + id="adf-notification-history-menu" |
| 21 | + class="adf-notification-history-menu adf-notification-history-menu-panel"> |
| 22 | + <div class="adf-notification-history-list-header"> |
| 23 | + <span class="adf-notification-history-menu-title">{{ 'NOTIFICATIONS.TITLE' | translate }}</span> |
| 24 | + <button mat-menu-item |
| 25 | + *ngIf="notifications.length" |
| 26 | + id="adf-notification-history-mark-as-read" |
| 27 | + class="adf-notification-history-mark-as-read" |
| 28 | + title="{{ 'NOTIFICATIONS.MARK_AS_READ' | translate }}" |
| 29 | + (click)="markAsRead()"> |
| 30 | + <mat-icon class="adf-notification-history-mark-as-read-icon">done_all</mat-icon> |
| 31 | + </button> |
| 32 | + </div> |
40 | 33 |
|
41 | | - <mat-list role="menuitem"> |
42 | | - <ng-container *ngIf="notifications.length; else empty_list_template"> |
43 | | - <mat-list-item *ngFor="let notification of paginatedNotifications" |
44 | | - class="adf-notification-history-menu-item" |
45 | | - (click)="onNotificationClick(notification)"> |
46 | | - <div *ngIf="notification.initiator; else no_avatar" |
47 | | - matListItemAvatar |
48 | | - [outerHTML]="notification.initiator | usernameInitials : 'adf-notification-initiator-pic'"></div> |
49 | | - <ng-template #no_avatar> |
50 | | - <mat-icon matListItemLine |
51 | | - class="adf-notification-history-menu-initiator">{{notification.icon}}</mat-icon> |
52 | | - </ng-template> |
53 | | - <div class="adf-notification-history-menu-item-content"> |
54 | | - <p class="adf-notification-history-menu-text adf-notification-history-menu-message" |
55 | | - *ngFor="let message of notification.messages" |
56 | | - matListItemLine [title]="message">{{ message }}</p> |
57 | | - <p class="adf-notification-history-menu-text adf-notification-history-menu-date" |
58 | | - matListItemLine> {{notification.datetime | adfTimeAgo}} </p> |
59 | | - </div> |
60 | | - </mat-list-item> |
61 | | - </ng-container> |
62 | | - <ng-template #empty_list_template> |
63 | | - <mat-list-item id="adf-notification-history-component-no-message" |
64 | | - class="adf-notification-history-menu-no-message"> |
65 | | - <p class="adf-notification-history-menu-no-message-text" matListItemLine>{{ 'NOTIFICATIONS.NO_MESSAGE' | translate }}</p> |
66 | | - </mat-list-item> |
67 | | - </ng-template> |
68 | | - </mat-list> |
| 34 | + <mat-divider/> |
69 | 35 |
|
70 | | - <mat-divider /> |
| 36 | + <div class="adf-notification-history-item-list"> |
| 37 | + <ng-container *ngIf="notifications.length; else empty_list_template"> |
| 38 | + <button mat-menu-item |
| 39 | + *ngFor="let notification of paginatedNotifications" |
| 40 | + (click)="onNotificationClick(notification, $event)" |
| 41 | + class="adf-notification-history-menu-item"> |
| 42 | + <div class="adf-notification-history-menu-item-content"> |
| 43 | + <div *ngIf="notification.initiator; else no_avatar" |
| 44 | + [outerHTML]="notification.initiator | usernameInitials : 'adf-notification-initiator-pic'"></div> |
| 45 | + <ng-template #no_avatar> |
| 46 | + <mat-icon class="adf-notification-history-menu-initiator"> |
| 47 | + {{ notification.icon }} |
| 48 | + </mat-icon> |
| 49 | + </ng-template> |
| 50 | + <div class="adf-notification-history-menu-item-content-message"> |
| 51 | + <p class="adf-notification-history-menu-text adf-notification-history-menu-message" |
| 52 | + *ngFor="let message of notification.messages" |
| 53 | + [title]="message">{{ message }}</p> |
| 54 | + <p class="adf-notification-history-menu-text adf-notification-history-menu-date" |
| 55 | + > {{ notification.datetime | adfTimeAgo }} </p> |
| 56 | + </div> |
| 57 | + </div> |
| 58 | + </button> |
| 59 | + </ng-container> |
| 60 | + <ng-template #empty_list_template> |
| 61 | + <p mat-menu-item id="adf-notification-history-component-no-message" |
| 62 | + class="adf-notification-history-menu-no-message-text"> |
| 63 | + {{ 'NOTIFICATIONS.NO_MESSAGE' | translate }} |
| 64 | + </p> |
| 65 | + </ng-template> |
| 66 | + </div> |
71 | 67 |
|
72 | | - <div class="adf-notification-history-load-more" role="menuitem" *ngIf="hasMoreNotifications()"> |
73 | | - <button mat-button (click)="loadMore()"> |
74 | | - {{ 'NOTIFICATIONS.LOAD_MORE' | translate }} |
75 | | - </button> |
76 | | - </div> |
77 | | - </div> |
78 | | - </mat-menu> |
79 | | -</div> |
| 68 | + <mat-divider/> |
| 69 | + |
| 70 | + <div class="adf-notification-history-load-more" *ngIf="hasMoreNotifications()"> |
| 71 | + <button mat-menu-item (click)="loadMore($event)"> |
| 72 | + {{ 'NOTIFICATIONS.LOAD_MORE' | translate }} |
| 73 | + </button> |
| 74 | + </div> |
| 75 | +</mat-menu> |
0 commit comments