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