]>
Commit | Line | Data |
---|---|---|
587aa74a C |
1 | <ng-template #notificationNumber> |
2 | <div *ngIf="unreadNotifications > 0 && unreadNotifications < 100" class="unread-notifications">{{ unreadNotifications }}</div> | |
3 | <div *ngIf="unreadNotifications >= 100" class="unread-notifications">99+</div> | |
4 | </ng-template> | |
5 | ||
2f1548fd | 6 | <div |
51a83970 K |
7 | [ngbPopover]="popContent" autoClose="outside" placement="bottom" container={this} popoverClass="popover-notifications" |
8 | i18n-title title="View your notifications" [ngClass]="{ 'notification-inbox-popover': true, 'shown': opened, 'hidden': isInMobileView }" | |
9 | #popover="ngbPopover" (shown)="onPopoverShown()" (hidden)="onPopoverHidden()" | |
2f1548fd | 10 | > |
587aa74a | 11 | <ng-container *ngTemplateOutlet="notificationNumber"></ng-container> |
2f1548fd | 12 | |
51a83970 K |
13 | <my-global-icon iconName="bell"></my-global-icon> |
14 | </div> | |
15 | ||
16 | <div *ngIf="isInMobileView" i18n-title title="View your notifications" class="notification-inbox-link"> | |
587aa74a | 17 | <ng-container *ngTemplateOutlet="notificationNumber"></ng-container> |
51a83970 K |
18 | |
19 | <a routerLink="/my-account/notifications" routerLinkActive="active" #link (click)="onNavigate(link)"> | |
20 | <my-global-icon iconName="bell"></my-global-icon> | |
21 | </a> | |
2f1548fd C |
22 | </div> |
23 | ||
24 | <ng-template #popContent> | |
b28e4e5e C |
25 | <div class="content" [ngClass]="{ loaded: loaded }"> |
26 | <div class="notifications-header"> | |
27 | <div i18n>Notifications</div> | |
2f1548fd | 28 | |
10475dea RK |
29 | <div> |
30 | <button | |
31 | *ngIf="unreadNotifications" | |
93c728a2 | 32 | i18n-title title="Mark all as read" class="me-2" |
10475dea | 33 | (click)="markAllAsRead()" |
93c728a2 C |
34 | > |
35 | <my-global-icon iconName="tick"></my-global-icon> | |
36 | </button> | |
37 | ||
10475dea | 38 | <a |
93c728a2 | 39 | i18n-title title="Update your notification preferences" |
10475dea | 40 | routerLink="/my-account/settings" fragment="notifications" |
30d55e75 | 41 | #settingsNotifications (click)="onNavigate(settingsNotifications)" |
93c728a2 C |
42 | > |
43 | <my-global-icon iconName="cog"></my-global-icon> | |
44 | </a> | |
10475dea | 45 | </div> |
b28e4e5e C |
46 | </div> |
47 | ||
223b24e6 | 48 | <div *ngIf="!loaded" class="loader mt-4"> |
a14c1764 | 49 | <my-loader size="xl" [loading]="!loaded"></my-loader> |
b28e4e5e | 50 | </div> |
2f1548fd | 51 | |
b28e4e5e | 52 | <my-user-notifications |
be27ef3b | 53 | [ignoreLoadingBar]="true" [infiniteScroll]="false" [itemsPerPage]="10" |
bc6f8863 | 54 | [markAllAsReadSubject]="markAllAsReadSubject" (notificationsLoaded)="onNotificationLoaded()" |
b28e4e5e | 55 | ></my-user-notifications> |
2f1548fd | 56 | |
30d55e75 | 57 | <a *ngIf="loaded" class="all-notifications" routerLink="/my-account/notifications" #notifications (click)="onNavigate(notifications)"> |
4c8749cb | 58 | <my-global-icon class="me-1" iconName="bell" aria-hidden="true"></my-global-icon> |
10475dea RK |
59 | <span i18n>See all your notifications</span> |
60 | </a> | |
b28e4e5e | 61 | </div> |
2f1548fd | 62 | </ng-template> |