header-right.component.html 4.32 KB
Newer Older
Alex ORLUC's avatar
Alex ORLUC committed
1
<div class="bg-head-title-tool">
2
3
4
5
    <form *ngIf="hideSearchBar()" (ngSubmit)="goTo()" #criteriaFormUp="ngForm">
        <mat-form-field floatLabel="never" class="basket-search">
            <input class="metaSearch" type="text" matInput
                [placeholder]="'lang.searchMails' | translate" name="searchTarget" [(ngModel)]="searchTarget">
6
            <button mat-icon-button type="submit" matPrefix [title]="'lang.quickSearchTarget' | translate">
7
8
9
10
                <mat-icon class="fas fa-search"></mat-icon>
            </button>
        </mat-form-field>
    </form>
11

12
    <button mat-icon-button [matMenuTriggerFor]="applications" *ngIf="!appService.getViewMode()" matTooltip="{{'lang.menu' | translate}}">
Alex ORLUC's avatar
Alex ORLUC committed
13
        <mat-icon class="fa fa-th" style="font-size:22px;"></mat-icon>
Alex ORLUC's avatar
Alex ORLUC committed
14
15
    </button>
    <mat-menu #applications="matMenu" class="headerMaarchShortcut">
16
        <ng-container *ngFor="let shortcut of menus | sortBy: 'label'">
Alex ORLUC's avatar
Alex ORLUC committed
17
            <button (click)="gotToMenu(shortcut);" style="white-space:inherit;height: 100px;line-height:20px;"
18
                class="col-md-4 col-xs-6" mat-button color="primary" matTooltip="{{shortcut.comment | translate}}">
Alex ORLUC's avatar
Alex ORLUC committed
19
                <i class="{{shortcut.style}} fa-2x"></i>
20
                <br />{{shortcut.label | translate}}
Alex ORLUC's avatar
Alex ORLUC committed
21
22
            </button>
        </ng-container>
23
        <div *ngIf="functions.empty(menus)" class="noAvailableMenu">
24
            {{'lang.noAvailableMenu' | translate}}
25
        </div>
Alex ORLUC's avatar
Alex ORLUC committed
26
    </mat-menu>
27
    <button *ngIf="!appService.getViewMode()" mat-button [matMenuTriggerFor]="menu">
Alex ORLUC's avatar
Alex ORLUC committed
28
        <mat-icon mat-list-icon class="fa fa-user fa-2x" style="color:white; margin:0px 12px 8px 0px;"></mat-icon>
29
        <span>{{headerService.user.firstname | titlecase }}</span>&nbsp;<b>{{headerService.user.lastname | uppercase}}</b>
Alex ORLUC's avatar
Alex ORLUC committed
30
    </button>
31
    <button *ngIf="appService.getViewMode()" mat-icon-button [matMenuTriggerFor]="menu">
Alex ORLUC's avatar
Alex ORLUC committed
32
        <mat-icon mat-list-icon class="fa fa-user fa-2x" style="color:white;height: auto;"></mat-icon>
Alex ORLUC's avatar
Alex ORLUC committed
33
34
35
    </button>
    <mat-menu #menu="matMenu" class="headerMaarch">
        <canvas class="header-bg" width="250" height="70"
36
            style="margin-top:-8px;background-size:cover;border-bottom: solid 1px white;" [style.background-image]="'url(../rest/images?image=loginPage)'"></canvas>
37
        <i title="{{'lang.myProfileAccess' | translate}}" routerLink="/profile"
38
            style="cursor:pointer;z-index:1;color:white;position: absolute;left: 85px;top: 17px;width: 70px;height: 70px;background-size: cover;background-position: top center;border-radius: 50%;border: solid white;background-color:white;" [style.background-image]="'url(../rest/images?image=onlyLogo)'"></i>
Alex ORLUC's avatar
fix css    
Alex ORLUC committed
39
        <div class="content" style="padding-top:20px;color:white;max-height:250px;overflow-y:auto;overflow-x:hidden;">
Alex ORLUC's avatar
Alex ORLUC committed
40
41
42
            <p routerLink="/profile" class="text-center" style="cursor:pointer;">{{headerService.user.firstname}}
                {{headerService.user.lastname | uppercase}}</p>
            <mat-list>
43
                <h3 mat-subheader style="color:white;">{{'lang.groups' | translate}}</h3>
Alex ORLUC's avatar
Alex ORLUC committed
44
45
46
47
                <mat-divider></mat-divider>
                <mat-list-item *ngFor="let group of headerService.user.groups">
                    <p mat-line style="color:white;opacity:0.5;"> {{group.group_desc}} </p>
                </mat-list-item>
48
                <h3 mat-subheader style="color:white;">{{'lang.entities' | translate}}</h3>
Alex ORLUC's avatar
Alex ORLUC committed
49
50
51
52
53
54
                <mat-divider></mat-divider>
                <mat-list-item *ngFor="let entity of headerService.user.entities">
                    <p mat-line style="color:white;opacity:0.5;"> {{entity.entity_label}} </p>
                </mat-list-item>
            </mat-list>
        </div>
Alex ORLUC's avatar
fix css    
Alex ORLUC committed
55
        <div style="display:flex;padding: 5px;">
Alex ORLUC's avatar
Alex ORLUC committed
56
57
            <div style="text-align:left;flex:1">
                <a routerLink="/profile" style="color: white;padding-left: 10px;">
58
                    <span class="badge action-header-profile">{{'lang.myProfile' | translate}}</span>
Alex ORLUC's avatar
Alex ORLUC committed
59
60
                </a>
            </div>
61
            <div *ngIf="showLogout()" style="text-align:right;flex:2;">
62
                <a (click)="authService.logout(true, false, true)" style="cursor:pointer; color: white;padding-right: 10px;">
63
                    <span class="badge action-header-profile">{{'lang.logout' | translate}}</span>
Alex ORLUC's avatar
Alex ORLUC committed
64
65
66
67
68
                </a>
            </div>
        </div>
    </mat-menu>
</div>