]>
Commit | Line | Data |
---|---|---|
1 | <div class="sub-menu" [ngClass]="{ 'sub-menu-fixed': !isBroadcastMessageDisplayed, 'no-scroll': isModalOpened }"> | |
2 | <ng-container *ngFor="let menuEntry of menuEntries; index as id"> | |
3 | ||
4 | <a *ngIf="menuEntry.routerLink && isDisplayed(menuEntry)" [routerLink]="menuEntry.routerLink" routerLinkActive="active" class="title-page title-page-settings" #routerLink (click)="onActiveLinkScrollToTop(routerLink)">{{ menuEntry.label }}</a> | |
5 | ||
6 | <div *ngIf="!menuEntry.routerLink && isDisplayed(menuEntry)" ngbDropdown class="parent-entry" | |
7 | #dropdown="ngbDropdown" autoClose="true"> | |
8 | <span | |
9 | *ngIf="isInSmallView" | |
10 | tabindex=0 | |
11 | [ngClass]="{ active: !!suffixLabels[menuEntry.label] }" | |
12 | (click)="openModal(id)" (keydown.enter)="openModal(id)" | |
13 | role="button" class="title-page title-page-settings"> | |
14 | <ng-container i18n>{{ menuEntry.label }}</ng-container> | |
15 | </span> | |
16 | ||
17 | <span | |
18 | *ngIf="!isInSmallView" | |
19 | tabindex=0 | |
20 | [ngClass]="{ active: !!suffixLabels[menuEntry.label] }" ngbDropdownAnchor | |
21 | (click)="dropdownAnchorClicked(dropdown)" (keydown.enter)="dropdownAnchorClicked(dropdown)" | |
22 | role="button" class="title-page title-page-settings" | |
23 | > | |
24 | <ng-container i18n>{{ menuEntry.label }}</ng-container> | |
25 | </span> | |
26 | ||
27 | <div ngbDropdownMenu> | |
28 | <ng-container *ngFor="let menuChild of menuEntry.children"> | |
29 | <a *ngIf="isDisplayed(menuChild)" class="dropdown-item" | |
30 | [ngClass]="{ icon: hasIcons }" | |
31 | [routerLink]="menuChild.routerLink" | |
32 | #routerLink (click)="onActiveLinkScrollToTop(routerLink)"> | |
33 | <my-global-icon *ngIf="menuChild.iconName" [iconName]="menuChild.iconName" aria-hidden="true"></my-global-icon> | |
34 | ||
35 | {{ menuChild.label }} | |
36 | </a> | |
37 | </ng-container> | |
38 | </div> | |
39 | </div> | |
40 | </ng-container> | |
41 | </div> | |
42 | ||
43 | <ng-template #modal let-close="close" let-dismiss="dismiss"> | |
44 | <div class="modal-body"> | |
45 | <ng-container *ngFor="let menuEntry of menuEntries; index as id"> | |
46 | <div [ngClass]="{ hidden: id !== currentMenuEntryIndex }"> | |
47 | <ng-container *ngFor="let menuChild of menuEntry.children"> | |
48 | <a *ngIf="isDisplayed(menuChild)" | |
49 | [ngClass]="{ icon: hasIcons }" | |
50 | [routerLink]="menuChild.routerLink" routerLinkActive="active" | |
51 | #routerLink (click)="dismissOtherModals(); onActiveLinkScrollToTop(routerLink)"> | |
52 | <my-global-icon *ngIf="menuChild.iconName" [iconName]="menuChild.iconName" aria-hidden="true"></my-global-icon> | |
53 | ||
54 | {{ menuChild.label }} | |
55 | </a> | |
56 | </ng-container> | |
57 | </div> | |
58 | </ng-container> | |
59 | </div> | |
60 | </ng-template> |