aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/components/layout/top-nav/top-nav.component.html
blob: 2636dd96bb87ae3006064104e1e252b5222cafb4 (plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!--
  ~ Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
 
 
<nav class="top-nav">

    <div class="asdc-app-title-wrapper">
        <a class="asdc-app-title">{{ 'PROJECT_TITLE'|translate }}</a>
        <div class="asdc-version"> v.{{version}}</div>
    </div>

    <ul class="top-menu" *ngIf="!menuModel && topLvlMenu">
        <!-- no hierarchy & dropdowns mode -->
        <li *ngFor="let item of topLvlMenu.menuItems; let i = index"
            [ngClass]="{'selected': i == topLvlMenu.selectedIndex}">
            <a (click)="menuItemClick(topLvlMenu, item)"
               [attr.data-tests-id]="'main-menu-button-' + item.text.toLowerCase()">{{item.text}}</a>
        </li>
    </ul>

    <ul class="top-menu" *ngIf="menuModel">
        <!-- with hierarchy & dropdowns mode -->
        <ng-container *ngFor="let groupItem of menuModel; let $index = index; let $last = last">
            <li [ngClass]="{'selected': $last }">
                <a (click)="menuItemClick(groupItem, groupItem.menuItems[groupItem.selectedIndex])"
                   [attr.data-tests-id]="'breadcrumbs-button-' + $index">
                    {{groupItem.menuItems[groupItem.selectedIndex]?.text}}
                </a>
            </li>
            <li class="triangle-dropdown"
                [ngClass]="{'item-click': groupItem.itemClick}" (mouseover)="groupItem.itemClick = true">
                <div class="triangle"><span class="sprite-new arrow-right"></span></div>
                <ul class="sub-menu">
                    <li *ngFor="let ddItem of groupItem.menuItems; let $index2 = index"
                        (click)="menuItemClick(groupItem, ddItem)"
                        [ngClass]="{'selected': $index2 == groupItem.selectedIndex, 'disabled': ddItem.isDisabled}"
                        [attr.data-tests-id]="'sub-menu-button-' + ddItem.text.toLowerCase()">
                        <span sdc-smart-tooltip="">{{ddItem.text}}</span>
                    </li>
                </ul>
            </li>
        </ng-container>
    </ul>

    <div class="top-search" [hidden]="hideSearch === true">
        <input type="text"
               class="search-text"
               placeholder="Search"
               [ngModel]="searchTerm"
               (ngModelChange)="emitSearchTerm($event)"
               data-tests-id="main-menu-input-search" />
        <span class="w-sdc-search-icon magnification"></span>
    </div>

    <div class="notification-icon" [ngClass]="{'disabled' : progress > 0}" *ngIf="user && user.role === 'DESIGNER' && notificationIconCallback" (click)="notificationIconCallback()" tooltip="Vendor Software Product Repository" tooltipPlacement="left" data-tests-id="repository-icon"></div>

</nav>