Skip to content
Snippets Groups Projects
menuShortcut.component.html 3.10 KiB
<mat-nav-list>
    <ng-container *ngIf="mobileMode">
        <canvas class="header-bg" style="margin-top:-8px;background-image: url('static.php?filename=login-banner.jpg');background-size:cover;border-bottom: solid 1px white;width: 100%;height: 70px;"></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>
        <mat-expansion-panel style="margin-top:-7px;">
            <mat-expansion-panel-header>
                <mat-panel-title style="justify-content: center;">
                    {{user.firstname}} {{user.lastname | uppercase}}
                </mat-panel-title>
            </mat-expansion-panel-header>
            <mat-list>
                <mat-divider></mat-divider>
                <mat-list-item *ngFor="let group of user.groups">
                    <p mat-line style="color:#666;opacity:0.5;"> {{group.group_desc}} </p>
                </mat-list-item>
                <h3 mat-subheader style="color:#666;">{{lang.groups}}</h3>
                <mat-divider></mat-divider>
                <mat-list-item *ngFor="let group of user.groups">
                    <p mat-line style="color:#666;opacity:0.5;"> {{group.group_desc}} </p>
                </mat-list-item>
                <h3 mat-subheader style="color:#666;">{{lang.entities}}</h3>
                <mat-divider></mat-divider>
                <mat-list-item *ngFor="let entity of user.entities">
                    <p mat-line style="color:#666;opacity:0.5;"> {{entity.entity_label}} </p>
                </mat-list-item>
            </mat-list>
        </mat-expansion-panel>
    </ng-container>
</mat-nav-list>
<mat-nav-list>
    <h3 mat-subheader>{{lang.shortcut}}</h3>
    <div class="button-row" style="padding-left: 10px;padding-right: 10px;display: flex;width: 250px;">
        <span style="flex:1;text-align: center;padding: 5px;">
            <button color="primary" mat-icon-button (click)="gotToMenu('/home','true');" matTooltip="{{lang.home}}">
                <mat-icon class="fa fa-home" style="height:auto;"></mat-icon>
            </button>
        </span>
        <ng-container *ngFor="let shortcut of user.menu">
            <span style="flex:1;text-align: center;padding: 5px;" *ngIf="shortcut.shortcut == 'true'">
                <button color="primary" mat-icon-button (click)="gotToMenu(shortcut.servicepage,shortcut.angular);" matTooltip="{{shortcut.name}}">
                    <mat-icon class="fa {{shortcut.style}}" style="height:auto;"></mat-icon>
                </button>
            </span>
        </ng-container>
    </div>
</mat-nav-list>
<mat-nav-list *ngIf="mobileMode">
    <a mat-list-item href="index.php?display=true&page=logout&logout=true">
        <mat-icon color="warn" mat-list-icon class="fa fa-sign-out-alt"></mat-icon>
        <p mat-line>
            {{lang.logout}}
        </p>
    </a>
</mat-nav-list>
<mat-divider></mat-divider>