Skip to content
Snippets Groups Projects
header-right.component.html 4.68 KiB
Newer Older
  • Learn to ignore specific revisions
  • <div class="bg-head-title-tool">
    
        <form *ngIf="!hideSearch" ngNoForm style="height: 40px;" name="choose_query" id="choose_query" method="post"
            action="index.php?display=true&amp;dir=indexing_searching&amp;page=search_adv_result">
            <input type="hidden" name="meta[]" value="baskets_clause#baskets_clause#select_simple">
            <input type="hidden" name="meta[]" value="welcome#welcome#welcome">
            <input type="hidden" name="baskets_clause" value="true">
            <mat-form-field id="searchInput" floatLabel="never" style="width:100%;margin-top: -18px;margin-left:-5px;">
                <input matInput type="text" (blur)="hideSearch = !hideSearch" name="welcome" placeholder="{{lang.searchMails}}">
                <button mat-icon-button matSuffix *ngIf="!mobileMode" style="opacity:0.5;">
                    <mat-icon class="fa fa-search" style="font-size:22px;"></mat-icon>
                </button>
            </mat-form-field>
            <input #searchHome type="submit" name="submit" value="" style="display:none">
        </form>
    
        <button (click)="hideSearch = !hideSearch" mat-icon-button *ngIf="!mobileMode && hideSearch" style="opacity:0.5;">
    
    Alex ORLUC's avatar
    Alex ORLUC committed
            <mat-icon class="fa fa-search" style="font-size:22px;"></mat-icon>
    
        </button>
    
        <button mat-icon-button [matMenuTriggerFor]="applications" *ngIf="!mobileMode" matTooltip="{{lang.menu}}">
    
    Alex ORLUC's avatar
    Alex ORLUC committed
            <mat-icon class="fa fa-th" style="font-size:22px;"></mat-icon>
    
        </button>
        <mat-menu #applications="matMenu" class="headerMaarchShortcut">
            <ng-container *ngFor="let shortcut of headerService.menu">
                <button (click)="gotToMenu(shortcut);" style="white-space:inherit;height: 100px;line-height:20px;"
                    class="col-md-4 col-xs-6" mat-button color="primary" matTooltip="{{shortcut.comment}}">
                    <i class="{{shortcut.style}} fa-2x"></i>
                    <br />{{shortcut.name}}
                </button>
            </ng-container>
        </mat-menu>
    
        <button *ngIf="!mobileMode" mat-button [matMenuTriggerFor]="menu">
    
            <mat-icon mat-list-icon class="fa fa-user fa-2x" style="color:white; margin:0px 12px 8px 0px;"></mat-icon>
    
            {{headerService.user.firstname | titlecase }} <b>{{headerService.user.lastname | uppercase}}</b>
    
        </button>
        <button *ngIf="mobileMode" mat-icon-button [matMenuTriggerFor]="menu">
            <mat-icon mat-list-icon class="fa fa-user fa-2x" style="color:white;height: auto;"></mat-icon>
    
        </button>
        <mat-menu #menu="matMenu" class="headerMaarch">
            <canvas class="header-bg" width="250" height="70"
                style="margin-top:-8px;background-image: url('static.php?filename=login-banner.jpg');background-size:cover;border-bottom: solid 1px white;"></canvas>
            <i title="{{lang.myProfileAccess}}" routerLink="/profile"
                style="cursor:pointer;z-index:1;color:white;position: absolute;left: 85px;top: 17px;background-image: url('static.php?filename=logo_only.svg');width: 70px;height: 70px;background-size: cover;background-position: top center;border-radius: 50%;border: solid white;background-color:white;"></i>
            <div class="content" style="padding-top:10px;color:white;max-height:250px;overflow-y:auto;overflow-x:hidden;">
                <p routerLink="/profile" class="text-center" style="cursor:pointer;">{{headerService.user.firstname}}
                    {{headerService.user.lastname | uppercase}}</p>
                <mat-list>
                    <h3 mat-subheader style="color:white;">{{lang.groups}}</h3>
                    <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>
                    <h3 mat-subheader style="color:white;">{{lang.entities}}</h3>
                    <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>
            <div style="display:flex;padding: 5px 5px 0 5px;">
                <div style="text-align:left;flex:1">
                    <a routerLink="/profile" style="color: white;padding-left: 10px;">
                        <span class="badge" style="background:white;" color="primary">{{lang.myProfile}}</span>
                    </a>
                </div>
                <div style="text-align:right;flex:2;">
                    <a href="index.php?display=true&page=logout&logout=true" style="color: white;padding-right: 10px;">
                        <span class="badge" style="background:white;" color="primary">{{lang.logout}}</span>
                    </a>
                </div>
            </div>
        </mat-menu>
    </div>