aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/menu/top-menu-dropdown.component.html
blob: 3087b2e987c87d9ae8b07ec9b1afae8788cac3d8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<div class="sub-menu">
  <ng-container *ngFor="let menuEntry of menuEntries">

    <a *ngIf="menuEntry.routerLink" [routerLink]="menuEntry.routerLink" routerLinkActive="active" class="title-page title-page-settings">{{ menuEntry.label }}</a>

    <div *ngIf="!menuEntry.routerLink" ngbDropdown [container]="container" class="parent-entry" #dropdown="ngbDropdown" (mouseleave)="closeDropdownIfHovered(dropdown)">
      <span
        (mouseenter)="openDropdownOnHover(dropdown)" [ngClass]="{ active: !!suffixLabels[menuEntry.label] }" ngbDropdownAnchor
        (click)="dropdownAnchorClicked(dropdown)" role="button" class="title-page title-page-settings"
      >
        <ng-container i18n>{{ menuEntry.label }}</ng-container>
        <ng-container *ngIf="!!suffixLabels[menuEntry.label]"> - {{ suffixLabels[menuEntry.label] }}</ng-container>
      </span>

      <div ngbDropdownMenu>
        <a *ngFor="let menuChild of menuEntry.children" class="dropdown-item" [ngClass]="{ icon: hasIcons }" [routerLink]="menuChild.routerLink">
          <my-global-icon *ngIf="menuChild.iconName" [iconName]="menuChild.iconName"></my-global-icon>

          {{ menuChild.label }}
        </a>
      </div>
    </div>

  </ng-container>
</div>